summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-05-30 15:30:24 +0200
committerStephen Kelly <steveire@gmail.com>2013-05-30 15:43:42 +0200
commit3aa9ce441f010362e404e6f9126ecd3028de76b9 (patch)
tree224f50c3a70e92c47cdf0d40ae372cde580e766e /Source/cmGeneratorExpressionEvaluator.cxx
parent0b39fefeac550c8277ebde308fcb9198e43e46a7 (diff)
downloadcmake-3aa9ce441f010362e404e6f9126ecd3028de76b9.tar.gz
GenexEval: Fix evaluation of INCLUDE_DIRECTORIES target property.
This property should come from the content of the property itself, plus the INTERFACE_INCLUDE_DIRECTORIES of the link *implementation*. In contrast, when the INTERFACE_INCLUDE_DIRECTORIES is evaluated for a target, the INTERFACE_INCLUDE_DIRECTORIES of the link *interface* is used. Similar logic applies for the COMPILE_DEFINITIONS target properties. If the propertyName is already an INTERFACE_ variant of the property, ie, the expression is similar to $<TARGET_PROPERTY:foo,INTERFACE_INCLUDE_DIRECTORIES> then the INTERFACE_INCLUDE_DIRECTORIES of the link *interface* of foo is used. However, if the propertyName is not an INTERFACE_ variant, and the interfacePropertyName is, ie, the expression is similar to: $<TARGET_PROPERTY:foo,INCLUDE_DIRECTORIES> then the INTERFACE_INCLUDE_DIRECTORIES of the link *implementation* of foo is used.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index ba74e6047f..de6371a571 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -543,7 +543,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
+ (sizeof(targetPropertyTransitiveWhitelist) /
sizeof(*targetPropertyTransitiveWhitelist));
if (std::find_if(transBegin, transEnd,
- TransitiveWhitelistCompare(interfacePropertyName)) != transEnd)
+ TransitiveWhitelistCompare(propertyName)) != transEnd)
{
const cmTarget::LinkInterface *iface = target->GetLinkInterface(
context->Config,
@@ -556,6 +556,20 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
interfacePropertyName);
}
}
+ else if (std::find_if(transBegin, transEnd,
+ TransitiveWhitelistCompare(interfacePropertyName)) != transEnd)
+ {
+ const cmTarget::LinkImplementation *impl = target->GetLinkImplementation(
+ context->Config,
+ context->HeadTarget);
+ if(impl)
+ {
+ linkedTargetsContent =
+ getLinkedTargetsContent(impl->Libraries, target,
+ context, &dagChecker,
+ interfacePropertyName);
+ }
+ }
linkedTargetsContent =
cmGeneratorExpression::StripEmptyListElements(linkedTargetsContent);