mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-30 02:59:22 -05:00
Help: Fix cmake code block warnings produced by Sphinx 1.4
Some of our "cmake" code blocks do not use fully valid CMake syntax because they have placeholders for human reference. Sphinx has never been able to properly lex and highlight these, but now warns. Fix each block's syntax or change to a non-cmake block as appropriate.
This commit is contained in:
+3
-3
@@ -9,17 +9,17 @@ Conditionally execute a group of commands.
|
|||||||
# then section.
|
# then section.
|
||||||
COMMAND1(ARGS ...)
|
COMMAND1(ARGS ...)
|
||||||
COMMAND2(ARGS ...)
|
COMMAND2(ARGS ...)
|
||||||
...
|
#...
|
||||||
elseif(expression2)
|
elseif(expression2)
|
||||||
# elseif section.
|
# elseif section.
|
||||||
COMMAND1(ARGS ...)
|
COMMAND1(ARGS ...)
|
||||||
COMMAND2(ARGS ...)
|
COMMAND2(ARGS ...)
|
||||||
...
|
#...
|
||||||
else(expression)
|
else(expression)
|
||||||
# else section.
|
# else section.
|
||||||
COMMAND1(ARGS ...)
|
COMMAND1(ARGS ...)
|
||||||
COMMAND2(ARGS ...)
|
COMMAND2(ARGS ...)
|
||||||
...
|
#...
|
||||||
endif(expression)
|
endif(expression)
|
||||||
|
|
||||||
Evaluates the given expression. If the result is true, the commands
|
Evaluates the given expression. If the result is true, the commands
|
||||||
|
|||||||
@@ -540,7 +540,7 @@ a :ref:`Line Comment` block of the form:
|
|||||||
|
|
||||||
or a :ref:`Bracket Comment` of the form:
|
or a :ref:`Bracket Comment` of the form:
|
||||||
|
|
||||||
.. code-block:: cmake
|
::
|
||||||
|
|
||||||
#[[.rst:
|
#[[.rst:
|
||||||
<module-name>
|
<module-name>
|
||||||
@@ -558,7 +558,7 @@ All such comments must start with ``#`` in the first column.
|
|||||||
|
|
||||||
For example, a ``Modules/Findxxx.cmake`` module may contain:
|
For example, a ``Modules/Findxxx.cmake`` module may contain:
|
||||||
|
|
||||||
.. code-block:: cmake
|
::
|
||||||
|
|
||||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ invocation as exactly one argument.
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
.. code-block:: cmake
|
::
|
||||||
|
|
||||||
message("This is a quoted argument containing multiple lines.
|
message("This is a quoted argument containing multiple lines.
|
||||||
This is always one argument even though it contains a ; character.
|
This is always one argument even though it contains a ; character.
|
||||||
@@ -421,7 +421,7 @@ A ``#`` immediately followed by a `Bracket Argument`_ forms a
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
.. code-block:: cmake
|
::
|
||||||
|
|
||||||
#[[This is a bracket comment.
|
#[[This is a bracket comment.
|
||||||
It runs until the close bracket.]]
|
It runs until the close bracket.]]
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
# set(FOO_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@" )
|
# set(FOO_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@" )
|
||||||
# set(FOO_DATA_DIR "@CMAKE_INSTALL_PREFIX@/@RELATIVE_DATA_INSTALL_DIR@" )
|
# set(FOO_DATA_DIR "@CMAKE_INSTALL_PREFIX@/@RELATIVE_DATA_INSTALL_DIR@" )
|
||||||
# set(FOO_ICONS_DIR "@CMAKE_INSTALL_PREFIX@/share/icons" )
|
# set(FOO_ICONS_DIR "@CMAKE_INSTALL_PREFIX@/share/icons" )
|
||||||
# ...logic to determine installedPrefix from the own location...
|
# #...logic to determine installedPrefix from the own location...
|
||||||
# set(FOO_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@" )
|
# set(FOO_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@" )
|
||||||
#
|
#
|
||||||
# All 4 options shown above are not sufficient, since the first 3 hardcode the
|
# All 4 options shown above are not sufficient, since the first 3 hardcode the
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
# set(INCLUDE_INSTALL_DIR include/ ... CACHE )
|
# set(INCLUDE_INSTALL_DIR include/ ... CACHE )
|
||||||
# set(LIB_INSTALL_DIR lib/ ... CACHE )
|
# set(LIB_INSTALL_DIR lib/ ... CACHE )
|
||||||
# set(SYSCONFIG_INSTALL_DIR etc/foo/ ... CACHE )
|
# set(SYSCONFIG_INSTALL_DIR etc/foo/ ... CACHE )
|
||||||
# ...
|
# #...
|
||||||
# include(CMakePackageConfigHelpers)
|
# include(CMakePackageConfigHelpers)
|
||||||
# configure_package_config_file(FooConfig.cmake.in
|
# configure_package_config_file(FooConfig.cmake.in
|
||||||
# ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake
|
# ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
#
|
#
|
||||||
# ``FooConfig.cmake.in``:
|
# ``FooConfig.cmake.in``:
|
||||||
#
|
#
|
||||||
# .. code-block:: cmake
|
# ::
|
||||||
#
|
#
|
||||||
# set(FOO_VERSION x.y.z)
|
# set(FOO_VERSION x.y.z)
|
||||||
# ...
|
# ...
|
||||||
|
|||||||
Reference in New Issue
Block a user