summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionNode.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2020-07-18 09:51:38 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2020-07-21 13:08:28 (GMT)
commitaf1a4f52be86c0054006ad98a64316b5531e1bf4 (patch)
treefab6b0e49f6a785fefa784086d4c820fee342430 /Source/cmGeneratorExpressionNode.cxx
parent79cba639e88fcdbd3c21c6d3c7f087234873154a (diff)
downloadCMake-af1a4f52be86c0054006ad98a64316b5531e1bf4.zip
CMake-af1a4f52be86c0054006ad98a64316b5531e1bf4.tar.gz
CMake-af1a4f52be86c0054006ad98a64316b5531e1bf4.tar.bz2
Genex: $<TARGET_PROPERTY> strip emtpy list elements for predefined properties
Fixes: #20951
Diffstat (limited to 'Source/cmGeneratorExpressionNode.cxx')
-rw-r--r--Source/cmGeneratorExpressionNode.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index a1a0ae8..fdc8f29 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -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()) {