From 1d3630203ca3cc9c8a126213c626c75eb3ce3a6c Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Sun, 6 Nov 2022 04:39:26 +0400 Subject: Help: Use captions for code snippets in the `FetchContent` module Instead of "manually" added captions use the Sphinx option of `code-block` directive. --- Modules/FetchContent.cmake | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Modules/FetchContent.cmake b/Modules/FetchContent.cmake index 9acd0db..80554d0 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 `. 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) -- cgit v0.12