From c481fadc07e72193f16a4f1fb9d477db133f1120 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 14 Mar 2014 11:02:47 +0100 Subject: cmGeneratorTarget: Don't store ObjectSources for object libraries. Compute them on demand instead. --- Source/cmGeneratorTarget.cxx | 10 ++++------ Source/cmGeneratorTarget.h | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 8efd7bb..2a144c6 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -310,10 +310,6 @@ cmGeneratorTarget ::GetObjectSources(std::vector &data) const { IMPLEMENT_VISIT(ObjectSources); - if (this->Target->GetType() == cmTarget::OBJECT_LIBRARY) - { - this->ObjectSources = data; - } } //---------------------------------------------------------------------------- @@ -577,9 +573,11 @@ cmGeneratorTarget::UseObjectLibraries(std::vector& objs) const cmTarget* objLib = *ti; cmGeneratorTarget* ogt = this->GlobalGenerator->GetGeneratorTarget(objLib); + std::vector objectSources; + ogt->GetObjectSources(objectSources); for(std::vector::const_iterator - si = ogt->ObjectSources.begin(); - si != ogt->ObjectSources.end(); ++si) + si = objectSources.begin(); + si != objectSources.end(); ++si) { std::string obj = ogt->ObjectDirectory; obj += ogt->Objects[*si]; diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 139e736..53e27c5 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -127,7 +127,6 @@ private: std::map Objects; std::set ExplicitObjectName; - mutable std::vector ObjectSources; std::vector ObjectLibraries; mutable std::map > SystemIncludesCache; -- cgit v0.12