diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2021-11-07 15:25:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-11-18 17:02:38 (GMT) |
commit | 3bb2542535fa2ca1e78195b69c53916a55d322e1 (patch) | |
tree | 807f1bb4f08bdca8360c4f76b0150cefb0490177 /Source/cmFLTKWrapUICommand.cxx | |
parent | c46b041a3bcede9447c36de2f3359eb4c17f3f50 (diff) | |
download | CMake-3bb2542535fa2ca1e78195b69c53916a55d322e1.zip CMake-3bb2542535fa2ca1e78195b69c53916a55d322e1.tar.gz CMake-3bb2542535fa2ca1e78195b69c53916a55d322e1.tar.bz2 |
cmMakefile: Simplify Add*Command and adopt to cmAddCustom*Command
Diffstat (limited to 'Source/cmFLTKWrapUICommand.cxx')
-rw-r--r-- | Source/cmFLTKWrapUICommand.cxx | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx index d88617a..47dd709 100644 --- a/Source/cmFLTKWrapUICommand.cxx +++ b/Source/cmFLTKWrapUICommand.cxx @@ -3,7 +3,11 @@ #include "cmFLTKWrapUICommand.h" #include <cstddef> +#include <utility> +#include <cm/memory> + +#include "cmCustomCommand.h" #include "cmCustomCommandLines.h" #include "cmExecutionStatus.h" #include "cmListFileCache.h" @@ -95,12 +99,17 @@ bool cmFLTKWrapUICommand(std::vector<std::string> const& args, // Add command for generating the .h and .cxx files std::string no_main_dependency; - const char* no_comment = nullptr; - const char* no_working_dir = nullptr; - mf.AddCustomCommandToOutput(cxxres, depends, no_main_dependency, - commandLines, no_comment, no_working_dir); - mf.AddCustomCommandToOutput(hname, depends, no_main_dependency, - commandLines, no_comment, no_working_dir); + + auto hcc = cm::make_unique<cmCustomCommand>(); + hcc->SetDepends(depends); + hcc->SetCommandLines(commandLines); + auto ccc = cm::make_unique<cmCustomCommand>(*hcc); + + hcc->SetOutputs(cxxres); + mf.AddCustomCommandToOutput(no_main_dependency, std::move(hcc)); + + ccc->SetOutputs(hname); + mf.AddCustomCommandToOutput(no_main_dependency, std::move(ccc)); cmSourceFile* sf = mf.GetSource(cxxres); sf->AddDepend(hname); |