diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-07 07:58:51 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-08 21:28:18 (GMT) |
commit | 55a73e6b1f70b3c8a783b130dff4c4689cea5ba2 (patch) | |
tree | ac22109c28ecd6b59d6f538efdc8ece375388928 /Source/cmQtAutoGenerators.cxx | |
parent | 8dc8d756bc278cd02f329b31218c2459908dc0bb (diff) | |
download | CMake-55a73e6b1f70b3c8a783b130dff4c4689cea5ba2.zip CMake-55a73e6b1f70b3c8a783b130dff4c4689cea5ba2.tar.gz CMake-55a73e6b1f70b3c8a783b130dff4c4689cea5ba2.tar.bz2 |
Use the cmJoin algorithm where possible.
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 44 |
1 files changed, 5 insertions, 39 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index a01a384..ec9f7c7 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, |