summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-11-26 21:43:13 (GMT)
committerBrad King <brad.king@kitware.com>2012-11-27 14:12:39 (GMT)
commit07749e3705cfc0105399c4a7a8349ec9f83ba39c (patch)
tree204a97eccfbf03864d61459876ee301dbdb40010 /Source/cmGeneratorExpressionEvaluator.cxx
parentee96dc76864b899684d62b51edd87d3083e80168 (diff)
downloadCMake-07749e3705cfc0105399c4a7a8349ec9f83ba39c.zip
CMake-07749e3705cfc0105399c4a7a8349ec9f83ba39c.tar.gz
CMake-07749e3705cfc0105399c4a7a8349ec9f83ba39c.tar.bz2
Genex: Ensure that $<0:...> has a parameter.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 23f641d..3c2f7c5 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -66,6 +66,8 @@ static const struct ZeroNode : public cmGeneratorExpressionNode
virtual bool GeneratesContent() const { return false; }
+ virtual bool AcceptsSingleArbitraryContentParameter() const { return true; }
+
std::string Evaluate(const std::vector<std::string> &,
cmGeneratorExpressionContext *,
const GeneratorExpressionContent *,
@@ -642,6 +644,20 @@ std::string GeneratorExpressionContent::Evaluate(
if (!node->GeneratesContent())
{
+ if (node->AcceptsSingleArbitraryContentParameter())
+ {
+ if (this->ParamChildren.empty())
+ {
+ reportError(context, this->GetOriginalExpression(),
+ "$<" + identifier + "> expression requires a parameter.");
+ }
+ }
+ else
+ {
+ std::vector<std::string> parameters;
+ this->EvaluateParameters(node, identifier, context, dagChecker,
+ parameters);
+ }
return std::string();
}