diff options
author | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-13 17:44:37 (GMT) |
---|---|---|
committer | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-16 18:45:41 (GMT) |
commit | 7f3ecbe7d7210667770d3212e2bfdb0c701cdc5d (patch) | |
tree | fed5733ab7c5219c0f5377a2b3fcb2674ac27b55 /Source/cmQTWrapUICommand.cxx | |
parent | 1ac4e0ef1b29affc9e4f2cd86c4fc8c2252f2ab2 (diff) | |
download | CMake-7f3ecbe7d7210667770d3212e2bfdb0c701cdc5d.zip CMake-7f3ecbe7d7210667770d3212e2bfdb0c701cdc5d.tar.gz CMake-7f3ecbe7d7210667770d3212e2bfdb0c701cdc5d.tar.bz2 |
cmCustomCommandLine: Provide command line make functions
Reduce boilerplate necessary to create custom command lines by introducing and
applying cmMakeCommandLine and cmMakeSingleCommandLine functions.
Diffstat (limited to 'Source/cmQTWrapUICommand.cxx')
-rw-r--r-- | Source/cmQTWrapUICommand.cxx | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/Source/cmQTWrapUICommand.cxx b/Source/cmQTWrapUICommand.cxx index b7b5efa..66c0228 100644 --- a/Source/cmQTWrapUICommand.cxx +++ b/Source/cmQTWrapUICommand.cxx @@ -2,8 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmQTWrapUICommand.h" -#include <utility> - #include "cmCustomCommandLines.h" #include "cmExecutionStatus.h" #include "cmMakefile.h" @@ -76,31 +74,12 @@ bool cmQTWrapUICommand(std::vector<std::string> const& args, sourceListValue += mocName; // set up .ui to .h and .cxx command - cmCustomCommandLine hCommand; - hCommand.push_back(uic_exe); - hCommand.push_back("-o"); - hCommand.push_back(hName); - hCommand.push_back(uiName); - cmCustomCommandLines hCommandLines; - hCommandLines.push_back(std::move(hCommand)); - - cmCustomCommandLine cxxCommand; - cxxCommand.push_back(uic_exe); - cxxCommand.push_back("-impl"); - cxxCommand.push_back(hName); - cxxCommand.push_back("-o"); - cxxCommand.push_back(cxxName); - cxxCommand.push_back(uiName); - cmCustomCommandLines cxxCommandLines; - cxxCommandLines.push_back(std::move(cxxCommand)); - - cmCustomCommandLine mocCommand; - mocCommand.push_back(moc_exe); - mocCommand.push_back("-o"); - mocCommand.push_back(mocName); - mocCommand.push_back(hName); - cmCustomCommandLines mocCommandLines; - mocCommandLines.push_back(std::move(mocCommand)); + cmCustomCommandLines hCommandLines = + cmMakeSingleCommandLine({ uic_exe, "-o", hName, uiName }); + cmCustomCommandLines cxxCommandLines = cmMakeSingleCommandLine( + { uic_exe, "-impl", hName, "-o", cxxName, uiName }); + cmCustomCommandLines mocCommandLines = + cmMakeSingleCommandLine({ moc_exe, "-o", mocName, hName }); std::vector<std::string> depends; depends.push_back(uiName); |