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/cmGlobalVisualStudioGenerator.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/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 580c82b..f6011d1 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -199,19 +199,18 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets() { // Add a special target that depends on ALL projects for easy build // of one configuration only. - const char* no_working_dir = nullptr; - std::vector<std::string> no_byproducts; - std::vector<std::string> no_depends; - cmCustomCommandLines no_commands; for (auto const& it : this->ProjectMap) { std::vector<cmLocalGenerator*> const& gen = it.second; // add the ALL_BUILD to the first local generator of each project if (!gen.empty()) { // Use no actual command lines so that the target itself is not // considered always out of date. - cmTarget* allBuild = gen[0]->AddUtilityCommand( - "ALL_BUILD", true, no_working_dir, no_byproducts, no_depends, - no_commands, cmPolicies::NEW, false, "Build all projects"); + auto cc = cm::make_unique<cmCustomCommand>(); + cc->SetCMP0116Status(cmPolicies::NEW); + cc->SetEscapeOldStyle(false); + cc->SetComment("Build all projects"); + cmTarget* allBuild = + gen[0]->AddUtilityCommand("ALL_BUILD", true, std::move(cc)); gen[0]->AddGeneratorTarget( cm::make_unique<cmGeneratorTarget>(allBuild, gen[0])); |