summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-03-27 08:46:58 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-02 10:29:33 (GMT)
commit936e00b92c9afe2be6b91d65166ade8ec1e06f48 (patch)
treee574b3da43593cc61bcc5f9c6430658cfebf849f /Source/cmLocalGenerator.cxx
parent358be9b3207ad92a7ce4a5744db6a7265d8a0844 (diff)
downloadCMake-936e00b92c9afe2be6b91d65166ade8ec1e06f48.zip
CMake-936e00b92c9afe2be6b91d65166ade8ec1e06f48.tar.gz
CMake-936e00b92c9afe2be6b91d65166ade8ec1e06f48.tar.bz2
Simplify multiple config handling.
Use conventional pattern of not repeating the loop body for empty config.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx19
1 files changed, 8 insertions, 11 deletions
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);
}
}
}