Skip to content

Fix for CMake policy CMP0135

Guilherme Lima requested to merge lima/fix-CMP0135 into master

When using CMake 3.27 to build VecGeom with VECGEOM_BUILTIN_VECCORE=ON, a CMake policy warning is printed:

CMake Warning (dev) at /srv/software/el8/x86_64/hpc/cmake/3.27.3/share/cmake-3.27/Modules/ExternalProject.cmake:3136 (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):
  /srv/software/el8/x86_64/hpc/cmake/3.27.3/share/cmake-3.27/Modules/ExternalProject.cmake:4345 (_ep_add_download_command)
  CMakeLists.txt:5 (ExternalProject_add)
This warning is for project developers.  Use -Wno-dev to suppress it.

This commit adds the option DOWNLOAD_EXTRACT_TIMESTAMP OFF to the ExternalProject_add() function which builds VecCore, as recommended by CMP0135.

For more details, see https://cmake.org/cmake/help/latest/policy/CMP0135.html.

Merge request reports