From 383bfd95432990365ac5c7fc3ab190bfb05cbec1 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 25 Oct 2015 11:49:03 +0100 Subject: [PATCH] cmTargetCollectLinkLanguages: Remove cmMakefile dependency --- Source/cmGeneratorTarget.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index e19d5e5c4..9376e98ae 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1793,7 +1793,7 @@ public: UNORDERED_SET& languages, cmGeneratorTarget const* head): Config(config), Languages(languages), HeadTarget(head), - Makefile(target->Target->GetMakefile()), Target(target) + Target(target) { this->Visited.insert(target); } void Visit(cmLinkItem const& item) @@ -1805,7 +1805,8 @@ public: bool noMessage = false; cmake::MessageType messageType = cmake::FATAL_ERROR; std::stringstream e; - switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0028)) + switch(this->Target->GetLocalGenerator() + ->GetPolicyStatus(cmPolicies::CMP0028)) { case cmPolicies::WARN: { @@ -1859,7 +1860,6 @@ private: std::string Config; UNORDERED_SET& Languages; cmGeneratorTarget const* HeadTarget; - cmMakefile* Makefile; const cmGeneratorTarget* Target; std::set Visited; };