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