From f5c18c9c1c0434f3481b1684af5fe6e0ea823f87 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 16 Jun 2014 14:12:18 -0400 Subject: [PATCH] cmTarget: Drop GetDirectLinkLibraries methods Inline the implementation in the last remaining caller and drop the methods. --- Source/cmTarget.cxx | 69 ++++++++++++++++++--------------------------- Source/cmTarget.h | 5 ---- 2 files changed, 27 insertions(+), 47 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index f4a0224d8..71d03df14 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1226,47 +1226,6 @@ bool cmTarget::NameResolvesToFramework(const std::string& libname) const NameResolvesToFramework(libname); } -//---------------------------------------------------------------------------- -void cmTarget::GetDirectLinkLibraries(const std::string& config, - std::vector &libs) const -{ - this->GetDirectLinkLibrariesInternal(config, libs, this); -} - -//---------------------------------------------------------------------------- -void cmTarget::GetDirectLinkLibrariesInternal(const std::string& config, - std::vector &libs, - cmTarget const* head) const -{ - const char *prop = this->GetProperty("LINK_LIBRARIES"); - if (prop) - { - cmGeneratorExpression ge; - const cmsys::auto_ptr cge = ge.Parse(prop); - - cmGeneratorExpressionDAGChecker dagChecker( - this->GetName(), - "LINK_LIBRARIES", 0, 0); - cmSystemTools::ExpandListArgument(cge->Evaluate(this->Makefile, - config, - false, - head, - &dagChecker), - libs); - - std::set const& seenProps = cge->GetSeenTargetProperties(); - for (std::set::const_iterator it = seenProps.begin(); - it != seenProps.end(); ++it) - { - if (!this->GetProperty(*it)) - { - this->LinkImplicitNullProperties.insert(*it); - } - } - cge->GetMaxLanguageStandard(this, this->MaxLanguageStandards); - } -} - //---------------------------------------------------------------------------- std::string cmTarget::GetDebugGeneratorExpressions(const std::string &value, cmTarget::LinkLibraryType llt) const @@ -6634,7 +6593,33 @@ void cmTarget::ComputeLinkImplementation(const std::string& config, { // Collect libraries directly linked in this configuration. std::vector llibs; - this->GetDirectLinkLibrariesInternal(config, llibs, head); + if(const char *prop = this->GetProperty("LINK_LIBRARIES")) + { + cmGeneratorExpression ge; + const cmsys::auto_ptr cge = ge.Parse(prop); + + cmGeneratorExpressionDAGChecker dagChecker( + this->GetName(), + "LINK_LIBRARIES", 0, 0); + cmSystemTools::ExpandListArgument(cge->Evaluate(this->Makefile, + config, + false, + head, + &dagChecker), + llibs); + + std::set const& seenProps = cge->GetSeenTargetProperties(); + for (std::set::const_iterator it = seenProps.begin(); + it != seenProps.end(); ++it) + { + if (!this->GetProperty(*it)) + { + this->LinkImplicitNullProperties.insert(*it); + } + } + cge->GetMaxLanguageStandard(this, this->MaxLanguageStandards); + } + for(std::vector::const_iterator li = llibs.begin(); li != llibs.end(); ++li) { diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 2e0df4221..3f534f2db 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -169,8 +169,6 @@ public: return this->LinkLibraries;} const LinkLibraryVectorType &GetOriginalLinkLibraries() const {return this->OriginalLinkLibraries;} - void GetDirectLinkLibraries(const std::string& config, - std::vector &) const; /** Compute the link type to use for the given configuration. */ LinkLibraryType ComputeLinkType(const std::string& config) const; @@ -766,9 +764,6 @@ private: cmTarget const* head, bool &exists) const; - void GetDirectLinkLibrariesInternal(const std::string& config, - std::vector& libs, - cmTarget const* head) const; LinkImplementation const* GetLinkImplementationLibrariesInternal(const std::string& config, cmTarget const* head) const;