Help/presets: Use preset role for configurePreset references

This commit is contained in:
Tyler Yankee
2026-04-16 09:51:16 -04:00
parent 2d8e8213d4
commit 5e76987626
7 changed files with 35 additions and 28 deletions

View File

@@ -795,8 +795,9 @@ following options:
.. option:: --preset <preset>, --preset=<preset>
Use a build :manual:`preset <cmake-presets(7)>` to specify build options.
The project binary directory is inferred from the ``configurePreset`` key
unless a directory is specified after ``--build``.
The project binary directory is inferred from the
:preset:`buildPresets.configurePreset` key unless a directory is specified
after ``--build``.
.. versionadded:: 4.3
``cmake --build`` now supports specifying a build directory and

View File

@@ -124,8 +124,8 @@ Options
Use a package :manual:`preset <cmake-presets(7)>` to specify package
options. The project binary directory is inferred from the
``configurePreset`` key. The current working directory must contain
``CMakePresets.json`` or ``CMakeUserPresets.json``.
:preset:`packagePresets.configurePreset` key. The current working directory
must contain ``CMakePresets.json`` or ``CMakeUserPresets.json``.
.. option:: --list-presets

View File

@@ -70,14 +70,14 @@ The options for running tests are:
.. option:: --preset <preset>, --preset=<preset>
Use a test :manual:`preset <cmake-presets(7)>` to specify test options. The
project binary directory is inferred from the ``configurePreset`` key. The
current working directory must contain ``CMakePresets.json`` and/or
``CMakeUserPresets.json``.
project binary directory is inferred from the
:preset:`testPresets.configurePreset` key. The current working directory must
contain ``CMakePresets.json`` and/or ``CMakeUserPresets.json``.
.. versionadded:: 3.30
The ``--test-dir`` option may optionally be specified with a different
binary directory than the one specified by the ``configurePreset`` key
of the test preset.
The :ctest-option:`--test-dir` option may be specified with a different
binary directory than the one specified by the
:preset:`testPresets.configurePreset` key.
.. option:: --list-presets

View File

@@ -18,9 +18,10 @@
An optional boolean specifying whether or not a preset should be
hidden. If a preset is hidden, it cannot be used in the
:cmake-build-option:`--preset` argument and does not have to have a
valid ``configurePreset``, even from inheritance. ``hidden``
presets are intended to be used as a base for other presets to
inherit via the ``inherits`` field.
valid :preset:`buildPresets.configurePreset`, even from
inheritance. ``hidden`` presets are intended to be used as a base
for other presets to inherit via the
:preset:`buildPresets.inherits` field.
.. _`CMakePresets.buildPresets.inherits`:

View File

@@ -17,9 +17,10 @@
An optional boolean specifying whether or not a preset should be
hidden. If a preset is hidden, it cannot be used in the
:cpack-option:`--preset` argument and does not have to have a valid
``configurePreset``, even from inheritance. ``hidden`` presets are
intended to be used as a base for other presets to inherit via the
``inherits`` field.
:preset:`packagePresets.configurePreset`, even from
inheritance. ``hidden`` presets are intended to be used as a base
for other presets to inherit via the
:preset:`packagePresets.inherits` field.
.. _`CMakePresets.packagePresets.inherits`:

View File

@@ -963,9 +963,10 @@ properties:
An optional boolean specifying whether or not a preset should be
hidden. If a preset is hidden, it cannot be used in the
:cmake-build-option:`--preset` argument and does not have to have a
valid ``configurePreset``, even from inheritance. ``hidden``
presets are intended to be used as a base for other presets to
inherit via the ``inherits`` field.
valid :preset:`buildPresets.configurePreset`, even from
inheritance. ``hidden`` presets are intended to be used as a base
for other presets to inherit via the
:preset:`buildPresets.inherits` field.
inherits: *preset-inherits
condition: *condition
vendor: *preset-vendor
@@ -1181,9 +1182,10 @@ properties:
An optional boolean specifying whether or not a preset should be
hidden. If a preset is hidden, it cannot be used in the
:ctest-option:`--preset` argument and does not have to have a valid
``configurePreset``, even from inheritance. ``hidden`` presets are
intended to be used as a base for other presets to inherit via the
``inherits`` field.
:preset:`testPresets.configurePreset`, even from
inheritance. ``hidden`` presets are intended to be used as a base
for other presets to inherit via the
:preset:`testPresets.inherits` field.
inherits: *preset-inherits
condition: *condition
vendor: *preset-vendor
@@ -1819,9 +1821,10 @@ properties:
An optional boolean specifying whether or not a preset should be
hidden. If a preset is hidden, it cannot be used in the
:cpack-option:`--preset` argument and does not have to have a valid
``configurePreset``, even from inheritance. ``hidden`` presets are
intended to be used as a base for other presets to inherit via the
``inherits`` field.
:preset:`packagePresets.configurePreset`, even from
inheritance. ``hidden`` presets are intended to be used as a base
for other presets to inherit via the
:preset:`packagePresets.inherits` field.
inherits: *preset-inherits
condition: *condition
vendor: *preset-vendor

View File

@@ -17,9 +17,10 @@
An optional boolean specifying whether or not a preset should be
hidden. If a preset is hidden, it cannot be used in the
:ctest-option:`--preset` argument and does not have to have a valid
``configurePreset``, even from inheritance. ``hidden`` presets are
intended to be used as a base for other presets to inherit via the
``inherits`` field.
:preset:`testPresets.configurePreset`, even from
inheritance. ``hidden`` presets are intended to be used as a base
for other presets to inherit via the
:preset:`testPresets.inherits` field.
.. _`CMakePresets.testPresets.inherits`: