summaryrefslogtreecommitdiffstats
path: root/Source/cmUtilitySourceCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-08-08 15:54:46 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-08-08 15:54:46 (GMT)
commitdb1303aa7d00f49a0fdf66f120eb3e6cb0e445fe (patch)
treead569e72f02849e50e625faa1350bb05a3af08f9 /Source/cmUtilitySourceCommand.cxx
parent61ec323b6a1c4e5a44331014447e3d1d31dc1b6b (diff)
downloadCMake-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/cmUtilitySourceCommand.cxx')
-rw-r--r--Source/cmUtilitySourceCommand.cxx21
1 files changed, 9 insertions, 12 deletions
diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx
index fb97694..7b3dde1 100644
--- a/Source/cmUtilitySourceCommand.cxx
+++ b/Source/cmUtilitySourceCommand.cxx
@@ -54,7 +54,7 @@ bool cmUtilitySourceCommand::InitialPass(std::vector<std::string>& args)
// The first argument is the cache entry name.
std::string cacheEntry = *arg++;
const char* cacheValue =
- cmCacheManager::GetInstance()->GetCacheValue(cacheEntry.c_str());
+ m_Makefile->GetDefinition(cacheEntry.c_str());
// If it exists already, we are done.
// unless this is Major
if(cacheValue &&
@@ -111,20 +111,17 @@ bool cmUtilitySourceCommand::InitialPass(std::vector<std::string>& args)
+utilityName+cmSystemTools::GetExecutableExtension();
// Enter the value into the cache.
- cmCacheManager::GetInstance()->AddCacheEntry(cacheEntry.c_str(),
- utilityExecutable.c_str(),
- "Path to an internal program.",
- cmCacheManager::FILEPATH);
+ m_Makefile->AddCacheDefinition(cacheEntry.c_str(),
+ utilityExecutable.c_str(),
+ "Path to an internal program.",
+ cmCacheManager::FILEPATH);
// add a value into the cache that maps from the
// full path to the name of the project
cmSystemTools::ConvertToUnixSlashes(utilityExecutable);
- cmCacheManager::GetInstance()->AddCacheEntry(utilityExecutable.c_str(),
- utilityName.c_str(),
- "Executable to project name.",
- cmCacheManager::INTERNAL);
-
- // Set the definition in the makefile.
- m_Makefile->AddDefinition(cacheEntry.c_str(), utilityExecutable.c_str());
+ m_Makefile->AddCacheDefinition(utilityExecutable.c_str(),
+ utilityName.c_str(),
+ "Executable to project name.",
+ cmCacheManager::INTERNAL);
return true;
}