summaryrefslogtreecommitdiffstats
path: root/Help/policy/CMP0097.rst
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2024-05-17 04:49:53 (GMT)
committerCraig Scott <craig.scott@crascit.com>2024-05-17 04:49:53 (GMT)
commiteda17e76e2fc484525baf3c6ef4e68b37074e2dc (patch)
tree91bbb156f6aae8e3e8d7478d274ca842e965a4fd /Help/policy/CMP0097.rst
parent3f28a819ce00dfd2b26f863ce7e761a68b95726a (diff)
downloadCMake-eda17e76e2fc484525baf3c6ef4e68b37074e2dc.zip
CMake-eda17e76e2fc484525baf3c6ef4e68b37074e2dc.tar.gz
CMake-eda17e76e2fc484525baf3c6ef4e68b37074e2dc.tar.bz2
Help: Document that CMP0097 is always NEW for FetchContent
Fixes: #25971
Diffstat (limited to 'Help/policy/CMP0097.rst')
-rw-r--r--Help/policy/CMP0097.rst15
1 files changed, 12 insertions, 3 deletions
diff --git a/Help/policy/CMP0097.rst b/Help/policy/CMP0097.rst
index 66a7b96..d9141f5 100644
--- a/Help/policy/CMP0097.rst
+++ b/Help/policy/CMP0097.rst
@@ -4,9 +4,7 @@ CMP0097
.. versionadded:: 3.16
:command:`ExternalProject_Add` with ``GIT_SUBMODULES ""`` initializes no
-submodules. The policy also applies to :command:`FetchContent_Declare`,
-which uses the same download and update features as
-:command:`ExternalProject_Add`.
+submodules.
The commands provide a ``GIT_SUBMODULES`` option which controls what submodules
to initialize and update. Starting with CMake 3.16, explicitly setting
@@ -25,4 +23,15 @@ an empty string to initialize and update no git submodules.
.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn
.. include:: STANDARD_ADVICE.txt
+.. note::
+
+ This policy also applies to :command:`FetchContent_Declare`,
+ which uses the same download and update features as
+ :command:`ExternalProject_Add`. However, due to an implementation deficiency
+ present since the policy was first introduced, CMake 3.16 and later always
+ uses the ``NEW`` behavior for :command:`FetchContent_Declare`, regardless of
+ the policy setting. Formally, this forcing of ``NEW`` behavior for
+ :command:`FetchContent_Declare` will continue to apply in future CMake
+ releases.
+
.. include:: DEPRECATED.txt