summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-12-31 13:35:14 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-01-06 16:25:10 (GMT)
commit10d65d50195e0183120e102c043cc9c96a16a36b (patch)
tree496730567e89122a21a22e764120a39701b03f47 /Source/cmTarget.cxx
parent0f3e8e957f20c0e7c2ad4da326c073c94d7a5816 (diff)
downloadCMake-10d65d50195e0183120e102c043cc9c96a16a36b.zip
CMake-10d65d50195e0183120e102c043cc9c96a16a36b.tar.gz
CMake-10d65d50195e0183120e102c043cc9c96a16a36b.tar.bz2
cmTarget: Move a variable initialization closer to where it is used.
This is more readable and easier to reason about.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx4
1 files changed, 1 insertions, 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<std::string> 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)