cmake/Help/policy/CMP0097.rst

38 lines
1.4 KiB
ReStructuredText
Raw Normal View History

2020-02-01 23:06:01 +01:00
CMP0097
-------
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.16
2020-02-01 23:06:01 +01:00
:command:`ExternalProject_Add` with ``GIT_SUBMODULES ""`` initializes no
2024-07-09 14:46:46 +02:00
submodules.
2020-02-01 23:06:01 +01:00
2022-08-04 22:12:04 +02:00
The commands provide a ``GIT_SUBMODULES`` option which controls what submodules
2020-02-01 23:06:01 +01:00
to initialize and update. Starting with CMake 3.16, explicitly setting
``GIT_SUBMODULES`` to an empty string means no submodules will be initialized
or updated.
This policy provides compatibility for projects that have not been updated
to expect the new behavior.
The ``OLD`` behavior for this policy is for ``GIT_SUBMODULES`` when set to
an empty string to initialize and update all git submodules.
The ``NEW`` behavior for this policy is for ``GIT_SUBMODULES`` when set to
an empty string to initialize and update no git submodules.
2024-04-14 22:45:38 +02:00
.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.16
.. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn
.. include:: STANDARD_ADVICE.txt
2024-07-09 14:46:46 +02:00
.. 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.
2024-04-14 22:45:38 +02:00
.. include:: DEPRECATED.txt