CMP0097.rst 1.0 KB

12345678910111213141516171819202122232425262728
  1. CMP0097
  2. -------
  3. .. versionadded:: 3.16
  4. :command:`ExternalProject_Add` with ``GIT_SUBMODULES ""`` initializes no
  5. submodules. The policy also applies to :command:`FetchContent_Declare`,
  6. which uses the same download and update features as
  7. :command:`ExternalProject_Add`.
  8. The commands provide a ``GIT_SUBMODULES`` option which controls what submodules
  9. to initialize and update. Starting with CMake 3.16, explicitly setting
  10. ``GIT_SUBMODULES`` to an empty string means no submodules will be initialized
  11. or updated.
  12. This policy provides compatibility for projects that have not been updated
  13. to expect the new behavior.
  14. The ``OLD`` behavior for this policy is for ``GIT_SUBMODULES`` when set to
  15. an empty string to initialize and update all git submodules.
  16. The ``NEW`` behavior for this policy is for ``GIT_SUBMODULES`` when set to
  17. an empty string to initialize and update no git submodules.
  18. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.16
  19. .. |WARNS_OR_DOES_NOT_WARN| replace:: does *not* warn
  20. .. include:: STANDARD_ADVICE.txt
  21. .. include:: DEPRECATED.txt