summaryrefslogtreecommitdiff
path: root/Source/cmSiteNameCommand.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-08-08 11:54:46 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2001-08-08 11:54:46 -0400
commitdb1303aa7d00f49a0fdf66f120eb3e6cb0e445fe (patch)
treead569e72f02849e50e625faa1350bb05a3af08f9 /Source/cmSiteNameCommand.cxx
parent61ec323b6a1c4e5a44331014447e3d1d31dc1b6b (diff)
downloadcmake-db1303aa7d00f49a0fdf66f120eb3e6cb0e445fe.tar.gz
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 fe81cd73cb..da69ec1177 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;
}