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/cmFindFileCommand.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/cmFindFileCommand.cxx')
-rw-r--r-- | Source/cmFindFileCommand.cxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Source/cmFindFileCommand.cxx b/Source/cmFindFileCommand.cxx index 4bb76e4..80bc161 100644 --- a/Source/cmFindFileCommand.cxx +++ b/Source/cmFindFileCommand.cxx @@ -62,15 +62,9 @@ bool cmFindFileCommand::InitialPass(std::vector<std::string>& args) std::string helpString = "Where can the "; helpString += args[1] + " file be found"; const char* cacheValue - = cmCacheManager::GetInstance()->GetCacheValue(define); + = m_Makefile->GetDefinition(define); if(cacheValue && strcmp(cacheValue, "NOTFOUND")) { - m_Makefile->AddDefinition(define, cacheValue); - // update help string if changed - cmCacheManager::GetInstance()->AddCacheEntry(define, - cacheValue, - helpString.c_str(), - cmCacheManager::FILEPATH); return true; } // if it is not in the cache, then search the system path @@ -95,11 +89,10 @@ bool cmFindFileCommand::InitialPass(std::vector<std::string>& args) if(cmSystemTools::FileExists(tryPath.c_str())) { // Save the value in the cache - m_Makefile->AddDefinition(define, tryPath.c_str()); - cmCacheManager::GetInstance()->AddCacheEntry(define, - tryPath.c_str(), - helpString.c_str(), - cmCacheManager::FILEPATH); + m_Makefile->AddCacheDefinition(define, + tryPath.c_str(), + helpString.c_str(), + cmCacheManager::FILEPATH); return true; } } |