summaryrefslogtreecommitdiffstats
path: root/Source/cmLoadCacheCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLoadCacheCommand.cxx')
-rw-r--r--Source/cmLoadCacheCommand.cxx33
1 files changed, 28 insertions, 5 deletions
diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx
index 3c2c0f1..09e0480 100644
--- a/Source/cmLoadCacheCommand.cxx
+++ b/Source/cmLoadCacheCommand.cxx
@@ -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;
}