summaryrefslogtreecommitdiffstats
path: root/Source/cmLoadCacheCommand.cxx
diff options
context:
space:
mode:
authorBerk Geveci <berk.geveci@kitware.com>2001-08-16 15:41:44 (GMT)
committerBerk Geveci <berk.geveci@kitware.com>2001-08-16 15:41:44 (GMT)
commit3b9f97f32d019520c372551ab4c6a321cb560094 (patch)
tree2a365aa2b73ea78499bee77b045e93d58adfb52c /Source/cmLoadCacheCommand.cxx
parent06a0f67f93435e49d14c45c234a0bf2246b28b83 (diff)
downloadCMake-3b9f97f32d019520c372551ab4c6a321cb560094.zip
CMake-3b9f97f32d019520c372551ab4c6a321cb560094.tar.gz
CMake-3b9f97f32d019520c372551ab4c6a321cb560094.tar.bz2
Adding new options to LoadCache.
Diffstat (limited to 'Source/cmLoadCacheCommand.cxx')
-rw-r--r--Source/cmLoadCacheCommand.cxx36
1 files changed, 33 insertions, 3 deletions
diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx
index 09e0480..93afbd6 100644
--- a/Source/cmLoadCacheCommand.cxx
+++ b/Source/cmLoadCacheCommand.cxx
@@ -24,8 +24,10 @@ bool cmLoadCacheCommand::InitialPass(std::vector<std::string>& args)
this->SetError("called with wrong number of arguments.");
}
+ // Cache entries to be excluded from the import list.
+ // If this set is empty, all cache entries are brought in
+ // and they can not be overridden.
bool excludeFiles=false;
- unsigned int excludeIndex=0;
unsigned int i;
std::set<std::string> excludes;
@@ -40,16 +42,44 @@ bool cmLoadCacheCommand::InitialPass(std::vector<std::string>& args)
{
excludeFiles=true;
}
+ if (excludeFiles && (args[i] == "INCLUDE_INTERNALS"))
+ {
+ break;
+ }
}
+ // Internal cache entries to be imported.
+ // If this set is empty, no internal cache entries are
+ // brought in.
+ bool includeFiles=false;
+ std::set<std::string> includes;
+
for(i=0; i<args.size(); i++)
{
- if (args[i] == "EXCLUDE")
+ if (includeFiles)
+ {
+ m_Makefile->ExpandVariablesInString(args[i]);
+ includes.insert(args[i]);
+ }
+ if (args[i] == "INCLUDE_INTERNALS")
+ {
+ includeFiles=true;
+ }
+ if (includeFiles && (args[i] == "EXCLUDE"))
+ {
+ break;
+ }
+ }
+
+ for(i=0; i<args.size(); i++)
+ {
+ if ((args[i] == "EXCLUDE") || (args[i] == "INCLUDE_INTERNALS"))
{
break;
}
m_Makefile->ExpandVariablesInString(args[i]);
- cmCacheManager::GetInstance()->LoadCache(args[i].c_str(),false,excludes);
+ cmCacheManager::GetInstance()->LoadCache(args[i].c_str(), false,
+ excludes, includes);
cmCacheManager::GetInstance()->DefineCache(m_Makefile);
}