diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2021-11-07 03:45:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-11-18 17:02:38 (GMT) |
commit | c46b041a3bcede9447c36de2f3359eb4c17f3f50 (patch) | |
tree | 6940fb1d08650b7451916dcf65a3414a15663ca9 /Source/cmQtAutoGenGlobalInitializer.cxx | |
parent | 68b4e3b255be7a8d0831d19b206f701efdb001c8 (diff) | |
download | CMake-c46b041a3bcede9447c36de2f3359eb4c17f3f50.zip CMake-c46b041a3bcede9447c36de2f3359eb4c17f3f50.tar.gz CMake-c46b041a3bcede9447c36de2f3359eb4c17f3f50.tar.bz2 |
cmLocalGenerator: Simplify Add{Custom,Utility}Command
Diffstat (limited to 'Source/cmQtAutoGenGlobalInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGenGlobalInitializer.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Source/cmQtAutoGenGlobalInitializer.cxx b/Source/cmQtAutoGenGlobalInitializer.cxx index f9e889a..b7ea7d6 100644 --- a/Source/cmQtAutoGenGlobalInitializer.cxx +++ b/Source/cmQtAutoGenGlobalInitializer.cxx @@ -7,7 +7,7 @@ #include <cm/memory> -#include "cmCustomCommandLines.h" +#include "cmCustomCommand.h" #include "cmDuration.h" #include "cmGeneratorTarget.h" #include "cmLocalGenerator.h" @@ -171,13 +171,12 @@ void cmQtAutoGenGlobalInitializer::GetOrCreateGlobalTarget( cmMakefile* makefile = localGen->GetMakefile(); // Create utility target - std::vector<std::string> no_byproducts; - std::vector<std::string> no_depends; - cmCustomCommandLines no_commands; - const cmPolicies::PolicyStatus cmp0116_new = cmPolicies::NEW; - cmTarget* target = localGen->AddUtilityCommand( - name, true, makefile->GetHomeOutputDirectory().c_str(), no_byproducts, - no_depends, no_commands, cmp0116_new, false, comment.c_str()); + auto cc = cm::make_unique<cmCustomCommand>(); + cc->SetWorkingDirectory(makefile->GetHomeOutputDirectory().c_str()); + cc->SetCMP0116Status(cmPolicies::NEW); + cc->SetEscapeOldStyle(false); + cc->SetComment(comment.c_str()); + cmTarget* target = localGen->AddUtilityCommand(name, true, std::move(cc)); localGen->AddGeneratorTarget( cm::make_unique<cmGeneratorTarget>(target, localGen)); |