summaryrefslogtreecommitdiffstats
path: root/Source/cmQTWrapCPPCommand.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/cmQTWrapCPPCommand.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/cmQTWrapCPPCommand.cxx')
-rw-r--r--Source/cmQTWrapCPPCommand.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx
index cc4df8f..b489944 100644
--- a/Source/cmQTWrapCPPCommand.cxx
+++ b/Source/cmQTWrapCPPCommand.cxx
@@ -2,6 +2,11 @@
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmQTWrapCPPCommand.h"
+#include <utility>
+
+#include <cm/memory>
+
+#include "cmCustomCommand.h"
#include "cmCustomCommandLines.h"
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
@@ -71,10 +76,12 @@ bool cmQTWrapCPPCommand(std::vector<std::string> const& args,
depends.push_back(hname);
std::string no_main_dependency;
- const char* no_working_dir = nullptr;
- mf.AddCustomCommandToOutput(newName, depends, no_main_dependency,
- commandLines, "Qt Wrapped File",
- no_working_dir);
+ auto cc = cm::make_unique<cmCustomCommand>();
+ cc->SetOutputs(newName);
+ cc->SetDepends(depends);
+ cc->SetCommandLines(commandLines);
+ cc->SetComment("Qt Wrapped File");
+ mf.AddCustomCommandToOutput(no_main_dependency, std::move(cc));
}
}