summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-12 14:41:02 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-01-12 14:41:02 (GMT)
commitdd6c596c12070c0fdc71cb11ac154e99111fb6e0 (patch)
tree27fc1aa3fb5d409e619f590ede5fee3bf477f925 /Source/cmTarget.cxx
parentd9a6ea4599eb3b736b4e695a9ffd5d8a51eac059 (diff)
parent55a73e6b1f70b3c8a783b130dff4c4689cea5ba2 (diff)
downloadCMake-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/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx31
1 files changed, 3 insertions, 28 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index c7b2715..b138f0a 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -919,16 +919,7 @@ void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files,
//----------------------------------------------------------------------------
void cmTarget::AddTracedSources(std::vector<std::string> const& srcs)
{
- std::string srcFiles;
- const char* sep = "";
- for(std::vector<std::string>::const_iterator i = srcs.begin();
- i != srcs.end(); ++i)
- {
- std::string filename = *i;
- srcFiles += sep;
- srcFiles += filename;
- sep = ";";
- }
+ std::string srcFiles = cmJoin(srcs, ";");
if (!srcFiles.empty())
{
this->Internal->SourceFilesMap.clear();
@@ -6076,24 +6067,8 @@ cmTargetInternals::ComputeLinkInterfaceLibraries(
}
if (ifaceLibs != iface.Libraries)
{
- std::string oldLibraries;
- std::string newLibraries;
- const char *sep = "";
- for(std::vector<cmLinkImplItem>::const_iterator it
- = impl->Libraries.begin(); it != impl->Libraries.end(); ++it)
- {
- oldLibraries += sep;
- oldLibraries += *it;
- sep = ";";
- }
- sep = "";
- for(std::vector<cmLinkItem>::const_iterator it
- = ifaceLibs.begin(); it != ifaceLibs.end(); ++it)
- {
- newLibraries += sep;
- newLibraries += *it;
- sep = ";";
- }
+ std::string oldLibraries = cmJoin(impl->Libraries, ";");
+ std::string newLibraries = cmJoin(ifaceLibs, ";");
if(oldLibraries.empty())
{ oldLibraries = "(empty)"; }
if(newLibraries.empty())