Fix CMake CMP0135 warnings for ExternalProject downloads#5083
Fix CMake CMP0135 warnings for ExternalProject downloads#5083mvanhorn wants to merge 3 commits intoponylang:mainfrom
Conversation
Set cmake_policy(SET CMP0135 NEW) so that ExternalProject_Add URL downloads use extraction-time timestamps instead of archive timestamps. This silences the dev warnings from gbenchmark and googletest downloads. Fixes ponylang#4852 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Thanks for the PR! The Since the fix only applies to the two |
Replace cmake_policy(SET CMP0135 NEW) with per-call DOWNLOAD_EXTRACT_TIMESTAMP TRUE on both ExternalProject_Add invocations. Avoids requiring CMake 3.24+ since the minimum is 3.21.
|
Good catch on the minimum version. Switched to DOWNLOAD_EXTRACT_TIMESTAMP TRUE on both ExternalProject_Add calls in 2ccbf0e. |
|
And I just noticed that DOWNLOAD_EXTRACT_TIMESTAMP is also Cmake 3.24. Ugh. Some more searching suggests that something like at the top of the file is "idiomatic" for handling this. but i haven't validated that. also i might have gotten my reading of DOWNLOAD_EXTRACT_TIMESTAMP wrong and now I think maybe it would have been FALSE not TRUE. that we would have wanted. Not that it was the right thing but looks like I double-wronged it. |
Replace per-target DOWNLOAD_EXTRACT_TIMESTAMP with a top-level policy guard that works on CMake 3.21+ (the project minimum).
|
Switched to the |
Sets
cmake_policy(SET CMP0135 NEW)inlib/CMakeLists.txtso thatExternalProject_AddURL downloads use extraction-time timestamps insteadof archive timestamps. This silences both dev warnings from the gbenchmark
and googletest downloads reported in #4852.
The
NEWbehavior is the recommended default since CMake 3.24 and ensuresthat code depending on extracted contents is correctly rebuilt when the URL
changes.
Fixes #4852