From 10d65d50195e0183120e102c043cc9c96a16a36b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 31 Dec 2013 14:35:14 +0100 Subject: cmTarget: Move a variable initialization closer to where it is used. This is more readable and easier to reason about. --- Source/cmTarget.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 3d1a4d4..4b7bd3b 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -5592,9 +5592,6 @@ void cmTarget::ComputeLinkImplementation(const char* config, LinkImplementation& impl, cmTarget const* head) const { - // Compute which library configuration to link. - cmTarget::LinkLibraryType linkType = this->ComputeLinkType(config); - // Collect libraries directly linked in this configuration. std::vector llibs; this->GetDirectLinkLibraries(config, llibs, head); @@ -5687,6 +5684,7 @@ void cmTarget::ComputeLinkImplementation(const char* config, impl.Libraries.push_back(item); } + cmTarget::LinkLibraryType linkType = this->ComputeLinkType(config); LinkLibraryVectorType const& oldllibs = this->GetOriginalLinkLibraries(); for(cmTarget::LinkLibraryVectorType::const_iterator li = oldllibs.begin(); li != oldllibs.end(); ++li) -- cgit v0.12