Skip to content
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

Fix warning about DOWNLOAD_EXTRACT_TIMESTAMP on CMake >= 3.24 #192

Open
juliandie opened this issue Oct 1, 2024 · 0 comments
Open

Fix warning about DOWNLOAD_EXTRACT_TIMESTAMP on CMake >= 3.24 #192

juliandie opened this issue Oct 1, 2024 · 0 comments

Comments

@juliandie
Copy link

I am facing this warning during cmake.
Reproduce using CMake >= 3.24

mkdir build; cd build; cmake ..
CMake Warning (dev) at /usr/share/cmake-3.25/Modules/ExternalProject.cmake:3075 (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/share/cmake-3.25/Modules/ExternalProject.cmake:4185 (_ep_add_download_command)
  CMakeLists.txt:116 (EXTERNALPROJECT_ADD)
This warning is for project developers.  Use -Wno-dev to suppress it.

I could find the same issue in github.com/ethereum/solidity

There this issue was fixed by adding below to CMakeLists.txt

# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 2.24:
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
  cmake_policy(SET CMP0135 NEW)
endif()

I couldn't get this fixed by adding those lines in the parent-project, therefore I have created this issue.

Best Regards

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant