BUG#129: Fixed load/save of CMakeCache.txt when it is not in the current directory.

This commit is contained in:
Brad King 2003-08-06 18:39:16 -04:00
parent b41978fef7
commit 88e1571c76
2 changed files with 3 additions and 5 deletions

View File

@ -639,8 +639,7 @@ int cmCursesMainForm::Configure(int noconfigure)
// always save the current gui values to disk // always save the current gui values to disk
this->FillCacheManagerFromUI(); this->FillCacheManagerFromUI();
this->m_CMakeInstance->GetCacheManager()->SaveCache( this->m_CMakeInstance->GetCacheManager()->SaveCache(
cmSystemTools::GetCurrentWorkingDirectory().c_str()); m_CMakeInstance->GetHomeOutputDirectory());
// Get rid of previous errors // Get rid of previous errors
m_Errors = std::vector<std::string>(); m_Errors = std::vector<std::string>();

View File

@ -116,8 +116,7 @@ void cmakewizard::RunWizard(std::vector<std::string> const& args)
this->ShowMessage("\n"); this->ShowMessage("\n");
// load the cache from disk // load the cache from disk
cmCacheManager *cachem = make.GetCacheManager(); cmCacheManager *cachem = make.GetCacheManager();
cachem-> cachem->LoadCache(make.GetHomeOutputDirectory());
LoadCache(cmSystemTools::GetCurrentWorkingDirectory().c_str());
cmCacheManager::CacheIterator i = cachem->NewIterator(); cmCacheManager::CacheIterator i = cachem->NewIterator();
// iterate over all entries in the cache // iterate over all entries in the cache
for(;!i.IsAtEnd(); i.Next()) for(;!i.IsAtEnd(); i.Next())
@ -151,7 +150,7 @@ void cmakewizard::RunWizard(std::vector<std::string> const& args)
} }
askedCache[key] = i.GetValue(); askedCache[key] = i.GetValue();
} }
cachem->SaveCache(cmSystemTools::GetCurrentWorkingDirectory().c_str()); cachem->SaveCache(make.GetHomeOutputDirectory());
} }
while(asked); while(asked);
make.Generate(); make.Generate();