diff options
author | Matthew Woehlke <matthew.woehlke@kitware.com> | 2023-02-24 20:01:14 (GMT) |
---|---|---|
committer | Matthew Woehlke <matthew.woehlke@kitware.com> | 2023-03-03 22:05:02 (GMT) |
commit | 74e3c1d313616b5faf83ff423c8e8ef3f2010a41 (patch) | |
tree | 7f24ecc7db552a3e658a742848cdc0f408c06c7a /Tests/CMakeLib | |
parent | c09b7604841448b0c949e5c98ea791c9dc9d477e (diff) | |
download | CMake-74e3c1d313616b5faf83ff423c8e8ef3f2010a41.zip CMake-74e3c1d313616b5faf83ff423c8e8ef3f2010a41.tar.gz CMake-74e3c1d313616b5faf83ff423c8e8ef3f2010a41.tar.bz2 |
Utilities/Sphinx: Add a directive to document command signatures
Add a `signature` directive to offer a CMake version of Sphinx's
`function` directive, similar to that found in other domains (py, cpp,
etc.). Like others, this takes one or more signatures as arguments and
creates dt/dd nodes from the signatures and the directive contents.
Diffstat (limited to 'Tests/CMakeLib')
-rw-r--r-- | Tests/CMakeLib/testRST.expect | 8 | ||||
-rw-r--r-- | Tests/CMakeLib/testRST.rst | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/Tests/CMakeLib/testRST.expect b/Tests/CMakeLib/testRST.expect index 5e3cdb1..076562a 100644 --- a/Tests/CMakeLib/testRST.expect +++ b/Tests/CMakeLib/testRST.expect @@ -70,6 +70,14 @@ Bracket Comment Content Generator expression $<OTHER_GENEX> description. +.. cmake:signature:: some_command(SOME_SIGNATURE) + + Command some_command SOME_SIGNATURE description. + +.. signature:: other_command(OTHER_SIGNATURE) + + Command other_command OTHER_SIGNATURE description. + .. cmake:variable:: some_var Variable some_var description. diff --git a/Tests/CMakeLib/testRST.rst b/Tests/CMakeLib/testRST.rst index 4139801..43b08da 100644 --- a/Tests/CMakeLib/testRST.rst +++ b/Tests/CMakeLib/testRST.rst @@ -73,6 +73,14 @@ Inline literal ``__`` followed by inline link `Link Text <InternalDest_>`_. Generator expression $<OTHER_GENEX> description. +.. cmake:signature:: some_command(SOME_SIGNATURE) + + Command some_command SOME_SIGNATURE description. + +.. signature:: other_command(OTHER_SIGNATURE) + + Command other_command OTHER_SIGNATURE description. + .. cmake:variable:: some_var Variable some_var description. |