CMP0097.rst 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. CMP0097
  2. -------
  3. .. versionadded:: 3.16
  4. :command:`ExternalProject_Add` with ``GIT_SUBMODULES ""`` initializes no
  5. submodules.
  6. The commands provide a ``GIT_SUBMODULES`` option which controls what submodules
  7. to initialize and update. Starting with CMake 3.16, explicitly setting
  8. ``GIT_SUBMODULES`` to an empty string means no submodules will be initialized
  9. or updated.
  10. This policy provides compatibility for projects that have not been updated
  11. to expect the new behavior.
  12. The ``OLD`` behavior for this policy is for ``GIT_SUBMODULES`` when set to
  13. an empty string to initialize and update all git submodules.
  14. The ``NEW`` behavior for this policy is for ``GIT_SUBMODULES`` when set to
  15. an empty string to initialize and update no git submodules.
  16. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.16
  17. .. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn
  18. .. include:: STANDARD_ADVICE.txt
  19. .. note::
  20. This policy also applies to :command:`FetchContent_Declare`,
  21. which uses the same download and update features as
  22. :command:`ExternalProject_Add`. However, due to an implementation deficiency
  23. present since the policy was first introduced, CMake 3.16 and later always
  24. uses the ``NEW`` behavior for :command:`FetchContent_Declare`, regardless of
  25. the policy setting. Formally, this forcing of ``NEW`` behavior for
  26. :command:`FetchContent_Declare` will continue to apply in future CMake
  27. releases.
  28. .. include:: DEPRECATED.txt