Hirrolot / datatype99

Algebraic data types for C99
MIT License
1.36k stars 23 forks source link

On CMake 3.24.2 DOWNLOAD_EXTRACT_TIMESTAMP warning appears #15

Closed widgetii closed 1 year ago

widgetii commented 1 year ago

After upgrading to fresh CMake 3.24.2 I got an unpleasant warning:

CMake Warning (dev) at /usr/share/cmake/Modules/FetchContent.cmake:1267 (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):
  build/_deps/datatype99-src/CMakeLists.txt:6 (FetchContent_Declare)
This warning is for project developers.  Use -Wno-dev to suppress it.

Similar issues and PR suggestions are 1 and 2. Consider adding the same fix into the project.

P.S. The same issue is with interface99 and smolrtsp as well

Hirrolot commented 1 year ago

I've downloaded cmake version 3.24.3 and tested the fix. Let me know if you have any additional concerns with regard to CMake. To apply the fix immediately to your project:

FetchContent_Declare(
  datatype99
  GIT_REPOSITORY https://github.com/Hirrolot/datatype99
  GIT_TAG aa24712)