summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerators.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/cmQtAutoGenerators.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/cmQtAutoGenerators.cxx')
-rw-r--r--Source/cmQtAutoGenerators.cxx44
1 files changed, 5 insertions, 39 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index ded85c3..bf79066 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -224,16 +224,7 @@ std::string cmQtAutoGenerators::ListQt5RccInputs(cmSourceFile* sf,
}
}
depends.insert(depends.end(), qrcEntries.begin(), qrcEntries.end());
- std::string entriesList;
- const char* sep = "";
- for(std::vector<std::string>::const_iterator it = qrcEntries.begin();
- it != qrcEntries.end(); ++it)
- {
- entriesList += sep;
- entriesList += *it;
- sep = "@list_sep@";
- }
- return entriesList;
+ return cmJoin(qrcEntries, "@list_sep@");
}
std::string cmQtAutoGenerators::ListQt4RccInputs(cmSourceFile* sf,
@@ -512,29 +503,13 @@ static void GetCompileDefinitionsAndDirectories(cmTarget const* target,
// Get the include dirs for this target, without stripping the implicit
// include dirs off, see http://public.kitware.com/Bug/view.php?id=13667
localGen->GetIncludeDirectories(includeDirs, gtgt, "CXX", config, false);
- const char* sep = "";
- incs = "";
- for(std::vector<std::string>::const_iterator incDirIt = includeDirs.begin();
- incDirIt != includeDirs.end();
- ++incDirIt)
- {
- incs += sep;
- sep = ";";
- incs += *incDirIt;
- }
+
+ incs = cmJoin(includeDirs, ";");
std::set<std::string> defines;
localGen->AddCompileDefinitions(defines, target, config);
- sep = "";
- for(std::set<std::string>::const_iterator defIt = defines.begin();
- defIt != defines.end();
- ++defIt)
- {
- defs += sep;
- sep = ";";
- defs += *defIt;
- }
+ defs += cmJoin(defines, ";");
}
void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget const* target)
@@ -879,16 +854,7 @@ static void GetUicOpts(cmTarget const* target, const std::string& config,
{
std::vector<std::string> opts;
target->GetAutoUicOptions(opts, config);
-
- const char* sep = "";
- for(std::vector<std::string>::const_iterator optIt = opts.begin();
- optIt != opts.end();
- ++optIt)
- {
- optString += sep;
- sep = ";";
- optString += *optIt;
- }
+ optString = cmJoin(opts, ";");
}
void cmQtAutoGenerators::SetupAutoUicTarget(cmTarget const* target,