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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user