testRST.rst 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. .. index::
  2. single: directive ignored
  3. title_text
  4. ----------
  5. .. comment ignored
  6. ..
  7. comment ignored
  8. Command :cmake:command:`some_cmd` explicit cmake domain.
  9. Command :command:`some_cmd` without target.
  10. Command :command:`some_cmd <some_cmd>` with target.
  11. Command :command:`some_cmd_<cmd>` placeholder without target.
  12. Command :command:`some_cmd_<cmd> <some_cmd>` placeholder with target.
  13. Command :command:`some_cmd()` with parens.
  14. Command :command:`some_cmd(SUB)` with subcommand.
  15. Command :command:`some_cmd(SUB) <some_cmd>` with subcommand and target.
  16. Command :command:`some_cmd (SUB) <some_cmd>` with space and subcommand and target.
  17. Command :command:`some command <some_cmd>` with space and target.
  18. Variable :variable:`some variable <some_var>` space and target.
  19. Variable :variable:`<PLACEHOLDER>_VARIABLE` with leading placeholder.
  20. Variable :variable:`VARIABLE_<PLACEHOLDER>` with trailing placeholder.
  21. Variable :variable:`<PLACEHOLDER>_VARIABLE <target>` with leading placeholder and target.
  22. Variable :variable:`VARIABLE_<PLACEHOLDER> <target>` with trailing placeholder and target.
  23. Environment variable :envvar:`SOME_ENV_VAR`.
  24. Environment variable :envvar:`some env var <SOME_ENV_VAR>` with space and target.
  25. Generator :generator:`Some Generator` with space.
  26. Generator :cpack_gen:`Some Generator` with space.
  27. Generator expression :genex:`SOME_GENEX`.
  28. Generator expression :genex:`$<SOME_GENEX>` with brackets.
  29. Generator expression :genex:`$<SOME_GENEX:...>` with brackets and parameter.
  30. Generator expression :genex:`some genex <SOME_GENEX>` with space and target.
  31. Generator expression :genex:`$<SOME_GENEX> <SOME_GENEX>` with brackets, space, and target.
  32. Generator expression :genex:`$<SOME_GENEX:...> <SOME_GENEX>` with brackets, parameter, space, and target.
  33. Inline literal ``~!@#$%^&*( )_+-=\\[]{}'":;,<>.?/``.
  34. Inline link `Link Text <ExternalDest>`_.
  35. Inline link `Link Text \<With \\-escaped Brackets\> <ExternalDest>`_.
  36. Inline literal ``__`` followed by inline link `Link Text <InternalDest_>`_.
  37. .. |not replaced| replace:: not replaced through toctree
  38. .. |not replaced in literal| replace:: replaced in parsed literal
  39. .. toctree::
  40. :maxdepth: 2
  41. testRSTtoc1
  42. /testRSTtoc2
  43. .. cmake-module:: testRSTmod.cmake
  44. .. cmake:command:: some_cmd
  45. Command some_cmd description.
  46. .. command:: other_cmd
  47. Command other_cmd description.
  48. .. cmake:envvar:: some_var
  49. Environment variable some_var description.
  50. .. envvar:: other_var
  51. Environment variable other_var description.
  52. .. cmake:genex:: SOME_GENEX
  53. Generator expression SOME_GENEX description.
  54. .. genex:: $<OTHER_GENEX>
  55. Generator expression $<OTHER_GENEX> description.
  56. .. cmake:signature:: some_command(SOME_SIGNATURE)
  57. Command some_command SOME_SIGNATURE description.
  58. .. signature:: other_command(OTHER_SIGNATURE)
  59. Command other_command OTHER_SIGNATURE description.
  60. .. cmake:variable:: some_var
  61. Variable some_var description.
  62. .. variable:: other_var
  63. Variable other_var description.
  64. .. parsed-literal::
  65. Parsed-literal included without directive.
  66. Common Indentation Removed
  67. # |not replaced in literal|
  68. .. code-block:: cmake
  69. # Sample CMake code block
  70. if(condition)
  71. message(indented)
  72. endif()
  73. # |not replaced in literal|
  74. A literal block starts after a line consisting of two colons
  75. ::
  76. Literal block.
  77. Common Indentation Removed
  78. # |not replaced in literal|
  79. or after a paragraph ending in two colons::
  80. Literal block.
  81. Common Indentation Removed
  82. # |not replaced in literal|
  83. but not after a line ending in two colons::
  84. in the middle of a paragraph.
  85. A literal block can be empty::
  86. .. productionlist::
  87. grammar: `production`
  88. production: "content rendered"
  89. .. note::
  90. Notes are called out.
  91. .. versionadded:: 1.2
  92. Version blocks are preserved.
  93. .. versionchanged:: 2.3
  94. Version blocks are preserved.
  95. .. |substitution| replace::
  96. |nested substitution|
  97. with multiple lines becomes one line
  98. .. |nested substitution| replace:: substituted text
  99. .. include:: testRSTinclude1.rst
  100. .. include:: /testRSTinclude2.rst