Genex: $<TARGET_PROPERTY> strip emtpy list elements for predefined properties

Fixes: #20951
This commit is contained in:
Marc Chevrier
2020-07-18 11:51:38 +02:00
parent 79cba639e8
commit af1a4f52be
4 changed files with 31 additions and 7 deletions
+6 -4
View File
@@ -1476,8 +1476,9 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
}
if (isInterfaceProperty) {
return target->EvaluateInterfaceProperty(propertyName, context,
dagCheckerParent);
return cmGeneratorExpression::StripEmptyListElements(
target->EvaluateInterfaceProperty(propertyName, context,
dagCheckerParent));
}
cmGeneratorExpressionDAGChecker dagChecker(
@@ -1563,8 +1564,9 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
}
if (!interfacePropertyName.empty()) {
result = this->EvaluateDependentExpression(result, context->LG, context,
target, &dagChecker, target);
result = cmGeneratorExpression::StripEmptyListElements(
this->EvaluateDependentExpression(result, context->LG, context, target,
&dagChecker, target));
std::string linkedTargetsContent = getLinkedTargetsContent(
target, interfacePropertyName, context, &dagChecker);
if (!linkedTargetsContent.empty()) {