summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.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/cmCacheManager.cxx
parent06a0f67f93435e49d14c45c234a0bf2246b28b83 (diff)
downloadCMake-3b9f97f32d019520c372551ab4c6a321cb560094.zip
CMake-3b9f97f32d019520c372551ab4c6a321cb560094.tar.gz
CMake-3b9f97f32d019520c372551ab4c6a321cb560094.tar.bz2
Adding new options to LoadCache.
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r--Source/cmCacheManager.cxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 7c01fe2..46e0ea2 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -111,12 +111,13 @@ bool cmCacheManager::LoadCache(const char* path,
bool internal)
{
std::set<std::string> emptySet;
- return this->LoadCache(path, internal, emptySet);
+ return this->LoadCache(path, internal, emptySet, emptySet);
}
bool cmCacheManager::LoadCache(const char* path,
bool internal,
- std::set<std::string>& excludes)
+ std::set<std::string>& excludes,
+ std::set<std::string>& includes)
{
std::string cacheFile = path;
cacheFile += "/CMakeCache.txt";
@@ -164,8 +165,12 @@ bool cmCacheManager::LoadCache(const char* path,
if ( excludes.find(entryKey) == excludes.end() )
{
e.m_Type = cmCacheManager::StringToType(regQuoted.match(2).c_str());
- // only load internal values if internal is set
- if (internal || e.m_Type != INTERNAL)
+ // Load internal values if internal is set.
+ // If the entry is not internal to the cache being loaded
+ // or if it is in the list of internal entries to be
+ // imported, load it.
+ if ( internal || (e.m_Type != INTERNAL) ||
+ (includes.find(entryKey) != includes.end()) )
{
// If we are loading the cache from another project,
// make all loaded entries internal so that it is
@@ -186,7 +191,12 @@ bool cmCacheManager::LoadCache(const char* path,
{
e.m_Type = cmCacheManager::StringToType(reg.match(2).c_str());
// only load internal values if internal is set
- if (internal || e.m_Type != INTERNAL)
+ // Load internal values if internal is set.
+ // If the entry is not internal to the cache being loaded
+ // or if it is in the list of internal entries to be
+ // imported, load it.
+ if ( internal || (e.m_Type != INTERNAL) ||
+ (includes.find(entryKey) != includes.end()) )
{
// If we are loading the cache from another project,
// make all loaded entries internal so that it is