Help: More syntax highlighting for literal blocks

Covers almost all blocks containing actual code, except:

* Parsed-literal blocks can't be highlighted, including many command
  summaries and substitution-heavy docs like find_... commands.
  This is a Sphinx limitation.

* Code with errors, like CMP0049, DEPLOYMENT_ADDITIONAL_FILES,
  DEPLOYMENT_REMOTE_DIRECTORY, @PACKAGE_INIT@ substitution in the
  tutorial, bracket arguments/comments in cmake-language.7 and
  cmake-developer.7.

* FindQt4 module, which needs reformatting.
This commit is contained in:
Nikita Nemkin
2025-01-29 20:05:12 +05:00
committed by Brad King
parent e806a490b6
commit 9890cfc4ec
79 changed files with 339 additions and 176 deletions

View File

@@ -50,7 +50,9 @@ If component ``Development`` is specified, it implies sub-components
To ensure consistent versions between components ``Interpreter``, ``Compiler``,
``Development`` (or one of its sub-components) and ``NumPy``, specify all
components at the same time::
components at the same time:
.. code-block:: cmake
find_package (Python3 COMPONENTS Interpreter Development)
@@ -338,14 +340,18 @@ Hints
``pydebug`` and ``gil_disabled``, ``debug`` and ``free threaded`` versions
will be searched **after** ``non-debug`` and ``non-gil-disabled`` ones.
For example, if we have::
For example, if we have:
.. code-block:: cmake
set (Python3_FIND_ABI "ON" "ANY" "ANY" "ON")
The following flags combinations will be appended, in that order, to the
artifact names: ``tdmu``, ``tdm``, ``tdu``, and ``td``.
And to search any possible ABIs::
And to search any possible ABIs:
.. code-block:: cmake
set (Python3_FIND_ABI "ANY" "ANY" "ANY" "ANY")
@@ -590,7 +596,9 @@ This module defines the command ``Python3_add_library`` (when
:command:`add_library` and adds a dependency to target ``Python3::Python`` or,
when library type is ``MODULE``, to target ``Python3::Module`` or
``Python3::SABIModule`` (when ``USE_SABI`` option is specified) and takes care
of Python module naming rules::
of Python module naming rules:
.. code-block:: cmake
Python3_add_library (<name> [STATIC | SHARED | MODULE [USE_SABI <version>] [WITH_SOABI]]
<source1> [<source2> ...])