diff options
Diffstat (limited to 'Source/cmQTWrapCPPCommand.cxx')
-rw-r--r-- | Source/cmQTWrapCPPCommand.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx index ca0b259dc..58cf5142c 100644 --- a/Source/cmQTWrapCPPCommand.cxx +++ b/Source/cmQTWrapCPPCommand.cxx @@ -2,10 +2,14 @@ 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" -#include "cmPolicies.h" #include "cmRange.h" #include "cmSourceFile.h" #include "cmStringAlgorithms.h" @@ -71,11 +75,12 @@ bool cmQTWrapCPPCommand(std::vector<std::string> const& args, depends.push_back(moc_exe); 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, mf.GetPolicyStatus(cmPolicies::CMP0116)); + auto cc = cm::make_unique<cmCustomCommand>(); + cc->SetOutputs(newName); + cc->SetDepends(depends); + cc->SetCommandLines(commandLines); + cc->SetComment("Qt Wrapped File"); + mf.AddCustomCommandToOutput(std::move(cc)); } } |