summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-02-09 07:08:26 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-17 18:21:36 (GMT)
commit26602cf56c4697a589f320809afa7a127268d09f (patch)
tree9b8aec4f3e903d976e766e7a15478d62e6bb0b54
parentcfb8483412761e567f64343ccc008b44150a901b (diff)
downloadCMake-26602cf56c4697a589f320809afa7a127268d09f.zip
CMake-26602cf56c4697a589f320809afa7a127268d09f.tar.gz
CMake-26602cf56c4697a589f320809afa7a127268d09f.tar.bz2
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.
-rw-r--r--Source/cmLocalGenerator.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 35956ad..6a6135b 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<std::string> 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<std::string> runtimeDirs;
+ cli.GetRPath(runtimeDirs, relink);
+
std::string rpath;
for(std::vector<std::string>::iterator ri = runtimeDirs.begin();
ri != runtimeDirs.end(); ++ri)