summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx11
-rw-r--r--Source/cmTarget.cxx16
-rw-r--r--Source/cmTarget.h3
3 files changed, 25 insertions, 5 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 05bbc1c..e2af131 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -900,13 +900,14 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
if (std::find_if(transBegin, transEnd,
TransitiveWhitelistCompare(propertyName)) != transEnd)
{
- const cmTarget::LinkInterface *iface = target->GetLinkInterface(
- context->Config,
- headTarget);
- if(iface)
+
+ std::vector<std::string> libs;
+ target->GetTransitivePropertyLinkLibraries(context->Config,
+ headTarget, libs);
+ if (!libs.empty())
{
linkedTargetsContent =
- getLinkedTargetsContent(iface->Libraries, target,
+ getLinkedTargetsContent(libs, target,
headTarget,
context, &dagChecker,
interfacePropertyName);
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index a90fa74..f7424a7 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -6002,6 +6002,22 @@ cmTarget::LinkInterface const* cmTarget::GetLinkInterface(const char* config,
}
//----------------------------------------------------------------------------
+void cmTarget::GetTransitivePropertyLinkLibraries(
+ const char* config,
+ cmTarget *headTarget,
+ std::vector<std::string> &libs)
+{
+ cmTarget::LinkInterface const* iface = this->GetLinkInterface(config,
+ headTarget);
+ if (!iface)
+ {
+ return;
+ }
+
+ libs = iface->Libraries;
+}
+
+//----------------------------------------------------------------------------
bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
cmTarget *headTarget)
{
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 3bc0ab2..dd28405 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -276,6 +276,9 @@ public:
if the target cannot be linked. */
LinkInterface const* GetLinkInterface(const char* config,
cmTarget *headTarget);
+ void GetTransitivePropertyLinkLibraries(const char* config,
+ cmTarget *headTarget,
+ std::vector<std::string> &libs);
/** The link implementation specifies the direct library
dependencies needed by the object files of the target. */