diff options
author | Brad King <brad.king@kitware.com> | 2013-10-22 23:49:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-23 13:36:00 (GMT) |
commit | 2945814de29923b8f063fa179f282fbbae630a36 (patch) | |
tree | 6affd5691e97ee5171960aee7bb1deacbd6c6985 /Help/manual/cmake-developer.7.rst | |
parent | 8bb2ee96cc8ae16d039a648c87004e828e9cba16 (diff) | |
download | CMake-2945814de29923b8f063fa179f282fbbae630a36.zip CMake-2945814de29923b8f063fa179f282fbbae630a36.tar.gz CMake-2945814de29923b8f063fa179f282fbbae630a36.tar.bz2 |
cmRST: Teach cmake-module directive to scan bracket comments
When scanning CMake module files for .rst comments, recognize
bracket comments starting in ".rst:" too. For example:
#[[.rst:
Include the bracket comment content terminated by the closing bracket.
Exclude the line containing the bracket if it starts in "#".
Teach the CMakeLib.testRST test to cover multiple bracket lengths
and ending brackets on lines with and without "#".
Update the cmake-developer.7 manual to document the bracket-comment
syntax for .rst documentation.
Diffstat (limited to 'Help/manual/cmake-developer.7.rst')
-rw-r--r-- | Help/manual/cmake-developer.7.rst | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index f6b8150..198a240 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -253,6 +253,21 @@ Add to the top of ``Modules/<module-name>.cmake`` a #-comment of the form: # # <reStructuredText documentation of module> +or a bracket-comment of the form: + +.. code-block:: cmake + + #[[.rst: + <module-name> + ------------- + + <reStructuredText documentation of module> + #]] + +Any number of ``=`` may be used in the opening and closing brackets +as long as they match. Content on the line containing the closing +bracket is excluded if and only if the line starts in ``#``. + Additional such ``.rst:`` comments may appear anywhere in the module file. All such comments must start with ``#`` in the first column. @@ -276,12 +291,13 @@ For example, a ``Modules/Findxxx.cmake`` module may contain: <code> - #.rst: - # .. command:: xxx_do_something - # - # This command does something for Xxx:: - # - # xxx_do_something(some arguments) + #[========================================[.rst: + .. command:: xxx_do_something + + This command does something for Xxx:: + + xxx_do_something(some arguments) + #]========================================] macro(xxx_do_something) <code> endmacro() |