summaryrefslogtreecommitdiffstats
path: root/Modules/FetchContent.cmake
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2023-12-16 09:36:26 (GMT)
committerCraig Scott <craig.scott@crascit.com>2023-12-16 09:36:26 (GMT)
commit18c514a86d980e62bf7f86a69fc154a23f5669a2 (patch)
treea47bb160681f0eb6a4628c9ac141da46c858e2b1 /Modules/FetchContent.cmake
parent6ba3bb0563ca72fa6fa7bc705bdf38187e3fa485 (diff)
downloadCMake-18c514a86d980e62bf7f86a69fc154a23f5669a2.zip
CMake-18c514a86d980e62bf7f86a69fc154a23f5669a2.tar.gz
CMake-18c514a86d980e62bf7f86a69fc154a23f5669a2.tar.bz2
Help: Add note not to use FETCHCONTENT_FULLY_DISCONNECTED on first run
Fixes: #25481
Diffstat (limited to 'Modules/FetchContent.cmake')
-rw-r--r--Modules/FetchContent.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/FetchContent.cmake b/Modules/FetchContent.cmake
index 1038585..d3a17b3 100644
--- a/Modules/FetchContent.cmake
+++ b/Modules/FetchContent.cmake
@@ -685,6 +685,17 @@ A number of cache variables can influence the behavior where details from a
any content details, turning this option ``ON`` can significantly speed up
the configure stage. It is ``OFF`` by default.
+ .. note::
+
+ The ``FETCHCONTENT_FULLY_DISCONNECTED`` variable is not an appropriate way
+ to prevent any network access on the first run in a build directory.
+ Doing so can break projects, lead to misleading error messages, and hide
+ subtle population failures. This variable is specifically intended to
+ only be turned on *after* the first time CMake has been run.
+ If you want to prevent network access even on the first run, use a
+ :ref:`dependency provider <dependency_providers>` and populate the
+ dependency from local content instead.
+
.. variable:: FETCHCONTENT_UPDATES_DISCONNECTED
This is a less severe download/update control compared to