diff options
author | Berk Geveci <berk.geveci@kitware.com> | 2001-08-15 17:40:56 (GMT) |
---|---|---|
committer | Berk Geveci <berk.geveci@kitware.com> | 2001-08-15 17:40:56 (GMT) |
commit | 06a0f67f93435e49d14c45c234a0bf2246b28b83 (patch) | |
tree | df5985b53ece52d974e93a6227c8ac2517de1f64 /Source/cmLoadCacheCommand.cxx | |
parent | 1cf9a35680d64fa30221e35397d9ee5263c3c169 (diff) | |
download | CMake-06a0f67f93435e49d14c45c234a0bf2246b28b83.zip CMake-06a0f67f93435e49d14c45c234a0bf2246b28b83.tar.gz CMake-06a0f67f93435e49d14c45c234a0bf2246b28b83.tar.bz2 |
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.cxx | 33 |
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; } |