summaryrefslogtreecommitdiffstats
path: root/Source/cmOptionCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmOptionCommand.cxx')
-rw-r--r--Source/cmOptionCommand.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx
index 60728ea..baf5b1e 100644
--- a/Source/cmOptionCommand.cxx
+++ b/Source/cmOptionCommand.cxx
@@ -42,16 +42,16 @@ bool cmOptionCommand
std::string initialValue = "Off";
// Now check and see if the value has been stored in the cache
// already, if so use that value and don't look for the program
- cmCacheManager::CacheIterator it =
- this->Makefile->GetCacheManager()->GetCacheIterator(args[0].c_str());
- if(!it.IsAtEnd())
+ cmCacheManager* manager = this->Makefile->GetCacheManager();
+ const char* existingValue = manager->GetCacheEntryValue(args[0]);
+ if(existingValue)
{
- if ( it.GetType() != cmCacheManager::UNINITIALIZED )
+ if (manager->GetCacheEntryType(args[0]) != cmCacheManager::UNINITIALIZED)
{
- it.SetProperty("HELPSTRING", args[1].c_str());
+ manager->SetCacheEntryProperty(args[0], "HELPSTRING", args[1]);
return true;
}
- initialValue = it.GetValue();
+ initialValue = existingValue;
}
if(args.size() == 3)
{