diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-08-08 15:54:46 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-08-08 15:54:46 (GMT) |
commit | db1303aa7d00f49a0fdf66f120eb3e6cb0e445fe (patch) | |
tree | ad569e72f02849e50e625faa1350bb05a3af08f9 /Source/cmSetCommand.cxx | |
parent | 61ec323b6a1c4e5a44331014447e3d1d31dc1b6b (diff) | |
download | CMake-db1303aa7d00f49a0fdf66f120eb3e6cb0e445fe.zip CMake-db1303aa7d00f49a0fdf66f120eb3e6cb0e445fe.tar.gz CMake-db1303aa7d00f49a0fdf66f120eb3e6cb0e445fe.tar.bz2 |
ENH: big change, only allow commands access to the cache via the cmMakefile class and GetDefinition, also the cmMakefile is the only way for commands to add to the cache. Also, some changes to configure.in that check for for scoping
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; } |