diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-04-25 20:09:17 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-04-25 20:09:17 (GMT) |
commit | 5c83326fb43296bec07fe084497f8b3ea5b05e88 (patch) | |
tree | 6867026ecfa8bfd5f0ac8654acd275cdc4f768bb /Source/cmCacheManager.cxx | |
parent | 61091234c37ebd104885418809a718910361e4ff (diff) | |
download | CMake-5c83326fb43296bec07fe084497f8b3ea5b05e88.zip CMake-5c83326fb43296bec07fe084497f8b3ea5b05e88.tar.gz CMake-5c83326fb43296bec07fe084497f8b3ea5b05e88.tar.bz2 |
ENH: clean up cmake GUI and remove the parsing of CMakeLists.txt files by configure
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r-- | Source/cmCacheManager.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 6529973..bc2f0a7 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -59,7 +59,13 @@ cmCacheManager* cmCacheManager::GetInstance() bool cmCacheManager::LoadCache(cmMakefile* mf) { - std::string cacheFile = mf->GetHomeOutputDirectory(); + return this->LoadCache(mf->GetHomeOutputDirectory()); +} + + +bool cmCacheManager::LoadCache(const char* path) +{ + std::string cacheFile = path; cacheFile += "/CMakeCache.txt"; // clear the old cache m_Cache.clear(); @@ -98,7 +104,13 @@ bool cmCacheManager::LoadCache(cmMakefile* mf) bool cmCacheManager::SaveCache(cmMakefile* mf) const { - std::string cacheFile = mf->GetHomeOutputDirectory(); + return this->SaveCache(mf->GetHomeOutputDirectory()); +} + + +bool cmCacheManager::SaveCache(const char* path) const +{ + std::string cacheFile = path; cacheFile += "/CMakeCache.txt"; std::string tempFile = cacheFile; tempFile += ".tmp"; @@ -110,6 +122,7 @@ bool cmCacheManager::SaveCache(cmMakefile* mf) const return false; } fout << "# This is the CMakeCache file.\n" + << "# For build in directory: " << path << "\n" << "# You can edit this file to change values found and used by cmake.\n" << "# If you do not want to change any of the values, simply exit the editor.\n" << "# If you do want to change a value, simply edit, save, and exit the editor.\n" |