summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-01-15 19:01:53 (GMT)
committerBrad King <brad.king@kitware.com>2021-01-18 17:35:41 (GMT)
commit7d498d6b436638f5d85a0e97d43d51603d79205c (patch)
tree5e6a7174c41689811bb2b0c41d85207daee48a57 /Help
parentcc1f53351c52d03aecc47f8074ab1290cf7fb1a5 (diff)
downloadCMake-7d498d6b436638f5d85a0e97d43d51603d79205c.zip
CMake-7d498d6b436638f5d85a0e97d43d51603d79205c.tar.gz
CMake-7d498d6b436638f5d85a0e97d43d51603d79205c.tar.bz2
Utilities/Sphinx: Add role and directive for 'genex' in CMake domain
This enables cross-reference syntax for CMake generator expressions: :genex:`SOME_GENEX` :genex:`$<SOME_GENEX>` :genex:`$<SOME_GENEX:...>` and definition of CMake generator expressions via a directive: .. genex:: SOME_GENEX .. genex:: $<SOME_GENEX> .. genex:: $<SOME_GENEX:...> It also adds generator expressions defined by the directive and by `Help/genex/SOME_GENEX.rst` documents to the index.
Diffstat (limited to 'Help')
-rw-r--r--Help/dev/documentation.rst15
1 files changed, 13 insertions, 2 deletions
diff --git a/Help/dev/documentation.rst b/Help/dev/documentation.rst
index e34c754..29fc880 100644
--- a/Help/dev/documentation.rst
+++ b/Help/dev/documentation.rst
@@ -136,6 +136,10 @@ documentation:
A CMake native build system generator.
See the `cmake(1)`_ command-line tool's ``-G`` option.
+``genex``
+ A CMake generator expression.
+ See the `cmake-generator-expressions(7)`_ manual.
+
``manual``
A CMake manual page, like the `cmake(1)`_ manual.
@@ -169,10 +173,12 @@ which is expected to be of the form::
-------------
and to appear at or near the top of the ``.rst`` file before any other
-lines starting in a letter, digit, or ``<``. If no such title appears
+lines starting in a letter, digit, ``<``, or ``$``. If no such title appears
literally in the ``.rst`` file, the object name is the ``<file-name>``.
If a title does appear, it is expected that ``<file-name>`` is equal
-to ``<object-name>`` with any ``<`` and ``>`` characters removed.
+to ``<object-name>`` with any ``<`` and ``>`` characters removed,
+or in the case of a ``$<genex-name>`` or ``$<genex-name:...>``, the
+``genex-name``.
Second, the CMake Domain provides directives to define objects inside
other documents:
@@ -187,6 +193,10 @@ other documents:
This indented block documents <envvar-name>.
+ .. genex:: <genex-name>
+
+ This indented block documents <genex-name>.
+
.. variable:: <variable-name>
This indented block documents <variable-name>.
@@ -197,6 +207,7 @@ the first approach above.
.. _`Sphinx Domain`: http://sphinx-doc.org/domains.html
.. _`cmake(1)`: https://cmake.org/cmake/help/latest/manual/cmake.1.html
.. _`cmake-env-variables(7)`: https://cmake.org/cmake/help/latest/manual/cmake-env-variables.7.html
+.. _`cmake-generator-expressions(7)`: https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html
.. _`cmake-modules(7)`: https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html
.. _`cmake-policies(7)`: https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html
.. _`cmake-properties(7)`: https://cmake.org/cmake/help/latest/manual/cmake-properties.7.html