diff options
Diffstat (limited to 'Source/cmOptionCommand.cxx')
-rw-r--r-- | Source/cmOptionCommand.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index baf5b1e..60728ea 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* manager = this->Makefile->GetCacheManager(); - const char* existingValue = manager->GetCacheEntryValue(args[0]); - if(existingValue) + cmCacheManager::CacheIterator it = + this->Makefile->GetCacheManager()->GetCacheIterator(args[0].c_str()); + if(!it.IsAtEnd()) { - if (manager->GetCacheEntryType(args[0]) != cmCacheManager::UNINITIALIZED) + if ( it.GetType() != cmCacheManager::UNINITIALIZED ) { - manager->SetCacheEntryProperty(args[0], "HELPSTRING", args[1]); + it.SetProperty("HELPSTRING", args[1].c_str()); return true; } - initialValue = existingValue; + initialValue = it.GetValue(); } if(args.size() == 3) { |