blob: 2240874e0f09c0faa35672f3096066a874cd2d77 [file] [log] [blame]
Ryan Prichard7aea7e92022-01-13 17:30:17 -08001CMP0097
2-------
3
4.. versionadded:: 3.16
5
6:command:`ExternalProject_Add` with ``GIT_SUBMODULES ""`` initializes no
7submodules.
8
9The module provides a ``GIT_SUBMODULES`` option which controls what submodules
10to initialize and update. Starting with CMake 3.16, explicitly setting
11``GIT_SUBMODULES`` to an empty string means no submodules will be initialized
12or updated.
13
14This policy provides compatibility for projects that have not been updated
15to expect the new behavior.
16
17The ``OLD`` behavior for this policy is for ``GIT_SUBMODULES`` when set to
18an empty string to initialize and update all git submodules.
19The ``NEW`` behavior for this policy is for ``GIT_SUBMODULES`` when set to
20an empty string to initialize and update no git submodules.
21
22This policy was introduced in CMake version 3.16. Use the
23:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
24Unlike most policies, CMake version |release| does *not* warn
25when this policy is not set and simply uses ``OLD`` behavior.