diff options
author | Brad King <brad.king@kitware.com> | 2014-07-15 11:42:43 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-07-16 13:31:29 -0400 |
commit | 0a8fbac19a1d12adaa10873cc8fdb3dff164c981 (patch) | |
tree | 78f7959b9940f7d34010fc41119e33f04645cf64 /Source | |
parent | fb3518dc81ac1b776503d4369c6d375a706485d1 (diff) | |
download | cmake-0a8fbac19a1d12adaa10873cc8fdb3dff164c981.tar.gz |
cmTarget: Drop GetTransitivePropertyTargets method
Inline the implementation at the only remaining call site.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 16 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 19 | ||||
-rw-r--r-- | Source/cmTarget.h | 3 |
3 files changed, 13 insertions, 25 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 1c15bd3ca2..19b3e16d61 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -1098,10 +1098,20 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode if (std::find_if(transBegin, transEnd, cmStrCmp(propertyName)) != transEnd) { - std::vector<cmTarget const*> tgts; - target->GetTransitivePropertyTargets(context->Config, - headTarget, tgts); + if(cmTarget::LinkInterfaceLibraries const* iface = + target->GetLinkInterfaceLibraries(context->Config, headTarget, true)) + { + for(std::vector<cmLinkItem>::const_iterator + it = iface->Libraries.begin(); + it != iface->Libraries.end(); ++it) + { + if (it->Target) + { + tgts.push_back(it->Target); + } + } + } if (!tgts.empty()) { linkedTargetsContent = diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index b36a600a8b..8185bcc2c4 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -6055,25 +6055,6 @@ cmTarget::GetLinkImplementationClosure(const std::string& config) const } //---------------------------------------------------------------------------- -void cmTarget::GetTransitivePropertyTargets(const std::string& config, - cmTarget const* headTarget, - std::vector<cmTarget const*> &tgts) const -{ - if(cmTarget::LinkInterfaceLibraries const* iface = - this->GetLinkInterfaceLibraries(config, headTarget, true)) - { - for(std::vector<cmLinkItem>::const_iterator it = iface->Libraries.begin(); - it != iface->Libraries.end(); ++it) - { - if (it->Target) - { - tgts.push_back(it->Target); - } - } - } -} - -//---------------------------------------------------------------------------- void cmTargetInternals::ComputeLinkInterfaceLibraries( cmTarget const* thisTarget, diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 8e21d4fbc8..12712725ce 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -296,9 +296,6 @@ public: GetLinkInterfaceLibraries(const std::string& config, cmTarget const* headTarget, bool usage_requirements_only) const; - void GetTransitivePropertyTargets(const std::string& config, - cmTarget const* headTarget, - std::vector<cmTarget const*> &libs) const; std::vector<cmTarget const*> const& GetLinkImplementationClosure(const std::string& config) const; |