From 8aaed08696a7444b80b6319e2b5af320ee589658 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 16 Oct 2015 19:19:48 +0200 Subject: [PATCH] cmGeneratorTarget: Port object library handling to cmGeneratorTarget. --- Source/cmGeneratorTarget.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 6f91d1a2d..466d3c21d 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -2004,27 +2004,26 @@ cmGeneratorTarget::UseObjectLibraries(std::vector& objs, { std::vector objectFiles; this->GetExternalObjects(objectFiles, config); - std::vector objectLibraries; + std::vector objectLibraries; for(std::vector::const_iterator it = objectFiles.begin(); it != objectFiles.end(); ++it) { std::string objLib = (*it)->GetObjectLibrary(); - if (cmTarget* tgt = this->Makefile->FindTargetToUse(objLib)) + if (cmGeneratorTarget* tgt = + this->LocalGenerator->FindGeneratorTargetToUse(objLib)) { objectLibraries.push_back(tgt); } } - std::vector::const_iterator end + std::vector::const_iterator end = cmRemoveDuplicates(objectLibraries); - for(std::vector::const_iterator + for(std::vector::const_iterator ti = objectLibraries.begin(); ti != end; ++ti) { - cmTarget* objLib = *ti; - cmGeneratorTarget* ogt = - this->GlobalGenerator->GetGeneratorTarget(objLib); + cmGeneratorTarget* ogt = *ti; std::vector objectSources; ogt->GetObjectSources(objectSources, config); for(std::vector::const_iterator