summaryrefslogtreecommitdiffstats
path: root/Source/cmQTWrapUICommand.cxx
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2021-11-07 15:25:33 (GMT)
committerBrad King <brad.king@kitware.com>2021-11-18 17:02:38 (GMT)
commit3bb2542535fa2ca1e78195b69c53916a55d322e1 (patch)
tree807f1bb4f08bdca8360c4f76b0150cefb0490177 /Source/cmQTWrapUICommand.cxx
parentc46b041a3bcede9447c36de2f3359eb4c17f3f50 (diff)
downloadCMake-3bb2542535fa2ca1e78195b69c53916a55d322e1.zip
CMake-3bb2542535fa2ca1e78195b69c53916a55d322e1.tar.gz
CMake-3bb2542535fa2ca1e78195b69c53916a55d322e1.tar.bz2
cmMakefile: Simplify Add*Command and adopt to cmAddCustom*Command
Diffstat (limited to 'Source/cmQTWrapUICommand.cxx')
-rw-r--r--Source/cmQTWrapUICommand.cxx28
1 files changed, 20 insertions, 8 deletions
diff --git a/Source/cmQTWrapUICommand.cxx b/Source/cmQTWrapUICommand.cxx
index 66c0228..4d65f33 100644
--- a/Source/cmQTWrapUICommand.cxx
+++ b/Source/cmQTWrapUICommand.cxx
@@ -2,6 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmQTWrapUICommand.h"
+#include <utility>
+
+#include <cm/memory>
+
+#include "cmCustomCommand.h"
#include "cmCustomCommandLines.h"
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
@@ -84,19 +89,26 @@ bool cmQTWrapUICommand(std::vector<std::string> const& args,
std::vector<std::string> depends;
depends.push_back(uiName);
std::string no_main_dependency;
- const char* no_comment = nullptr;
- const char* no_working_dir = nullptr;
- mf.AddCustomCommandToOutput(hName, depends, no_main_dependency,
- hCommandLines, no_comment, no_working_dir);
+ auto cc = cm::make_unique<cmCustomCommand>();
+ cc->SetOutputs(hName);
+ cc->SetDepends(depends);
+ cc->SetCommandLines(hCommandLines);
+ mf.AddCustomCommandToOutput(no_main_dependency, std::move(cc));
depends.push_back(hName);
- mf.AddCustomCommandToOutput(cxxName, depends, no_main_dependency,
- cxxCommandLines, no_comment, no_working_dir);
+ cc = cm::make_unique<cmCustomCommand>();
+ cc->SetOutputs(cxxName);
+ cc->SetDepends(depends);
+ cc->SetCommandLines(cxxCommandLines);
+ mf.AddCustomCommandToOutput(no_main_dependency, std::move(cc));
depends.clear();
depends.push_back(hName);
- mf.AddCustomCommandToOutput(mocName, depends, no_main_dependency,
- mocCommandLines, no_comment, no_working_dir);
+ cc = cm::make_unique<cmCustomCommand>();
+ cc->SetOutputs(mocName);
+ cc->SetDepends(depends);
+ cc->SetCommandLines(mocCommandLines);
+ mf.AddCustomCommandToOutput(no_main_dependency, std::move(cc));
}
}