Make it possible for any genex to have arbitrary content at the end.
This commit is contained in:
parent
bd638ee20f
commit
96ec3147bb
|
@ -1119,12 +1119,15 @@ std::string GeneratorExpressionContent::EvaluateParameters(
|
||||||
cmGeneratorExpressionDAGChecker *dagChecker,
|
cmGeneratorExpressionDAGChecker *dagChecker,
|
||||||
std::vector<std::string> ¶meters) const
|
std::vector<std::string> ¶meters) const
|
||||||
{
|
{
|
||||||
|
const int numExpected = node->NumExpectedParameters();
|
||||||
{
|
{
|
||||||
std::vector<std::vector<cmGeneratorExpressionEvaluator*> >::const_iterator
|
std::vector<std::vector<cmGeneratorExpressionEvaluator*> >::const_iterator
|
||||||
pit = this->ParamChildren.begin();
|
pit = this->ParamChildren.begin();
|
||||||
const
|
const
|
||||||
std::vector<std::vector<cmGeneratorExpressionEvaluator*> >::const_iterator
|
std::vector<std::vector<cmGeneratorExpressionEvaluator*> >::const_iterator
|
||||||
pend = this->ParamChildren.end();
|
pend = this->ParamChildren.end();
|
||||||
|
const bool acceptsArbitraryContent
|
||||||
|
= node->AcceptsArbitraryContentParameter();
|
||||||
for ( ; pit != pend; ++pit)
|
for ( ; pit != pend; ++pit)
|
||||||
{
|
{
|
||||||
std::string parameter;
|
std::string parameter;
|
||||||
|
@ -1141,10 +1144,20 @@ std::string GeneratorExpressionContent::EvaluateParameters(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
parameters.push_back(parameter);
|
parameters.push_back(parameter);
|
||||||
|
if (acceptsArbitraryContent
|
||||||
|
&& parameters.size() == (unsigned int)numExpected - 1)
|
||||||
|
{
|
||||||
|
assert(pit != pend);
|
||||||
|
std::string lastParam = this->ProcessArbitraryContent(node, identifier,
|
||||||
|
context,
|
||||||
|
dagChecker,
|
||||||
|
pit + 1);
|
||||||
|
parameters.push_back(lastParam);
|
||||||
|
return std::string();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int numExpected = node->NumExpectedParameters();
|
|
||||||
if ((numExpected != -1 && (unsigned int)numExpected != parameters.size()))
|
if ((numExpected != -1 && (unsigned int)numExpected != parameters.size()))
|
||||||
{
|
{
|
||||||
if (numExpected == 0)
|
if (numExpected == 0)
|
||||||
|
|
Loading…
Reference in New Issue