summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2022-11-06 04:39:26 +0400
committerAlex Turbov <i.zaufi@gmail.com>2022-11-07 22:55:06 +0400
commit1d3630203ca3cc9c8a126213c626c75eb3ce3a6c (patch)
tree67b83cbb9b7159ccc7fcc5e980f0dd5300fa2648 /Modules
parent029210730a6b87629d937e6e5037dc2302010fc8 (diff)
downloadcmake-1d3630203ca3cc9c8a126213c626c75eb3ce3a6c.tar.gz
Help: Use captions for code snippets in the `FetchContent` module
Instead of "manually" added captions use the Sphinx option of `code-block` directive.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FetchContent.cmake10
1 files changed, 4 insertions, 6 deletions
diff --git a/Modules/FetchContent.cmake b/Modules/FetchContent.cmake
index 9acd0db131..80554d0070 100644
--- a/Modules/FetchContent.cmake
+++ b/Modules/FetchContent.cmake
@@ -923,9 +923,8 @@ it depends directly on projects ``projB`` and ``projC``. Both ``projB`` and
that all five projects are available on a company git server. The
``CMakeLists.txt`` of each project might have sections like the following:
-*projA*:
-
.. code-block:: cmake
+ :caption: *projA*
include(FetchContent)
FetchContent_Declare(
@@ -952,9 +951,9 @@ that all five projects are available on a company git server. The
# Order is important, see notes in the discussion further below
FetchContent_MakeAvailable(projD projB projC)
-*projB*:
.. code-block:: cmake
+ :caption: *projB*
include(FetchContent)
FetchContent_Declare(
@@ -970,9 +969,9 @@ that all five projects are available on a company git server. The
FetchContent_MakeAvailable(projD projE)
-*projC*:
.. code-block:: cmake
+ :caption: *projC*
include(FetchContent)
FetchContent_Declare(
@@ -1058,9 +1057,8 @@ firmware tarball using CMake's :manual:`script mode <cmake(1)>`. The call to
unpacked firmware will be placed in a ``firmware`` directory below the
current working directory.
-*getFirmware.cmake*:
-
.. code-block:: cmake
+ :caption: :file:`getFirmware.cmake`
# NOTE: Intended to be run in script mode with cmake -P
include(FetchContent)