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 16:48:53 -05:00
committed by Brad King
parent e806a490b6
commit 9890cfc4ec
79 changed files with 339 additions and 176 deletions
+6 -2
View File
@@ -43,7 +43,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 (Python2 COMPONENTS Interpreter Development)
@@ -472,7 +474,9 @@ This module defines the command ``Python2_add_library`` (when
:prop_gbl:`CMAKE_ROLE` is ``PROJECT``), which has the same semantics as
:command:`add_library` and adds a dependency to target ``Python2::Python`` or,
when library type is ``MODULE``, to target ``Python2::Module`` and takes care
of Python module naming rules::
of Python module naming rules:
.. code-block:: cmake
Python2_add_library (<name> [STATIC | SHARED | MODULE]
<source1> [<source2> ...])