summaryrefslogtreecommitdiffstats
path: root/Source/cmMarkAsAdvancedCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMarkAsAdvancedCommand.cxx')
-rw-r--r--Source/cmMarkAsAdvancedCommand.cxx17
1 files changed, 6 insertions, 11 deletions
diff --git a/Source/cmMarkAsAdvancedCommand.cxx b/Source/cmMarkAsAdvancedCommand.cxx
index f6a2c26..10d30f3 100644
--- a/Source/cmMarkAsAdvancedCommand.cxx
+++ b/Source/cmMarkAsAdvancedCommand.cxx
@@ -36,25 +36,20 @@ bool cmMarkAsAdvancedCommand
for(; i < args.size(); ++i)
{
std::string variable = args[i];
- cmCacheManager* manager = this->Makefile->GetCacheManager();
- cmCacheManager::CacheIterator it =
- manager->GetCacheIterator(variable.c_str());
- if ( it.IsAtEnd() )
+ cmState* state = this->Makefile->GetState();
+ if (!state->GetCacheEntryValue(variable))
{
- this->Makefile->GetCacheManager()
- ->AddCacheEntry(variable, 0, 0,
- cmCacheManager::UNINITIALIZED);
+ state->AddCacheEntry(variable, 0, 0, cmState::UNINITIALIZED);
overwrite = true;
}
- it.Find(variable);
- if ( it.IsAtEnd() )
+ if (!state->GetCacheEntryValue(variable))
{
cmSystemTools::Error("This should never happen...");
return false;
}
- if ( !it.PropertyExists("ADVANCED") || overwrite )
+ if (!state->GetCacheEntryProperty(variable, "ADVANCED") || overwrite)
{
- it.SetProperty("ADVANCED", value);
+ state->SetCacheEntryProperty(variable, "ADVANCED", value);
}
}
return true;