summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-07 07:58:51 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-01-08 21:28:18 (GMT)
commit55a73e6b1f70b3c8a783b130dff4c4689cea5ba2 (patch)
treeac22109c28ecd6b59d6f538efdc8ece375388928 /Source/cmComputeLinkInformation.cxx
parent8dc8d756bc278cd02f329b31218c2459908dc0bb (diff)
downloadCMake-55a73e6b1f70b3c8a783b130dff4c4689cea5ba2.zip
CMake-55a73e6b1f70b3c8a783b130dff4c4689cea5ba2.tar.gz
CMake-55a73e6b1f70b3c8a783b130dff4c4689cea5ba2.tar.bz2
Use the cmJoin algorithm where possible.
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r--Source/cmComputeLinkInformation.cxx26
1 files changed, 2 insertions, 24 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index f4fa5c6..09bd58c 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -448,18 +448,7 @@ std::string cmComputeLinkInformation::GetRPathLinkString()
}
// Construct the linker runtime search path.
- std::string rpath_link;
- const char* sep = "";
- std::vector<std::string> const& dirs =
- this->OrderDependentRPath->GetOrderedDirectories();
- for(std::vector<std::string>::const_iterator di = dirs.begin();
- di != dirs.end(); ++di)
- {
- rpath_link += sep;
- sep = ":";
- rpath_link += *di;
- }
- return rpath_link;
+ return cmJoin(this->OrderDependentRPath->GetOrderedDirectories(), ":");
}
//----------------------------------------------------------------------------
@@ -1999,18 +1988,7 @@ std::string cmComputeLinkInformation::GetRPathString(bool for_install)
this->GetRPath(runtimeDirs, for_install);
// Concatenate the paths.
- std::string rpath;
- const char* sep = "";
- for(std::vector<std::string>::const_iterator ri = runtimeDirs.begin();
- ri != runtimeDirs.end(); ++ri)
- {
- // Separate from previous path.
- rpath += sep;
- sep = this->GetRuntimeSep().c_str();
-
- // Add this path.
- rpath += *ri;
- }
+ std::string rpath = cmJoin(runtimeDirs, this->GetRuntimeSep());
// If the rpath will be replaced at install time, prepare space.
if(!for_install && this->RuntimeUseChrpath)