diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-11-26 21:42:00 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2012-11-26 21:52:22 (GMT) |
commit | ee96dc76864b899684d62b51edd87d3083e80168 (patch) | |
tree | 75c8d00dee9cfb81502b350bdb8d9f80935b536f /Source/cmGeneratorExpressionEvaluator.cxx | |
parent | e5748521206e1f240d495d1ec3b2ccd31611f081 (diff) | |
download | CMake-ee96dc76864b899684d62b51edd87d3083e80168.zip CMake-ee96dc76864b899684d62b51edd87d3083e80168.tar.gz CMake-ee96dc76864b899684d62b51edd87d3083e80168.tar.bz2 |
Genex: Extract a method to parse parameters.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 2e123a4..23f641d 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -677,6 +677,23 @@ std::string GeneratorExpressionContent::Evaluate( } std::vector<std::string> parameters; + this->EvaluateParameters(node, identifier, context, dagChecker, parameters); + if (context->HadError) + { + return std::string(); + } + + return node->Evaluate(parameters, context, this, dagChecker); +} + +//---------------------------------------------------------------------------- +std::string GeneratorExpressionContent::EvaluateParameters( + const cmGeneratorExpressionNode *node, + const std::string &identifier, + cmGeneratorExpressionContext *context, + cmGeneratorExpressionDAGChecker *dagChecker, + std::vector<std::string> ¶meters) const +{ { std::vector<std::vector<cmGeneratorExpressionEvaluator*> >::const_iterator pit = this->ParamChildren.begin(); @@ -732,10 +749,8 @@ std::string GeneratorExpressionContent::Evaluate( { reportError(context, this->GetOriginalExpression(), "$<" + identifier + "> expression requires at least one parameter."); - return std::string(); } - - return node->Evaluate(parameters, context, this, dagChecker); + return std::string(); } //---------------------------------------------------------------------------- |