From 26602cf56c4697a589f320809afa7a127268d09f Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 9 Feb 2015 08:08:26 +0100 Subject: [PATCH] cmLocalGenerator: Move variable population inside of condition. It is only used in the condition, so no need to look for uses elsewhere when reading the code. --- Source/cmLocalGenerator.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 35956aded..6a6135b78 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1952,14 +1952,13 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, // Write the library flags to the build rule. fout << linkLibs; - // Get the RPATH entries. - std::vector runtimeDirs; - cli.GetRPath(runtimeDirs, relink); - // Check what kind of rpath flags to use. if(cli.GetRuntimeSep().empty()) { // Each rpath entry gets its own option ("-R a -R b -R c") + std::vector runtimeDirs; + cli.GetRPath(runtimeDirs, relink); + std::string rpath; for(std::vector::iterator ri = runtimeDirs.begin(); ri != runtimeDirs.end(); ++ri)