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:
@@ -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;
|
||||
|
@@ -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)
|
||||
|
||||
run_cmake_workflow_presets(ListPresets --list-presets)
|
||||
run_cmake_workflow_presets(InvalidOption -DINVALID_OPTION)
|
||||
|
Reference in New Issue
Block a user