-
-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
COMP: Set DOWNLOAD_EXTRACT_TIMESTAMP
to TRUE
in wrapping modules
#3709
COMP: Set DOWNLOAD_EXTRACT_TIMESTAMP
to TRUE
in wrapping modules
#3709
Conversation
|
Thanks for addressing this warning Jon. Just looking at https://cmake.org/cmake/help/latest/policy/CMP0135.html Is the new CMake default behavior indeed preferable, for external projects CastXML and PCRE? |
As those are usually extracted only once, it should probably not matter? |
TBH, I do not know what the impact of the |
I have been encountering a new problem in SimpleITK related to automate needing to be rerun in PCRE and SWIG. It appears related to timestamps of file triggering the need to re-run. It may be related to this CMP. So setting this policy to new may not be with out side effects. I'm currently investigating.... |
My tests are confirming that configure/autoconf based projects like SWIG and PCRE[2] depend on the time stamps of the extracted files and the external project require setting DOWNLOAD_EXTRACT_TIMESTAMP to 0 to build robustly. This should be changed in this PR. The reported build error is related to the |
e7072ad
to
4622287
Compare
DOWNLOAD_EXTRACT_TIMESTAMP
to FALSE
in wrapping modules
4622287
to
0277e73
Compare
💯 Thanks Brad. I've amended the commit. |
DOWNLOAD_EXTRACT_TIMESTAMP is introduced with CMake 3.24: https://cmake.org/cmake/help/latest/release/3.24.html?highlight=download_extract_timestamp#modules Does that mean that Lines 13 to 15 in d81a02c
|
The minimum require version certainly should not be updated to 3.24. The alternate would be conditionally assign |
OK, but we now have Line 14 in d81a02c
Shouldn't that already have preserved the old behavior, even when using CMake 3.24? |
ac40322
to
6e20e06
Compare
@N-Dekker According to Line 10 in 49150c8
So I guess they will appear for 3.24.
@blowekamp Thanks for the suggestions and directions forward. Tried to do them in 6e20e06.
The variable value seems to be OK, though. Not sure what's going on here; I run out of ideas. |
729dac8
to
8cd8afc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outstanding, thank you so much for addressing this, @jhlegarreta !
@jhlegarreta I apologize. It appears I had the logic of DOWNLOAD_EXTRACT_TIMESTAMP should be set to TRUE for SWIG and PCRE. I have reread the documentation for the CMP0135 and it's clarity should be improved.. Setting DOWNLOAD_EXTRACT_TIMESTAMP to TRUE is the OLD behavior. The OLD behaviors preserved the timestamp in the archive. This is required for SWIG and PCRE which have timed stamped files for autoconf dependencies. @bradking FYI for CMake maintainer. |
Set `DOWNLOAD_EXTRACT_TIMESTAMP` to `TRUE`: the timestamps of the extracted files will reflect the timestamps in the archive. Configure/autoconf based projects like SWIG and PCRE have timestamped files for their auto configuration dependencies. Thus, they depend on the timestamps of the extracted files, and the external projects require setting `DOWNLOAD_EXTRACT_TIMESTAMP` to `TRUE` to build robustly. Set the `CMP0135` policy to `NEW` for the CastXML CMake-based project. Suppresses CMake warnings in wrapping modules. Fixes: ``` CMake Warning (dev) at /usr/local/share/cmake-3.24/Modules/ExternalProject.cmake:3074 (message): The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is not set. The policy's OLD behavior will be used. When using a URL download, the timestamps of extracted files should preferably be that of the time of extraction, otherwise code that depends on the extracted contents might not be rebuilt if the URL changes. The OLD behavior preserves the timestamps from the archive instead, but this is usually not what you want. Update your project to the NEW behavior or specify the DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this robustness issue. Call Stack (most recent call first): /usr/local/share/cmake-3.24/Modules/ExternalProject.cmake:4170 (_ep_add_download_command) Wrapping/Generators/SwigInterface/CMakeLists.txt:142 (ExternalProject_Add) This warning is for project developers. Use -Wno-dev to suppress it. -- Found BISON: /usr/bin/bison (found version "3.5.1") CMake Warning (dev) at /usr/local/share/cmake-3.24/Modules/ExternalProject.cmake:3074 (message): The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is not set. The policy's OLD behavior will be used. When using a URL download, the timestamps of extracted files should preferably be that of the time of extraction, otherwise code that depends on the extracted contents might not be rebuilt if the URL changes. The OLD behavior preserves the timestamps from the archive instead, but this is usually not what you want. Update your project to the NEW behavior or specify the DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this robustness issue. Call Stack (most recent call first): /usr/local/share/cmake-3.24/Modules/ExternalProject.cmake:4170 (_ep_add_download_command) Wrapping/Generators/SwigInterface/CMakeLists.txt:243 (ExternalProject_Add) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) at /usr/local/share/cmake-3.24/Modules/ExternalProject.cmake:3074 (message): The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is not set. The policy's OLD behavior will be used. When using a URL download, the timestamps of extracted files should preferably be that of the time of extraction, otherwise code that depends on the extracted contents might not be rebuilt if the URL changes. The OLD behavior preserves the timestamps from the archive instead, but this is usually not what you want. Update your project to the NEW behavior or specify the DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this robustness issue. Call Stack (most recent call first): /usr/local/share/cmake-3.24/Modules/ExternalProject.cmake:4170 (_ep_add_download_command) Wrapping/Generators/CastXML/CMakeLists.txt:63 (ExternalProject_Add) This warning is for project developers. Use -Wno-dev to suppress it. ``` raised for example in: https://open.cdash.org/build/8245525/configure Related documentation: https://cmake.org/cmake/help/latest/module/ExternalProject.html?highlight=download_extract_timestamp https://cmake.org/cmake/help/latest/policy/CMP0135.html
8cd8afc
to
331b474
Compare
DOWNLOAD_EXTRACT_TIMESTAMP
to FALSE
in wrapping modulesDOWNLOAD_EXTRACT_TIMESTAMP
to TRUE
in wrapping modules
@blowekamp It's fine, thanks Brad. I should have done a better job understanding as well. I've amended the commit, changed the subject and message body according to what you described. See if it now matches the appropriate behavior. |
@blowekamp For an open-source project like CMake, if you think that documentation should be improved, the usual response/expectation is to propose the change you think would improve it. I took a look at the doc you pointed out, and I didn't an obvious improvement opportunity. |
Set
DOWNLOAD_EXTRACT_TIMESTAMP
toTRUE
: the timestamps of theextracted files will reflect the timestamps in the archive.
Configure/autoconf based projects like SWIG and PCRE have timestamped
files for their auto configuration dependencies. Thus, they depend on
the timestamps of the extracted files, and the external projects require
setting
DOWNLOAD_EXTRACT_TIMESTAMP
toTRUE
to build robustly.Set the
CMP0135
policy toNEW
for the CastXML CMake-based project.Suppresses CMake warnings in wrapping modules.
Fixes:
raised for example in:
https://open.cdash.org/build/8245525/configure
Related documentation:
https://cmake.org/cmake/help/latest/module/ExternalProject.html?highlight=download_extract_timestamp
https://cmake.org/cmake/help/latest/policy/CMP0135.html
PR Checklist