1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-17 15:32:10 +08:00

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.
This commit is contained in:
Stephen Kelly
2015-04-05 10:48:04 +02:00
parent f3922a9a5b
commit ba404938a2
13 changed files with 117 additions and 115 deletions

View File

@@ -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;