summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPathCommand.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/cmFindPathCommand.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/cmFindPathCommand.cxx')
-rw-r--r--Source/cmFindPathCommand.cxx24
1 files changed, 9 insertions, 15 deletions
diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx
index c1b4935..cd73ea1 100644
--- a/Source/cmFindPathCommand.cxx
+++ b/Source/cmFindPathCommand.cxx
@@ -55,14 +55,9 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string>& args)
std::string helpString = "What is the path where the file ";
helpString += args[1] + " can be found";
const char* cacheValue
- = cmCacheManager::GetInstance()->GetCacheValue(args[0].c_str());
+ = m_Makefile->GetDefinition(args[0].c_str());
if(cacheValue && strcmp(cacheValue, "NOTFOUND"))
{
- m_Makefile->AddDefinition(args[0].c_str(), cacheValue);
- cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(),
- cacheValue,
- helpString.c_str(),
- cmCacheManager::PATH);
return true;
}
@@ -88,19 +83,18 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string>& args)
if(cmSystemTools::FileExists(tryPath.c_str()))
{
path[k] = cmSystemTools::CollapseFullPath(path[k].c_str());
- m_Makefile->AddDefinition(args[0].c_str(), path[k].c_str());
- cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(),
- path[k].c_str(),
- helpString.c_str(),
- cmCacheManager::PATH);
+ m_Makefile->AddCacheDefinition(args[0].c_str(),
+ path[k].c_str(),
+ helpString.c_str(),
+ cmCacheManager::PATH);
return true;
}
}
- cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(),
- "NOTFOUND",
- helpString.c_str(),
- cmCacheManager::PATH);
+ m_Makefile->AddCacheDefinition(args[0].c_str(),
+ "NOTFOUND",
+ helpString.c_str(),
+ cmCacheManager::PATH);
return true;
}