diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-03-27 09:46:58 +0100 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-04-02 12:29:33 +0200 |
commit | 936e00b92c9afe2be6b91d65166ade8ec1e06f48 (patch) | |
tree | e574b3da43593cc61bcc5f9c6430658cfebf849f /Source/cmGeneratorExpressionEvaluationFile.cxx | |
parent | 358be9b3207ad92a7ce4a5744db6a7265d8a0844 (diff) | |
download | cmake-936e00b92c9afe2be6b91d65166ade8ec1e06f48.tar.gz |
Simplify multiple config handling.
Use conventional pattern of not repeating the loop body for empty
config.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluationFile.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluationFile.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx index d41285da14..95a946a823 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; } } } |