CMP0170.rst 1.2 KB

123456789101112131415161718192021222324252627282930
  1. CMP0170
  2. -------
  3. .. versionadded:: 3.30
  4. When ``FETCHCONTENT_FULLY_DISCONNECTED`` is set to true,
  5. :command:`FetchContent_MakeAvailable` and :command:`FetchContent_Populate`
  6. enforce the constraint that their source directory must already be populated.
  7. The requirement has always been documented, but it was not checked or enforced
  8. with CMake 3.29 or older. This sometimes led to hard-to-trace errors when a
  9. project expected a dependency to have been populated, but its population was
  10. silently skipped.
  11. CMake 3.30 and above prefers to check and enforce the constraint.
  12. This policy provides compatibility for situations where the user cannot easily
  13. prevent ``FETCHCONTENT_FULLY_DISCONNECTED`` from being inappropriately set
  14. to true.
  15. The ``OLD`` behavior of this policy allows ``FETCHCONTENT_FULLY_DISCONNECTED``
  16. to be set to true even if a dependency's source directory has not been
  17. populated.
  18. The ``NEW`` behavior halts with a fatal error if
  19. ``FETCHCONTENT_FULLY_DISCONNECTED`` is set to true and a dependency population
  20. would be skipped, but that dependency's source directory doesn't exist.
  21. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.30
  22. .. |WARNS_OR_DOES_NOT_WARN| replace:: warns
  23. .. include:: include/STANDARD_ADVICE.rst
  24. .. include:: include/DEPRECATED.rst