Help: Document that CMP0097 is always NEW for FetchContent

Fixes: #25971
This commit is contained in:
Craig Scott 2024-05-17 14:49:53 +10:00
parent 3f28a819ce
commit eda17e76e2
No known key found for this signature in database
GPG Key ID: 6FF37CBDCCADED9F

View File

@ -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