summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2021-11-01 14:19:05 (GMT)
committerBrad King <brad.king@kitware.com>2021-11-18 17:02:37 (GMT)
commit9b31a977481ea07c979549246ee46946e9978e08 (patch)
tree07b8d6b8618140ed066c8b1d3efe37c0bd994233 /Source/cmGlobalVisualStudioGenerator.cxx
parentd0158b765b0660bcfe304830e179fa9bbdffd5d9 (diff)
downloadCMake-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/cmGlobalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index f9bd67e..580c82b 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -942,9 +942,13 @@ void cmGlobalVisualStudioGenerator::AddSymbolExportCommand(
cmCustomCommandLines commandLines = cmMakeSingleCommandLine(
{ cmakeCommand, "-E", "__create_def", mdi->DefFile, objs_file });
- cmCustomCommand command(outputs, empty, empty, commandLines,
- gt->Target->GetMakefile()->GetBacktrace(),
- "Auto build dll exports", ".", true);
+ cmCustomCommand command;
+ command.SetOutputs(outputs);
+ command.SetCommandLines(commandLines);
+ command.SetComment("Auto build dll exports");
+ command.SetBacktrace(gt->Target->GetMakefile()->GetBacktrace());
+ command.SetWorkingDirectory(".");
+ command.SetStdPipesUTF8(true);
commands.push_back(std::move(command));
}