summaryrefslogtreecommitdiff
path: root/Source/cmOptionCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmOptionCommand.cxx')
-rw-r--r--Source/cmOptionCommand.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx
index 7a0e051a3a..db3c0071a0 100644
--- a/Source/cmOptionCommand.cxx
+++ b/Source/cmOptionCommand.cxx
@@ -52,7 +52,7 @@ bool cmOptionCommand::InitialPass(std::vector<std::string>& args)
// 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
const char* cacheValue
- = cmCacheManager::GetInstance()->GetCacheValue(args[0].c_str());
+ = m_Makefile->GetDefinition(args[0].c_str());
if(!cacheValue)
{
const char* initialValue = "Off";
@@ -60,17 +60,14 @@ bool cmOptionCommand::InitialPass(std::vector<std::string>& args)
{
initialValue = args[2].c_str();
}
- cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(),
- cmSystemTools::IsOn(initialValue),
- args[1].c_str());
- m_Makefile->AddDefinition(args[0].c_str(), initialValue);
+ m_Makefile->AddCacheDefinition(args[0].c_str(),
+ cmSystemTools::IsOn(initialValue),
+ args[1].c_str());
}
else
{
- m_Makefile->AddDefinition(args[0].c_str(), cacheValue);
- cmCacheManager::GetInstance()->
- AddCacheEntry(args[0].c_str(),
- cmSystemTools::IsOn(cacheValue), args[1].c_str());
+ m_Makefile->AddCacheDefinition(args[0].c_str(),
+ cmSystemTools::IsOn(cacheValue), args[1].c_str());
}
return true;