mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
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
This commit is contained in:
@@ -50,7 +50,7 @@ bool cmBuildCommand::InitialPass(std::vector<std::string>& args)
|
||||
}
|
||||
const char* define = args[0].c_str();
|
||||
const char* cacheValue
|
||||
= cmCacheManager::GetInstance()->GetCacheValue(define);
|
||||
= m_Makefile->GetDefinition(define);
|
||||
if(cacheValue)
|
||||
{
|
||||
return true;
|
||||
@@ -73,12 +73,11 @@ bool cmBuildCommand::InitialPass(std::vector<std::string>& args)
|
||||
makecommand = makeprogram;
|
||||
makecommand += " -k";
|
||||
}
|
||||
cmCacheManager::GetInstance()->
|
||||
AddCacheEntry(define,
|
||||
makecommand.c_str(),
|
||||
"Command used to build entire project from the command line.",
|
||||
cmCacheManager::STRING);
|
||||
m_Makefile->AddDefinition(define, makecommand.c_str());
|
||||
m_Makefile->AddCacheDefinition(define,
|
||||
makecommand.c_str(),
|
||||
"Command used to build entire project "
|
||||
"from the command line.",
|
||||
cmCacheManager::STRING);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user