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/cmQtAutoGenInitializer.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/cmQtAutoGenInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGenInitializer.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index c49cafe..e124758 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -1246,11 +1246,13 @@ bool cmQtAutoGenInitializer::InitAutogenTarget() // PRE_BUILD will work for an OBJECT_LIBRARY in this specific case. // // PRE_BUILD does not support file dependencies! - const std::vector<std::string> no_output; - const std::vector<std::string> no_deps; - cmCustomCommand cc(no_output, autogenByproducts, no_deps, commandLines, - this->Makefile->GetBacktrace(), autogenComment.c_str(), - this->Dir.Work.c_str(), stdPipesUTF8); + cmCustomCommand cc; + cc.SetByproducts(autogenByproducts); + cc.SetCommandLines(commandLines); + cc.SetComment(autogenComment.c_str()); + cc.SetBacktrace(this->Makefile->GetBacktrace()); + cc.SetWorkingDirectory(this->Dir.Work.c_str()); + cc.SetStdPipesUTF8(stdPipesUTF8); cc.SetEscapeOldStyle(false); cc.SetEscapeAllowMakeVars(true); this->GenTarget->Target->AddPreBuildCommand(std::move(cc)); |