From f539da126b55933fae6f40feea35e820cb632877 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 16 Sep 2015 04:45:43 +0200 Subject: cmGeneratorTarget: Port GetLinkInterfaceLibraries away from cmTarget. --- Source/cmGeneratorExpressionNode.cxx | 5 ++++- Source/cmGeneratorTarget.cxx | 10 +++++----- Source/cmGeneratorTarget.h | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index fdacc82ed8..78a5b6f781 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1109,8 +1109,11 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode if(isInterfaceProperty) { + cmGeneratorTarget* gHeadTarget = + context->Makefile->GetGlobalGenerator() + ->GetGeneratorTarget(headTarget); if(cmLinkInterfaceLibraries const* iface = - gtgt->GetLinkInterfaceLibraries(context->Config, headTarget, true)) + gtgt->GetLinkInterfaceLibraries(context->Config, gHeadTarget, true)) { linkedTargetsContent = getLinkedTargetsContent(iface->Libraries, target, diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 71506d1da9..99d10133c5 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -2058,7 +2058,7 @@ void processILibs(const std::string& config, tgts.push_back(item.Target); cmGeneratorTarget* gt = gg->GetGeneratorTarget(item.Target); if(cmLinkInterfaceLibraries const* iface = - gt->GetLinkInterfaceLibraries(config, headTarget->Target, true)) + gt->GetLinkInterfaceLibraries(config, headTarget, true)) { for(std::vector::const_iterator it = iface->Libraries.begin(); @@ -4592,13 +4592,13 @@ void cmGeneratorTarget::ComputeLinkInterface(const std::string& config, //---------------------------------------------------------------------------- const cmLinkInterfaceLibraries * cmGeneratorTarget::GetLinkInterfaceLibraries(const std::string& config, - cmTarget const* head, + cmGeneratorTarget const* head, bool usage_requirements_only) const { // Imported targets have their own link interface. if(this->IsImported()) { - return this->GetImportLinkInterface(config, head, + return this->GetImportLinkInterface(config, head->Target, usage_requirements_only); } @@ -4624,12 +4624,12 @@ cmGeneratorTarget::GetLinkInterfaceLibraries(const std::string& config, return &hm.begin()->second; } - cmOptionalLinkInterface& iface = hm[head]; + cmOptionalLinkInterface& iface = hm[head->Target]; if(!iface.LibrariesDone) { iface.LibrariesDone = true; this->ComputeLinkInterfaceLibraries( - config, iface, head, usage_requirements_only); + config, iface, head->Target, usage_requirements_only); } return iface.Exists? &iface : 0; diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 49de6324e4..c36117d0ec 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -116,7 +116,7 @@ public: cmLinkInterfaceLibraries const* GetLinkInterfaceLibraries(const std::string& config, - cmTarget const* headTarget, + const cmGeneratorTarget* headTarget, bool usage_requirements_only) const; void ComputeLinkInterfaceLibraries(const std::string& config, -- cgit v1.2.1