summaryrefslogtreecommitdiffstats
path: root/Source/cmTryRunCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-05 08:48:04 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-06 15:58:55 (GMT)
commit9410e24a4ad3a21b2c27d057798f723e88d14d45 (patch)
tree9259e248faee43f15b544e1fa7ee61f3ce23e0c4 /Source/cmTryRunCommand.cxx
parent7b7ae3b1a1d1c664eeef48392759883aa4040657 (diff)
downloadCMake-9410e24a4ad3a21b2c27d057798f723e88d14d45.zip
CMake-9410e24a4ad3a21b2c27d057798f723e88d14d45.tar.gz
CMake-9410e24a4ad3a21b2c27d057798f723e88d14d45.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.cxx19
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;