diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2021-11-01 14:19:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-11-18 17:02:37 (GMT) |
commit | 9b31a977481ea07c979549246ee46946e9978e08 (patch) | |
tree | 07b8d6b8618140ed066c8b1d3efe37c0bd994233 /Source/cmGlobalGenerator.cxx | |
parent | d0158b765b0660bcfe304830e179fa9bbdffd5d9 (diff) | |
download | CMake-9b31a977481ea07c979549246ee46946e9978e08.zip CMake-9b31a977481ea07c979549246ee46946e9978e08.tar.gz CMake-9b31a977481ea07c979549246ee46946e9978e08.tar.bz2 |
cmCustomCommand: Move constructor arguments to individual setters
Make `cmCustomCommand` have just only default constructor.
Use each setter instead. This follows the builder pattern.
Introduce `cc::SetOutputs(std::string output)`.
This will be used later, as substitution for `cc::SetOutputs({output})`.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 94eec2e..b02dc29 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -38,7 +38,6 @@ #include "cmInstallGenerator.h" #include "cmInstallRuntimeDependencySet.h" #include "cmLinkLineComputer.h" -#include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmMSVC60LinkLineComputer.h" #include "cmMakefile.h" @@ -2877,13 +2876,11 @@ void cmGlobalGenerator::CreateGlobalTarget(GlobalTargetInfo const& gti, cmTarget& target = tb.first; target.SetProperty("EXCLUDE_FROM_ALL", "TRUE"); - std::vector<std::string> no_outputs; - std::vector<std::string> no_byproducts; - std::vector<std::string> no_depends; // Store the custom command in the target. - cmCustomCommand cc(no_outputs, no_byproducts, no_depends, gti.CommandLines, - cmListFileBacktrace(), nullptr, gti.WorkingDir.c_str(), - gti.StdPipesUTF8); + cmCustomCommand cc; + cc.SetCommandLines(gti.CommandLines); + cc.SetWorkingDirectory(gti.WorkingDir.c_str()); + cc.SetStdPipesUTF8(gti.StdPipesUTF8); cc.SetUsesTerminal(gti.UsesTerminal); target.AddPostBuildCommand(std::move(cc)); if (!gti.Message.empty()) { |