summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-22 23:49:45 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-23 13:36:00 (GMT)
commit2945814de29923b8f063fa179f282fbbae630a36 (patch)
tree6affd5691e97ee5171960aee7bb1deacbd6c6985 /Tests
parent8bb2ee96cc8ae16d039a648c87004e828e9cba16 (diff)
downloadCMake-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 'Tests')
-rw-r--r--Tests/CMakeLib/testRST.expect6
-rw-r--r--Tests/CMakeLib/testRSTmod.cmake7
2 files changed, 13 insertions, 0 deletions
diff --git a/Tests/CMakeLib/testRST.expect b/Tests/CMakeLib/testRST.expect
index 9bd0ca4..744cb88 100644
--- a/Tests/CMakeLib/testRST.expect
+++ b/Tests/CMakeLib/testRST.expect
@@ -27,6 +27,12 @@ CMake Module Content
More CMake Module Content
+Bracket Comment Content
+
+[
+Bracket Comment Content
+]
+
.. cmake:command:: some_cmd
Command some_cmd description.
diff --git a/Tests/CMakeLib/testRSTmod.cmake b/Tests/CMakeLib/testRSTmod.cmake
index dfa793d..8b807a6 100644
--- a/Tests/CMakeLib/testRSTmod.cmake
+++ b/Tests/CMakeLib/testRSTmod.cmake
@@ -2,3 +2,10 @@
# CMake Module Content
#.rst:
# More CMake Module Content
+#[[.rst:
+Bracket Comment Content
+# not part of content]] # not part of content
+#[=[.rst:
+[
+Bracket Comment Content
+]]=] # not part of content