diff options
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 73b8e88..c068894 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -3742,7 +3742,8 @@ std::function<int()> cmake::BuildWorkflowStep( } #endif -int cmake::Workflow(const std::string& presetName, bool listPresets) +int cmake::Workflow(const std::string& presetName, + WorkflowListPresets listPresets, WorkflowFresh fresh) { #ifndef CMAKE_BOOTSTRAP this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory()); @@ -3757,7 +3758,7 @@ int cmake::Workflow(const std::string& presetName, bool listPresets) return 1; } - if (listPresets) { + if (listPresets == WorkflowListPresets::Yes) { settingsFile.PrintWorkflowPresetList(); return 0; } @@ -3824,10 +3825,13 @@ int cmake::Workflow(const std::string& presetName, bool listPresets) if (!configurePreset) { return 1; } - steps.emplace_back( - stepNumber, "configure"_s, step.PresetName, - this->BuildWorkflowStep({ cmSystemTools::GetCMakeCommand(), - "--preset", step.PresetName })); + std::vector<std::string> args{ cmSystemTools::GetCMakeCommand(), + "--preset", step.PresetName }; + if (fresh == WorkflowFresh::Yes) { + args.emplace_back("--fresh"); + } + steps.emplace_back(stepNumber, "configure"_s, step.PresetName, + this->BuildWorkflowStep(args)); } break; case cmCMakePresetsGraph::WorkflowPreset::WorkflowStep::Type::Build: { auto const* buildPreset = this->FindPresetForWorkflow( |