diff options
author | Brad King <brad.king@kitware.com> | 2015-01-12 14:41:02 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-01-12 14:41:02 (GMT) |
commit | dd6c596c12070c0fdc71cb11ac154e99111fb6e0 (patch) | |
tree | 27fc1aa3fb5d409e619f590ede5fee3bf477f925 /Source/cmComputeLinkInformation.cxx | |
parent | d9a6ea4599eb3b736b4e695a9ffd5d8a51eac059 (diff) | |
parent | 55a73e6b1f70b3c8a783b130dff4c4689cea5ba2 (diff) | |
download | CMake-dd6c596c12070c0fdc71cb11ac154e99111fb6e0.zip CMake-dd6c596c12070c0fdc71cb11ac154e99111fb6e0.tar.gz CMake-dd6c596c12070c0fdc71cb11ac154e99111fb6e0.tar.bz2 |
Merge topic 'join-algorithm'
55a73e6b Use the cmJoin algorithm where possible.
8dc8d756 cmStandardIncludes: Add a join algorithm for string containers.
b5813cee cmInstallCommand: Remove unused variable.
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 5cadaa6..479da75 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -444,18 +444,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(), ":"); } //---------------------------------------------------------------------------- @@ -1988,18 +1977,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) |