summaryrefslogtreecommitdiffstats
path: root/Source/cmTryRunCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-09 15:32:36 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-04-09 15:32:36 (GMT)
commit26d6c095d6117d7f9cb02378acb74d86efe59d0b (patch)
tree2b35636c949b7e1450eaf1a6f88839fba16cfdb9 /Source/cmTryRunCommand.cxx
parent81f627d53bd3bdb50379eb3e1b9cd87bb0ff0bbc (diff)
parentba404938a202b51bb82bff8692ed08e53b061ad4 (diff)
downloadCMake-26d6c095d6117d7f9cb02378acb74d86efe59d0b.zip
CMake-26d6c095d6117d7f9cb02378acb74d86efe59d0b.tar.gz
CMake-26d6c095d6117d7f9cb02378acb74d86efe59d0b.tar.bz2
Merge topic 'refactor-cache-api'
ba404938 cmCacheManager: Port consumers to non-iterator API. f3922a9a Port QtDialog to non-iterator cache API. 3e6a76e4 Port CursesDialog to non-iterator cache API. 9e641567 cmMakefile: Port away from CacheEntry.Initialized. 1e2dbfce cmCacheManager: Add non-iterator-based API. 60a62a91 cmCacheManager: Return a C string from GetValue. 77f2807c cmCacheManager: Rename GetCacheValue to GetInitializedCacheValue. 14973054 Add API for cache loading, deleting and saving to the cmake class. 1f2c12eb cmMakefile: Remove cache version accessors. 97c50a8d cmMakefile: Simplify GetDefinitions implementation.
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 8b68d64..63109e0 100644
--- a/Source/cmTryRunCommand.cxx
+++ b/Source/cmTryRunCommand.cxx
@@ -286,11 +286,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;
@@ -312,11 +313,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;