diff options
author | Brad King <brad.king@kitware.com> | 2014-04-03 16:51:42 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-04-03 16:51:42 (GMT) |
commit | 3e87d7cbd0e0ee57ea88539ba759cb3362fc235a (patch) | |
tree | 23ff40e4c3ef35b8ea948127eeda6f9cf4e56b84 | |
parent | 8acd2b3ab432557d29ab30cb302e79f89ef22076 (diff) | |
parent | 936e00b92c9afe2be6b91d65166ade8ec1e06f48 (diff) | |
download | CMake-3e87d7cbd0e0ee57ea88539ba759cb3362fc235a.zip CMake-3e87d7cbd0e0ee57ea88539ba759cb3362fc235a.tar.gz CMake-3e87d7cbd0e0ee57ea88539ba759cb3362fc235a.tar.bz2 |
Merge topic 'simplify-multi-config'
936e00b9 Simplify multiple config handling.
-rw-r--r-- | Source/cmExportCommand.cxx | 15 | ||||
-rw-r--r-- | Source/cmGeneratorExpressionEvaluationFile.cxx | 15 | ||||
-rw-r--r-- | Source/cmLocalGenerator.cxx | 19 |
3 files changed, 20 insertions, 29 deletions
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index dcb77ba..2536ada 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -223,18 +223,15 @@ bool cmExportCommand // Compute the set of configurations exported. std::vector<std::string> configurationTypes; this->Makefile->GetConfigurations(configurationTypes); - if(!configurationTypes.empty()) + if(configurationTypes.empty()) { - for(std::vector<std::string>::const_iterator - ci = configurationTypes.begin(); - ci != configurationTypes.end(); ++ci) - { - ebfg->AddConfiguration(*ci); - } + configurationTypes.push_back(""); } - else + for(std::vector<std::string>::const_iterator + ci = configurationTypes.begin(); + ci != configurationTypes.end(); ++ci) { - ebfg->AddConfiguration(""); + ebfg->AddConfiguration(*ci); } if (this->ExportSet) { diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx index d41285d..95a946a 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.cxx +++ b/Source/cmGeneratorExpressionEvaluationFile.cxx @@ -135,18 +135,15 @@ void cmGeneratorExpressionEvaluationFile::Generate() if (allConfigs.empty()) { - this->Generate("", inputExpression.get(), outputFiles); + allConfigs.push_back(""); } - else + for(std::vector<std::string>::const_iterator li = allConfigs.begin(); + li != allConfigs.end(); ++li) { - for(std::vector<std::string>::const_iterator li = allConfigs.begin(); - li != allConfigs.end(); ++li) + this->Generate(*li, inputExpression.get(), outputFiles); + if(cmSystemTools::GetFatalErrorOccured()) { - this->Generate(*li, inputExpression.get(), outputFiles); - if(cmSystemTools::GetFatalErrorOccured()) - { - return; - } + return; } } } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index c47147c..9cafed1 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -542,6 +542,10 @@ void cmLocalGenerator::GenerateTargetManifest() // Collect the set of configuration types. std::vector<std::string> configNames; this->Makefile->GetConfigurations(configNames); + if(configNames.empty()) + { + configNames.push_back(""); + } // Add our targets to the manifest for each configuration. cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets(); @@ -557,18 +561,11 @@ void cmLocalGenerator::GenerateTargetManifest() { continue; } - if(configNames.empty()) + for(std::vector<std::string>::iterator ci = configNames.begin(); + ci != configNames.end(); ++ci) { - target.GenerateTargetManifest(""); - } - else - { - for(std::vector<std::string>::iterator ci = configNames.begin(); - ci != configNames.end(); ++ci) - { - const char* config = ci->c_str(); - target.GenerateTargetManifest(config); - } + const char* config = ci->c_str(); + target.GenerateTargetManifest(config); } } } |