Browse Source
Help: Use captions for code snippets in the `FetchContent` module
Instead of "manually" added captions use the Sphinx option of
`code-block` directive.
pull/357/head
Alex Turbov
3 years ago
No known key found for this signature in database
GPG Key ID: 8BEDB7D11F95D5E3
1 changed files with
4 additions and
6 deletions
-
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) |
|
|
|