From d6b394edcb58752cfa3d2a34a81f558676781304 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 8 Oct 2015 00:54:18 +0200 Subject: cmComputeLinkDepends: Port result API to cmGeneratorTarget. --- Source/cmComputeLinkDepends.cxx | 3 ++- Source/cmComputeLinkDepends.h | 4 ++-- Source/cmComputeLinkInformation.cxx | 13 ++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 7d20827..4d7b01e 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -982,6 +982,7 @@ void cmComputeLinkDepends::CheckWrongConfigItem(cmLinkItem const& item) // directories. if(item.Target && !item.Target->IsImported()) { - this->OldWrongConfigItems.insert(item.Target); + this->OldWrongConfigItems.insert( + this->GlobalGenerator->GetGeneratorTarget(item.Target)); } } diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index fc484de..cd067f5 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -52,7 +52,7 @@ public: EntryVector const& Compute(); void SetOldLinkDirMode(bool b); - std::set const& GetOldWrongConfigItems() const + std::set const& GetOldWrongConfigItems() const { return this->OldWrongConfigItems; } private: @@ -150,7 +150,7 @@ private: // Record of the original link line. std::vector OriginalEntries; - std::set OldWrongConfigItems; + std::set OldWrongConfigItems; void CheckWrongConfigItem(cmLinkItem const& item); int ComponentOrderId; diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 988e35a..bfa8c64 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -19,7 +19,6 @@ #include "cmState.h" #include "cmOutputConverter.h" #include "cmMakefile.h" -#include "cmTarget.h" #include "cmGeneratorTarget.h" #include "cmake.h" #include "cmAlgorithms.h" @@ -537,16 +536,16 @@ bool cmComputeLinkInformation::Compute() // For CMake 2.4 bug-compatibility we need to consider the output // directories of targets linked in another configuration as link // directories. - std::set const& wrongItems = cld.GetOldWrongConfigItems(); - for(std::set::const_iterator i = wrongItems.begin(); - i != wrongItems.end(); ++i) + std::set const& wrongItems = + cld.GetOldWrongConfigItems(); + for(std::set::const_iterator i = + wrongItems.begin(); i != wrongItems.end(); ++i) { - cmTarget const* tgt = *i; - cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(tgt); + cmGeneratorTarget const* tgt = *i; bool implib = (this->UseImportLibrary && (tgt->GetType() == cmTarget::SHARED_LIBRARY)); - std::string lib = gtgt->GetFullPath(this->Config , implib, true); + std::string lib = tgt->GetFullPath(this->Config , implib, true); this->OldLinkDirItems.push_back(lib); } } -- cgit v0.12