summaryrefslogtreecommitdiff
path: root/Source/cmLoadCacheCommand.cxx
diff options
context:
space:
mode:
authorBerk Geveci <berk.geveci@kitware.com>2001-08-15 13:40:56 -0400
committerBerk Geveci <berk.geveci@kitware.com>2001-08-15 13:40:56 -0400
commit06a0f67f93435e49d14c45c234a0bf2246b28b83 (patch)
treedf5985b53ece52d974e93a6227c8ac2517de1f64 /Source/cmLoadCacheCommand.cxx
parent1cf9a35680d64fa30221e35397d9ee5263c3c169 (diff)
downloadcmake-06a0f67f93435e49d14c45c234a0bf2246b28b83.tar.gz
1. Added EXCLUDE option to LOAD_CACHE.
2. Entries brought in from another cache are now marked as internal.
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 3c2c0f129b..09e0480386 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;
}