Skip to content

Commit c6914c2

Browse files
committed
Include information about FetchContent in offline build section
1 parent 59a262b commit c6914c2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/dev/compile/Compile.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,3 +442,14 @@ a command starting with ``cmake .. -G Ninja`` on Linux and macOS, following the
442442
instructions in the sections above. CMake should automatically locate files that
443443
you placed in ``CMake/downloads``, and use them instead of attempting to
444444
download them.
445+
446+
In addition, some packages used by DFHack are managed using CMake's ``FetchContent``
447+
feature, which requires an online connection during builds. The simplest way to address
448+
this is to have a connection during the first build (during which CMake will download the
449+
dependencies), and then to use CMake's ``FETCHCONTENT_FULLY_DISCONNECTED`` or
450+
``FETCHCONTENT_UPDATES_DISCONNECTED`` defines to control how CMake manages cached
451+
dependencies. If you need even the first-time build be an offline build, you will need
452+
to provide a CMake dependency provider. We do not provide one, but CMake's own documentation
453+
includes a simple provider. For more information about CMake's ``FetchContent`` feature
454+
and how to use it in offline builds, see the
455+
`CMake documentation <https://cmake.org/cmake/help/latest/module/FetchContent.html>`_.

0 commit comments

Comments
 (0)