|
|
@@ -126,6 +126,9 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
|
|
|
std::vector<std::vector<cmGeneratorExpressionToken>::const_iterator>
|
|
|
commaTokens;
|
|
|
std::vector<cmGeneratorExpressionToken>::const_iterator colonToken;
|
|
|
+
|
|
|
+ bool emptyParamTermination = false;
|
|
|
+
|
|
|
if (this->it != this->Tokens.end() &&
|
|
|
this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator)
|
|
|
{
|
|
|
@@ -133,6 +136,10 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
|
|
|
parameters.resize(parameters.size() + 1);
|
|
|
assert(this->it != this->Tokens.end());
|
|
|
++this->it;
|
|
|
+ if(this->it == this->Tokens.end())
|
|
|
+ {
|
|
|
+ emptyParamTermination = true;
|
|
|
+ }
|
|
|
|
|
|
while (this->it != this->Tokens.end() &&
|
|
|
this->it->TokenType == cmGeneratorExpressionToken::CommaSeparator)
|
|
|
@@ -141,6 +148,10 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
|
|
|
parameters.resize(parameters.size() + 1);
|
|
|
assert(this->it != this->Tokens.end());
|
|
|
++this->it;
|
|
|
+ if(this->it == this->Tokens.end())
|
|
|
+ {
|
|
|
+ emptyParamTermination = true;
|
|
|
+ }
|
|
|
}
|
|
|
while (this->it != this->Tokens.end() &&
|
|
|
this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator)
|
|
|
@@ -164,6 +175,10 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
|
|
|
parameters.resize(parameters.size() + 1);
|
|
|
assert(this->it != this->Tokens.end());
|
|
|
++this->it;
|
|
|
+ if(this->it == this->Tokens.end())
|
|
|
+ {
|
|
|
+ emptyParamTermination = true;
|
|
|
+ }
|
|
|
}
|
|
|
while (this->it != this->Tokens.end() &&
|
|
|
this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator)
|
|
|
@@ -203,7 +218,10 @@ void cmGeneratorExpressionParser::ParseGeneratorExpression(
|
|
|
assert(parameters.size() > commaTokens.size());
|
|
|
for ( ; pit != pend; ++pit, ++commaIt)
|
|
|
{
|
|
|
- extendResult(result, *pit);
|
|
|
+ if (!pit->empty() && !emptyParamTermination)
|
|
|
+ {
|
|
|
+ extendResult(result, *pit);
|
|
|
+ }
|
|
|
if (commaIt != commaTokens.end())
|
|
|
{
|
|
|
extendText(result, *commaIt);
|