CMP0135.rst 1.3 KB

1234567891011121314151617181920212223242526272829
  1. CMP0135
  2. -------
  3. .. versionadded:: 3.24
  4. When using the ``URL`` download method with the :command:`ExternalProject_Add`
  5. command, CMake 3.23 and below sets the timestamps of the extracted contents
  6. to the same as the timestamps in the archive. When the ``URL`` changes, the
  7. new archive is downloaded and extracted, but the timestamps of the extracted
  8. contents might not be newer than the previous contents. Anything that depends
  9. on the extracted contents might not be rebuilt, even though the contents may
  10. 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
  15. :command:`ExternalProject_Add` command can be used to explicitly specify how
  16. 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:: STANDARD_ADVICE.txt
  23. .. include:: DEPRECATED.txt