1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-19 11:18:40 +08:00

cmake --workflow: print usage and exit on unrecognized argument

Issue: #24073
This commit is contained in:
Kyle Edwards
2022-10-25 10:46:09 -04:00
parent 70aef29427
commit 322193afcd
5 changed files with 11 additions and 0 deletions

View File

@@ -949,6 +949,8 @@ int do_workflow(int ac, char const* const* av)
}
if (!(matched && parsed)) {
if (!matched) {
presetName.clear();
listPresets = false;
std::cerr << "Unknown argument " << arg << std::endl;
}
break;

View File

@@ -0,0 +1 @@
1

View File

@@ -0,0 +1,6 @@
^Unknown argument -DINVALID_OPTION
Usage: cmake --workflow \[options\]
Options:
--preset <preset> = Workflow preset to execute\.
--list-presets = List available workflow presets\.
--fresh = Configure a fresh build tree, removing any existing cache file\.$

View File

@@ -0,0 +1 @@
^$

View File

@@ -77,3 +77,4 @@ unset(CMakeUserPresets_FILE)
unset(CMakePresets_ASSETS)
run_cmake_workflow_presets(ListPresets --list-presets)
run_cmake_workflow_presets(InvalidOption -DINVALID_OPTION)