diff options
Diffstat (limited to 'Source/cmSetCommand.cxx')
-rw-r--r-- | Source/cmSetCommand.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index 90e2442..00e1bc5 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -115,7 +115,7 @@ bool cmSetCommand::InitialPass(std::vector<std::string>& args) m_Makefile->ExpandVariablesInString(value); // get the current cache value for the variable const char* cacheValue = - cmCacheManager::GetInstance()->GetCacheValue(variable); + m_Makefile->GetDefinition(variable); if(cacheValue) { // if it is not a cached value, or it is a cached @@ -126,15 +126,18 @@ bool cmSetCommand::InitialPass(std::vector<std::string>& args) return true; } } - // add the definition - m_Makefile->AddDefinition(variable, value.c_str()); // if it is meant to be in the cache then define it in the cache if(cache) { - cmCacheManager::GetInstance()->AddCacheEntry(variable, - value.c_str(), - docstring, - type); + m_Makefile->AddCacheDefinition(variable, + value.c_str(), + docstring, + type); + } + else + { + // add the definition + m_Makefile->AddDefinition(variable, value.c_str()); } return true; } |