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/cmFindProgramCommand.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/cmFindProgramCommand.cxx')
-rw-r--r-- | Source/cmFindProgramCommand.cxx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx index cf66aee..d40d7f9 100644 --- a/Source/cmFindProgramCommand.cxx +++ b/Source/cmFindProgramCommand.cxx @@ -59,10 +59,9 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string>& args) // Now check and see if the value has been stored in the cache // already, if so use that value and don't look for the program const char* cacheValue - = cmCacheManager::GetInstance()->GetCacheValue(define); + = m_Makefile->GetDefinition(define); if(cacheValue && strcmp(cacheValue, "NOTFOUND")) { - m_Makefile->AddDefinition(define, cacheValue); return true; } std::vector<std::string> path; @@ -120,18 +119,18 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string>& args) if(result != "") { // Save the value in the cache - cmCacheManager::GetInstance()->AddCacheEntry(define, - result.c_str(), - "Path to a program.", - cmCacheManager::FILEPATH); - m_Makefile->AddDefinition(define, result.c_str()); + m_Makefile->AddCacheDefinition(define, + result.c_str(), + "Path to a program.", + cmCacheManager::FILEPATH); + return true; } } - cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(), - "NOTFOUND", - "Path to a program", - cmCacheManager::FILEPATH); + m_Makefile->AddCacheDefinition(args[0].c_str(), + "NOTFOUND", + "Path to a program", + cmCacheManager::FILEPATH); return true; } |