summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-05-05 13:20:32 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-05-05 13:20:41 (GMT)
commitcd20592c6db8437aa74c8e3060b2eec687d84525 (patch)
tree7833cc472b09173f70b4451cafece2909f46db64 /Help
parentf533b548ca04775ee1e239f0ff0971a61ce61417 (diff)
parenta283e58b51e55bc843c8d341bf0f8bc91f2f9ef1 (diff)
downloadCMake-cd20592c6db8437aa74c8e3060b2eec687d84525.zip
CMake-cd20592c6db8437aa74c8e3060b2eec687d84525.tar.gz
CMake-cd20592c6db8437aa74c8e3060b2eec687d84525.tar.bz2
Merge topic 'ExternalProject-no-extract-timestamp'
a283e58b51 ExternalProject: Add DOWNLOAD_EXTRACT_TIMESTAMP option and policy Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7137
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-policies.7.rst1
-rw-r--r--Help/policy/CMP0135.rst29
-rw-r--r--Help/release/dev/ExternalProject-no-extract-timestamp.rst8
3 files changed, 38 insertions, 0 deletions
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index d1fafb5..b3091fa 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -58,6 +58,7 @@ Policies Introduced by CMake 3.24
.. toctree::
:maxdepth: 1
+ CMP0135: ExternalProject ignores timestamps in archives by default for the URL download method. </policy/CMP0135>
CMP0134: Fallback to \"HOST\" Windows registry view when \"TARGET\" view is not usable. </policy/CMP0134>
CMP0133: The CPack module disables SLA by default in the CPack DragNDrop Generator. </policy/CMP0133>
CMP0132: Do not set compiler environment variables on first run. </policy/CMP0132>
diff --git a/Help/policy/CMP0135.rst b/Help/policy/CMP0135.rst
new file mode 100644
index 0000000..1c0c134
--- /dev/null
+++ b/Help/policy/CMP0135.rst
@@ -0,0 +1,29 @@
+CMP0135
+-------
+
+.. versionadded:: 3.24
+
+When using the ``URL`` download method with the :command:`ExternalProject_Add`
+command, CMake 3.23 and below sets the timestamps of the extracted contents
+to the same as the timestamps in the archive. When the ``URL`` changes, the
+new archive is downloaded and extracted, but the timestamps of the extracted
+contents might not be newer than the previous contents. Anything that depends
+on the extracted contents might not be rebuilt, even though the contents may
+change.
+
+CMake 3.24 and above prefers to set the timestamps of all extracted contents
+to the time of the extraction. This ensures that anything that depends on the
+extracted contents will be rebuilt whenever the ``URL`` changes.
+
+The ``DOWNLOAD_EXTRACT_TIMESTAMP`` option to the
+:command:`ExternalProject_Add` command can be used to explicitly specify how
+timestamps should be handled. When ``DOWNLOAD_EXTRACT_TIMESTAMP`` is not
+given, this policy controls the default behavior. The ``OLD`` behavior for
+this policy is to restore the timestamps from the archive. The ``NEW``
+behavior sets the timestamps of extracted contents to the time of extraction.
+
+This policy was introduced in CMake version 3.24. CMake version |release|
+warns when the policy is not set and uses ``OLD`` behavior. Use the
+:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
+
+.. include:: DEPRECATED.txt
diff --git a/Help/release/dev/ExternalProject-no-extract-timestamp.rst b/Help/release/dev/ExternalProject-no-extract-timestamp.rst
new file mode 100644
index 0000000..0e8c01e
--- /dev/null
+++ b/Help/release/dev/ExternalProject-no-extract-timestamp.rst
@@ -0,0 +1,8 @@
+ExternalProject-no-extract-timestamp
+------------------------------------
+
+* The :command:`ExternalProject_Add` command gained a new
+ ``DOWNLOAD_EXTRACT_TIMESTAMP`` option for controlling whether the timestamps
+ of extracted contents are set to match those in the archive when the ``URL``
+ download method is used. A new policy :policy:`CMP0135` was added to control
+ the default behavior when the new option is not used.