summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2022-10-25 15:13:35 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2022-10-26 16:01:25 (GMT)
commit7ecbe324b0ef02f63676f8431dbbbe8b4217f64f (patch)
treeccf713a19358c59cf7cb3a370079b2c5b1764e52 /Source/cmakemain.cxx
parent7d9aa0f00cd9f7c2ed3d0c710090e9901c4430e9 (diff)
downloadCMake-7ecbe324b0ef02f63676f8431dbbbe8b4217f64f.zip
CMake-7ecbe324b0ef02f63676f8431dbbbe8b4217f64f.tar.gz
CMake-7ecbe324b0ef02f63676f8431dbbbe8b4217f64f.tar.bz2
cmake --workflow: add --fresh option
Fixes: #24073
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index a6938bc..723932e 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -918,8 +918,10 @@ int do_workflow(int ac, char const* const* av)
return -1;
#else
using WorkflowListPresets = cmake::WorkflowListPresets;
+ using WorkflowFresh = cmake::WorkflowFresh;
std::string presetName;
auto listPresets = WorkflowListPresets::No;
+ auto fresh = WorkflowFresh::No;
using CommandArgument =
cmCommandLineArgument<bool(std::string const& value)>;
@@ -932,6 +934,11 @@ int do_workflow(int ac, char const* const* av)
listPresets = WorkflowListPresets::Yes;
return true;
} },
+ CommandArgument{ "--fresh", CommandArgument::Values::Zero,
+ [&fresh](const std::string&) -> bool {
+ fresh = WorkflowFresh::Yes;
+ return true;
+ } },
};
std::vector<std::string> inputArgs;
@@ -968,6 +975,8 @@ int do_workflow(int ac, char const* const* av)
"Options:\n"
" --preset <preset> = Workflow preset to execute.\n"
" --list-presets = List available workflow presets.\n"
+ " --fresh = Configure a fresh build tree, removing any "
+ "existing cache file.\n"
;
/* clang-format on */
return 1;
@@ -982,7 +991,7 @@ int do_workflow(int ac, char const* const* av)
cmakemainProgressCallback(msg, prog, &cm);
});
- return cm.Workflow(presetName, listPresets);
+ return cm.Workflow(presetName, listPresets, fresh);
#endif
}