summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-11-26 21:42:00 (GMT)
committerStephen Kelly <steveire@gmail.com>2012-11-26 21:52:22 (GMT)
commitee96dc76864b899684d62b51edd87d3083e80168 (patch)
tree75c8d00dee9cfb81502b350bdb8d9f80935b536f /Source/cmGeneratorExpressionEvaluator.cxx
parente5748521206e1f240d495d1ec3b2ccd31611f081 (diff)
downloadCMake-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.cxx21
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> &parameters) 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();
}
//----------------------------------------------------------------------------