From b030a7f1ca89620ad4b51569c991a7c0b8aa05c2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 16 Jun 2014 14:25:40 -0400 Subject: [PATCH] cmTarget: De-duplicate link interface genex code for $ Simplify the implementation of GetTransitivePropertyTargets by using ExpandLinkItems with usage_requirements_only==true to evaluate the generator expressions in the link interface for us. --- Source/cmTarget.cxx | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 32948cd27..c4fd924e8 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -6235,24 +6235,16 @@ void cmTarget::GetTransitivePropertyTargets(const std::string& config, } // The interface libraries have been explicitly set. - cmGeneratorExpression ge; - cmGeneratorExpressionDAGChecker dagChecker(this->GetName(), - linkIfaceProp, 0, 0); - dagChecker.SetTransitivePropertiesOnly(); - std::vector libs; - cmSystemTools::ExpandListArgument(ge.Parse(interfaceLibs)->Evaluate( - this->Makefile, - config, - false, - headTarget, - this, &dagChecker), libs); + std::vector libs; + this->ExpandLinkItems(linkIfaceProp, interfaceLibs, config, + headTarget, true, libs); - for(std::vector::const_iterator it = libs.begin(); + for(std::vector::const_iterator it = libs.begin(); it != libs.end(); ++it) { - if (cmTarget const* tgt = this->FindTargetToLink(*it)) + if (it->Target) { - tgts.push_back(tgt); + tgts.push_back(it->Target); } } }