1. Added EXCLUDE option to LOAD_CACHE.

2. Entries brought in from another cache are now marked as internal.
This commit is contained in:
Berk Geveci
2001-08-15 13:40:56 -04:00
parent 1cf9a35680
commit 06a0f67f93
3 changed files with 72 additions and 13 deletions
+28 -5
View File
@@ -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;
}