summaryrefslogtreecommitdiffstats
path: root/Source/cmSiteNameCommand.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/cmSiteNameCommand.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/cmSiteNameCommand.cxx')
-rw-r--r--Source/cmSiteNameCommand.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx
index fe81cd7..da69ec1 100644
--- a/Source/cmSiteNameCommand.cxx
+++ b/Source/cmSiteNameCommand.cxx
@@ -49,19 +49,19 @@ bool cmSiteNameCommand::InitialPass(std::vector<std::string>& args)
return false;
}
const char* cacheValue
- = cmCacheManager::GetInstance()->GetCacheValue("SITE");
+ = m_Makefile->GetDefinition("SITE");
if(cacheValue)
{
m_Makefile->AddDefinition("SITE", cacheValue);
return true;
}
- const char* hostname = cmCacheManager::GetInstance()->GetCacheValue("HOSTNAME");
+ const char* hostname = m_Makefile->GetDefinition("HOSTNAME");
if(!hostname)
{
hostname = "hostname";
}
- const char* nslookup = cmCacheManager::GetInstance()->GetCacheValue("NSLOOKUP");
+ const char* nslookup = m_Makefile->GetDefinition("NSLOOKUP");
if(!nslookup)
{
nslookup = "nslookup";
@@ -101,13 +101,12 @@ bool cmSiteNameCommand::InitialPass(std::vector<std::string>& args)
}
}
- cmCacheManager::GetInstance()->
- AddCacheEntry("SITE",
- siteName.c_str(),
- "Name of the computer/site where compile is being run",
- cmCacheManager::STRING);
+ m_Makefile->
+ AddCacheDefinition("SITE",
+ siteName.c_str(),
+ "Name of the computer/site where compile is being run",
+ cmCacheManager::STRING);
- m_Makefile->AddDefinition("SITE", siteName.c_str());
return true;
}