Help: Improve formatting of presets manual

Tweak how we reference preset macros so that references also carry
'literal' markup. While this provides a modest improvement to HTML
rendered help, it primarily serves to apply 'literal' formatting
consistently for TTY output (`cmake --help-presets`).
This commit is contained in:
Matthew Woehlke
2026-07-28 17:01:59 -04:00
parent 42da7a30a9
commit c00106b20f

View File

@@ -268,6 +268,7 @@ Recognized macros include:
This is a preset-specific macro.
.. _`CMakePresets hostSystemName`:
.. |CMakePresets hostSystemName| replace:: ``${hostSystemName}``
``${hostSystemName}``
.. presets-versionadded:: 3
@@ -276,6 +277,7 @@ Recognized macros include:
:variable:`CMAKE_HOST_SYSTEM_NAME`.
.. _`CMakePresets fileDir`:
.. |CMakePresets fileDir| replace:: ``${fileDir}``
``${fileDir}``
.. presets-versionadded:: 4
@@ -316,6 +318,7 @@ Recognized macros include:
A literal dollar sign (``$``).
.. _`CMakePresets pathListSep`:
.. |CMakePresets pathListSep| replace:: ``${pathListSep}``
``${pathListSep}``
.. presets-versionadded:: 5
@@ -395,7 +398,7 @@ they were added and a summary of the new features and changes is given below.
* Changes to `Macro Expansion`_
* The `${hostSystemName} <CMakePresets hostSystemName_>`_ macro was
* The |CMakePresets hostSystemName|_ macro was
added.
``4``
@@ -409,7 +412,7 @@ they were added and a summary of the new features and changes is given below.
* Changes to `Macro Expansion`_
* The `${fileDir} <CMakePresets fileDir_>`_ macro was added.
* The |CMakePresets fileDir|_ macro was added.
``5``
.. versionadded:: 3.24
@@ -421,7 +424,7 @@ they were added and a summary of the new features and changes is given below.
* Changes to `Macro Expansion`_
* The `${pathListSep} <CMakePresets pathListSep_>`_ macro was added.
* The |CMakePresets pathListSep|_ macro was added.
``6``
.. versionadded:: 3.25
@@ -491,10 +494,9 @@ they were added and a summary of the new features and changes is given below.
* Changes to `Macro Expansion`_
* The `${fileDir} <CMakePresets fileDir_>`_ macro now always expands to
the directory of presets file containing the ``${fileDir}`` macro,
regardless of whether it is inherited by another preset in a different
directory.
* The |CMakePresets fileDir|_ macro now always expands to the directory
of presets file containing the ``${fileDir}`` macro, regardless of
whether it is inherited by another preset in a different directory.
* Changes to `Test Presets <Test Preset_>`_