Help: CMP0135 applies to FetchContent as well

This updates the CMP0135 documentation, which should have been
done as part of c2044fdf3f (FetchContent: Respect the CMP0135 policy
setting, 2022-06-02).

Issue: #23560
This commit is contained in:
Craig Scott
2024-04-27 11:01:45 +10:00
parent 301a26741d
commit 9b61a7147d
3 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -129,7 +129,7 @@ Policies Introduced by CMake 3.24
CMP0138: CheckIPOSupported uses flags from calling project. </policy/CMP0138> CMP0138: CheckIPOSupported uses flags from calling project. </policy/CMP0138>
CMP0137: try_compile() passes platform variables in project mode. </policy/CMP0137> CMP0137: try_compile() passes platform variables in project mode. </policy/CMP0137>
CMP0136: Watcom runtime library flags are selected by an abstraction. </policy/CMP0136> CMP0136: Watcom runtime library flags are selected by an abstraction. </policy/CMP0136>
CMP0135: ExternalProject ignores timestamps in archives by default for the URL download method. </policy/CMP0135> CMP0135: ExternalProject and FetchContent ignore 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> 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> 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> CMP0132: Do not set compiler environment variables on first run. </policy/CMP0132>
+9 -9
View File
@@ -4,20 +4,20 @@ CMP0135
.. versionadded:: 3.24 .. versionadded:: 3.24
When using the ``URL`` download method with the :command:`ExternalProject_Add` When using the ``URL`` download method with the :command:`ExternalProject_Add`
command, CMake 3.23 and below sets the timestamps of the extracted contents or :command:`FetchContent_Declare` commands, CMake 3.23 and below sets the
to the same as the timestamps in the archive. When the ``URL`` changes, the timestamps of the extracted contents to the same as the timestamps in the
new archive is downloaded and extracted, but the timestamps of the extracted archive. When the ``URL`` changes, the new archive is downloaded and extracted,
contents might not be newer than the previous contents. Anything that depends but the timestamps of the extracted contents might not be newer than the
on the extracted contents might not be rebuilt, even though the contents may previous contents. Anything that depends on the extracted contents might not
change. be rebuilt, even though the contents may change.
CMake 3.24 and above prefers to set the timestamps of all extracted contents 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 to the time of the extraction. This ensures that anything that depends on the
extracted contents will be rebuilt whenever the ``URL`` changes. extracted contents will be rebuilt whenever the ``URL`` changes.
The ``DOWNLOAD_EXTRACT_TIMESTAMP`` option to the The ``DOWNLOAD_EXTRACT_TIMESTAMP`` option to the :command:`ExternalProject_Add`
:command:`ExternalProject_Add` command can be used to explicitly specify how and :command:`FetchContent_Declare` commands can be used to explicitly specify
timestamps should be handled. When ``DOWNLOAD_EXTRACT_TIMESTAMP`` is not how timestamps should be handled. When ``DOWNLOAD_EXTRACT_TIMESTAMP`` is not
given, this policy controls the default behavior. The ``OLD`` behavior for given, this policy controls the default behavior. The ``OLD`` behavior for
this policy is to restore the timestamps from the archive. The ``NEW`` this policy is to restore the timestamps from the archive. The ``NEW``
behavior sets the timestamps of extracted contents to the time of extraction. behavior sets the timestamps of extracted contents to the time of extraction.
+2 -2
View File
@@ -406,8 +406,8 @@ class cmMakefile;
"is not usable.", \ "is not usable.", \
3, 24, 0, cmPolicies::WARN) \ 3, 24, 0, cmPolicies::WARN) \
SELECT(POLICY, CMP0135, \ SELECT(POLICY, CMP0135, \
"ExternalProject ignores timestamps in archives by default for the " \ "ExternalProject and FetchContent ignore timestamps in archives by " \
"URL download method", \ "default for the URL download method", \
3, 24, 0, cmPolicies::WARN) \ 3, 24, 0, cmPolicies::WARN) \
SELECT(POLICY, CMP0136, \ SELECT(POLICY, CMP0136, \
"Watcom runtime library flags are selected by an abstraction.", 3, \ "Watcom runtime library flags are selected by an abstraction.", 3, \