summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.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/cmTarget.cxx
parent8dc8d756bc278cd02f329b31218c2459908dc0bb (diff)
downloadCMake-55a73e6b1f70b3c8a783b130dff4c4689cea5ba2.zip
CMake-55a73e6b1f70b3c8a783b130dff4c4689cea5ba2.tar.gz
CMake-55a73e6b1f70b3c8a783b130dff4c4689cea5ba2.tar.bz2
Use the cmJoin algorithm where possible.
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 94a6de3..52b8727 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -923,16 +923,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();
@@ -6088,24 +6079,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())