CMP0135.rst 1.4 KB

1234567891011121314151617181920212223242526272829
  1. CMP0135
  2. -------
  3. .. versionadded:: 3.24
  4. When using the ``URL`` download method with the :command:`ExternalProject_Add`
  5. or :command:`FetchContent_Declare` commands, CMake 3.23 and below sets the
  6. timestamps of the extracted contents to the same as the timestamps in the
  7. archive. When the ``URL`` changes, the new archive is downloaded and extracted,
  8. but the timestamps of the extracted contents might not be newer than the
  9. previous contents. Anything that depends on the extracted contents might not
  10. be rebuilt, even though the contents may change.
  11. CMake 3.24 and above prefers to set the timestamps of all extracted contents
  12. to the time of the extraction. This ensures that anything that depends on the
  13. extracted contents will be rebuilt whenever the ``URL`` changes.
  14. The ``DOWNLOAD_EXTRACT_TIMESTAMP`` option to the :command:`ExternalProject_Add`
  15. and :command:`FetchContent_Declare` commands can be used to explicitly specify
  16. how timestamps should be handled. When ``DOWNLOAD_EXTRACT_TIMESTAMP`` is not
  17. given, this policy controls the default behavior. The ``OLD`` behavior for
  18. this policy is to restore the timestamps from the archive. The ``NEW``
  19. behavior sets the timestamps of extracted contents to the time of extraction.
  20. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.24
  21. .. |WARNS_OR_DOES_NOT_WARN| replace:: warns
  22. .. include:: include/STANDARD_ADVICE.rst
  23. .. include:: include/DEPRECATED.rst