summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2019-05-29 18:49:36 (GMT)
committerBrad King <brad.king@kitware.com>2019-06-03 14:20:22 (GMT)
commit2d4787fc4ddc077e1d8fcb807768d1ecc7902a73 (patch)
tree39ebe9da9d8349756c89f08d50e9f44f1ffb4107 /Source/cmGeneratorExpressionEvaluator.cxx
parent5e2d22c177add56b2538ab10954dfb049c5cf945 (diff)
downloadCMake-2d4787fc4ddc077e1d8fcb807768d1ecc7902a73.zip
CMake-2d4787fc4ddc077e1d8fcb807768d1ecc7902a73.tar.gz
CMake-2d4787fc4ddc077e1d8fcb807768d1ecc7902a73.tar.bz2
Genex: Add more extensive support for an unbounded number of parameters
Previously genex support for unbounded number of parameters required at least 1 parameter. We now support zero or more parameters, and two or more parameters.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 268de6f..7442018 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -166,9 +166,13 @@ std::string GeneratorExpressionContent::EvaluateParameters(
reportError(context, this->GetOriginalExpression(),
"$<" + identifier +
"> expression requires at least one parameter.");
- }
- if (numExpected == cmGeneratorExpressionNode::OneOrZeroParameters &&
- parameters.size() > 1) {
+ } else if (numExpected == cmGeneratorExpressionNode::TwoOrMoreParameters &&
+ parameters.size() < 2) {
+ reportError(context, this->GetOriginalExpression(),
+ "$<" + identifier +
+ "> expression requires at least two parameters.");
+ } else if (numExpected == cmGeneratorExpressionNode::OneOrZeroParameters &&
+ parameters.size() > 1) {
reportError(context, this->GetOriginalExpression(),
"$<" + identifier +
"> expression requires one or zero parameters.");