From 88e1571c76529c17a76adcacbd4573b4879e1bee Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 6 Aug 2003 18:39:16 -0400 Subject: [PATCH] BUG#129: Fixed load/save of CMakeCache.txt when it is not in the current directory. --- Source/CursesDialog/cmCursesMainForm.cxx | 3 +-- Source/cmakewizard.cxx | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index ccd27ac3c..7bfbef4dc 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -639,8 +639,7 @@ int cmCursesMainForm::Configure(int noconfigure) // always save the current gui values to disk this->FillCacheManagerFromUI(); this->m_CMakeInstance->GetCacheManager()->SaveCache( - cmSystemTools::GetCurrentWorkingDirectory().c_str()); - + m_CMakeInstance->GetHomeOutputDirectory()); // Get rid of previous errors m_Errors = std::vector(); diff --git a/Source/cmakewizard.cxx b/Source/cmakewizard.cxx index 57145a006..e2da23dfb 100644 --- a/Source/cmakewizard.cxx +++ b/Source/cmakewizard.cxx @@ -116,8 +116,7 @@ void cmakewizard::RunWizard(std::vector const& args) this->ShowMessage("\n"); // load the cache from disk cmCacheManager *cachem = make.GetCacheManager(); - cachem-> - LoadCache(cmSystemTools::GetCurrentWorkingDirectory().c_str()); + cachem->LoadCache(make.GetHomeOutputDirectory()); cmCacheManager::CacheIterator i = cachem->NewIterator(); // iterate over all entries in the cache for(;!i.IsAtEnd(); i.Next()) @@ -151,7 +150,7 @@ void cmakewizard::RunWizard(std::vector const& args) } askedCache[key] = i.GetValue(); } - cachem->SaveCache(cmSystemTools::GetCurrentWorkingDirectory().c_str()); + cachem->SaveCache(make.GetHomeOutputDirectory()); } while(asked); make.Generate();