preset: Easier command line interface for Workflow Presets

A positional option allows 'cmake --workflow --preset <preset>' to be
shortened to 'cmake --workflow <preset>'.

Fixes: #26270
This commit is contained in:
Kevin Tolle
2024-09-30 20:42:32 +02:00
committed by Craig Scott
parent d734f8dc6d
commit b80aa1d3a3
8 changed files with 81 additions and 5 deletions
+11 -2
View File
@@ -31,7 +31,7 @@ Synopsis
cmake --find-package [<options>]
`Run a Workflow Preset`_
cmake --workflow [<options>]
cmake --workflow <options>
`View Help`_
cmake --help[-<topic>]
@@ -1394,7 +1394,7 @@ build steps in order:
.. code-block:: shell
cmake --workflow [<options>]
cmake --workflow <options>
The options are:
@@ -1411,6 +1411,15 @@ The options are:
must contain CMake preset files.
See :manual:`preset <cmake-presets(7)>` for more details.
.. versionchanged:: 3.31
When following immediately after the ``--workflow`` option,
the ``--preset`` argument can be omitted and just the ``<preset>``
name can be given. This means the following syntax is valid:
.. code-block:: console
$ cmake --workflow my-preset
.. option:: --list-presets
Lists the available workflow presets. The current working directory must
@@ -0,0 +1,6 @@
cmake--workflow-preset
----------------------
* When executing a CMake workflow preset, the ``--preset`` option can now be
omitted, allowing the simpler command line
:option:`cmake --workflow \<preset\> <cmake--workflow --preset>`.