diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-04-05 08:48:04 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-04-08 16:47:00 (GMT) |
commit | ba404938a202b51bb82bff8692ed08e53b061ad4 (patch) | |
tree | 445c969ae57dc9656e791af23b0b9f6830c6d255 /Source/cmTryRunCommand.cxx | |
parent | f3922a9a5b463420db5f7fae08efdf1b4abdfe5e (diff) | |
download | CMake-ba404938a202b51bb82bff8692ed08e53b061ad4.zip CMake-ba404938a202b51bb82bff8692ed08e53b061ad4.tar.gz CMake-ba404938a202b51bb82bff8692ed08e53b061ad4.tar.bz2 |
cmCacheManager: Port consumers to non-iterator API.
This simplifies reasoning about the follow-up commit which ports
away from cmCacheManager to a class with the same method names.
Diffstat (limited to 'Source/cmTryRunCommand.cxx')
-rw-r--r-- | Source/cmTryRunCommand.cxx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index b5280cf..911ade8 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -264,11 +264,12 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs, comment.c_str(), cmCacheManager::STRING); - cmCacheManager::CacheIterator it = this->Makefile->GetCacheManager()-> - GetCacheIterator(this->RunResultVariable.c_str()); - if ( !it.IsAtEnd() ) + cmCacheManager* manager = this->Makefile->GetCacheManager(); + const char* existingValue + = manager->GetCacheEntryValue(this->RunResultVariable); + if (existingValue) { - it.SetProperty("ADVANCED", "1"); + manager->SetCacheEntryProperty(this->RunResultVariable, "ADVANCED", "1"); } error = true; @@ -290,11 +291,13 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs, "PLEASE_FILL_OUT-NOTFOUND", comment.c_str(), cmCacheManager::STRING); - cmCacheManager::CacheIterator it = this->Makefile->GetCacheManager()-> - GetCacheIterator(internalRunOutputName.c_str()); - if ( !it.IsAtEnd() ) + cmCacheManager* manager = this->Makefile->GetCacheManager(); + const char* existing = + manager->GetCacheEntryValue(internalRunOutputName); + if (existing) { - it.SetProperty("ADVANCED", "1"); + manager->SetCacheEntryProperty(internalRunOutputName, + "ADVANCED", "1"); } error = true; |