mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05:00
1. Added EXCLUDE option to LOAD_CACHE.
2. Entries brought in from another cache are now marked as internal.
This commit is contained in:
@@ -21,16 +21,39 @@ bool cmLoadCacheCommand::InitialPass(std::vector<std::string>& args)
|
||||
{
|
||||
if (args.size()< 1)
|
||||
{
|
||||
this->SetError("called with wrong number of arguments.");
|
||||
this->SetError("called with wrong number of arguments.");
|
||||
}
|
||||
|
||||
for( unsigned int i=0; i< args.size(); i++)
|
||||
bool excludeFiles=false;
|
||||
unsigned int excludeIndex=0;
|
||||
unsigned int i;
|
||||
std::set<std::string> excludes;
|
||||
|
||||
for(i=0; i<args.size(); i++)
|
||||
{
|
||||
m_Makefile->ExpandVariablesInString( args[i]);
|
||||
cmCacheManager::GetInstance()->LoadCache(args[i].c_str(),false);
|
||||
cmCacheManager::GetInstance()->DefineCache(m_Makefile);
|
||||
if (excludeFiles)
|
||||
{
|
||||
m_Makefile->ExpandVariablesInString(args[i]);
|
||||
excludes.insert(args[i]);
|
||||
}
|
||||
if (args[i] == "EXCLUDE")
|
||||
{
|
||||
excludeFiles=true;
|
||||
}
|
||||
}
|
||||
|
||||
for(i=0; i<args.size(); i++)
|
||||
{
|
||||
if (args[i] == "EXCLUDE")
|
||||
{
|
||||
break;
|
||||
}
|
||||
m_Makefile->ExpandVariablesInString(args[i]);
|
||||
cmCacheManager::GetInstance()->LoadCache(args[i].c_str(),false,excludes);
|
||||
cmCacheManager::GetInstance()->DefineCache(m_Makefile);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user