diff options
author | Brad King <brad.king@kitware.com> | 2015-04-07 21:14:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-07 21:15:04 (GMT) |
commit | 3347c5e4f9fcdd36c06067d6c7cd5a985a9c5d94 (patch) | |
tree | d0372265c5b1f07f9b1a8a6cc9bedf96bed2dbcb /Source/cmGlobalGenerator.cxx | |
parent | 9410e24a4ad3a21b2c27d057798f723e88d14d45 (diff) | |
download | CMake-3347c5e4f9fcdd36c06067d6c7cd5a985a9c5d94.zip CMake-3347c5e4f9fcdd36c06067d6c7cd5a985a9c5d94.tar.gz CMake-3347c5e4f9fcdd36c06067d6c7cd5a985a9c5d94.tar.bz2 |
Revert topic 'refactor-cache-api'
This topic was never tested without some follow-up commits. The
GetCacheEntryValue API returns a pointer to memory freed on return.
It will have to be revised along with the rest of the original topic.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 35394b8..3c0a0e2 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -179,7 +179,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang, return; } const char* cname = this->GetCMakeInstance()-> - GetCacheManager()->GetInitializedCacheValue(langComp); + GetCacheManager()->GetCacheValue(langComp); std::string changeVars; if(cname && !optional) { @@ -1559,7 +1559,9 @@ void cmGlobalGenerator::CheckLocalGenerators() cmSystemTools::IsNOTFOUND(lib->first.c_str())) { std::string varName = lib->first.substr(0, lib->first.size()-9); - if(manager->GetCacheEntryPropertyAsBool(varName, "ADVANCED")) + cmCacheManager::CacheIterator it = + manager->GetCacheIterator(varName.c_str()); + if(it.GetPropertyAsBool("ADVANCED")) { varName += " (ADVANCED)"; } @@ -1590,7 +1592,9 @@ void cmGlobalGenerator::CheckLocalGenerators() cmSystemTools::IsNOTFOUND(incDir->c_str())) { std::string varName = incDir->substr(0, incDir->size()-9); - if(manager->GetCacheEntryPropertyAsBool(varName, "ADVANCED")) + cmCacheManager::CacheIterator it = + manager->GetCacheIterator(varName.c_str()); + if(it.GetPropertyAsBool("ADVANCED")) { varName += " (ADVANCED)"; } @@ -1637,7 +1641,7 @@ int cmGlobalGenerator::TryCompile(const std::string& srcdir, // and there is a good chance that the try compile stuff will // take the bulk of the time, so try and guess some progress // by getting closer and closer to 100 without actually getting there. - if (!this->CMakeInstance->GetCacheManager()->GetInitializedCacheValue + if (!this->CMakeInstance->GetCacheManager()->GetCacheValue ("CMAKE_NUMBER_OF_LOCAL_GENERATORS")) { // If CMAKE_NUMBER_OF_LOCAL_GENERATORS is not set @@ -1835,7 +1839,7 @@ void cmGlobalGenerator::AddLocalGenerator(cmLocalGenerator *lg) // update progress // estimate how many lg there will be const char *numGenC = - this->CMakeInstance->GetCacheManager()->GetInitializedCacheValue + this->CMakeInstance->GetCacheManager()->GetCacheValue ("CMAKE_NUMBER_OF_LOCAL_GENERATORS"); if (!numGenC) |