summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-04-25 20:09:17 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-04-25 20:09:17 (GMT)
commit5c83326fb43296bec07fe084497f8b3ea5b05e88 (patch)
tree6867026ecfa8bfd5f0ac8654acd275cdc4f768bb /Source/cmCacheManager.cxx
parent61091234c37ebd104885418809a718910361e4ff (diff)
downloadCMake-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.cxx17
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"