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/cmGlobalXCodeGenerator.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/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 5b99945..a836f43 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1723,15 +1723,16 @@ void cmGlobalXCodeGenerator::CreateCustomCommands( cmStrCat("$<TARGET_SONAME_FILE:", gtgt->GetName(), '>'); std::string str_link_file = cmStrCat("$<TARGET_LINKER_FILE:", gtgt->GetName(), '>'); - bool stdPipesUTF8 = true; cmCustomCommandLines cmd = cmMakeSingleCommandLine( { cmSystemTools::GetCMakeCommand(), "-E", "cmake_symlink_library", str_file, str_so_file, str_link_file }); - cmCustomCommand command( - std::vector<std::string>(), std::vector<std::string>(), - std::vector<std::string>(), cmd, this->CurrentMakefile->GetBacktrace(), - "Creating symlinks", "", stdPipesUTF8); + cmCustomCommand command; + command.SetCommandLines(cmd); + command.SetComment("Creating symlinks"); + command.SetWorkingDirectory(""); + command.SetBacktrace(this->CurrentMakefile->GetBacktrace()); + command.SetStdPipesUTF8(true); postbuild.push_back(std::move(command)); } |