mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-21 23:00:50 +08:00
cmake --workflow: print usage and exit on unrecognized argument
Issue: #24073
This commit is contained in:
@@ -949,6 +949,8 @@ int do_workflow(int ac, char const* const* av)
|
|||||||
}
|
}
|
||||||
if (!(matched && parsed)) {
|
if (!(matched && parsed)) {
|
||||||
if (!matched) {
|
if (!matched) {
|
||||||
|
presetName.clear();
|
||||||
|
listPresets = false;
|
||||||
std::cerr << "Unknown argument " << arg << std::endl;
|
std::cerr << "Unknown argument " << arg << std::endl;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@@ -0,0 +1 @@
|
|||||||
|
1
|
@@ -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\.$
|
@@ -0,0 +1 @@
|
|||||||
|
^$
|
@@ -77,3 +77,4 @@ unset(CMakeUserPresets_FILE)
|
|||||||
unset(CMakePresets_ASSETS)
|
unset(CMakePresets_ASSETS)
|
||||||
|
|
||||||
run_cmake_workflow_presets(ListPresets --list-presets)
|
run_cmake_workflow_presets(ListPresets --list-presets)
|
||||||
|
run_cmake_workflow_presets(InvalidOption -DINVALID_OPTION)
|
||||||
|
Reference in New Issue
Block a user