Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMP: Set CMP0135 CMake policy to NEW #248

Merged
merged 1 commit into from Sep 20, 2023
Merged

COMP: Set CMP0135 CMake policy to NEW #248

merged 1 commit into from Sep 20, 2023

Conversation

jhlegarreta
Copy link
Member

@jhlegarreta jhlegarreta commented Sep 16, 2023

Set the CMP0135 CMake policy to NEW: the timestamps of the
extracted files will reflect the timestamps at extraction.

Fixes:

CMake Warning (dev) at /Users/runner/work/_temp/-2070939391/cmake-3.24.2-macos-universal/CMake.app/Contents/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.

raised for example in:
https://open.cdash.org/build/8993686/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

CMakeLists.txt Outdated Show resolved Hide resolved
Set the `CMP0135` CMake policy to `NEW`: the timestamps of the
extracted files will reflect the timestamps at extraction.

Fixes:
```
CMake Warning (dev) at /Users/runner/work/_temp/-2070939391/cmake-3.24.2-macos-universal/CMake.app/Contents/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.
```

raised for example in:
https://open.cdash.org/build/8993686/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
@jhlegarreta jhlegarreta changed the title COMP: Set DOWNLOAD_EXTRACT_TIMESTAMP to TRUE COMP: Set CMP0135 CMake policy to NEW Sep 18, 2023
@jhlegarreta
Copy link
Member Author

The warning is gone:
https://open.cdash.org/index.php?project=Insight&date=2023-09-18

Thanks @dzenanz.

@dzenanz
Copy link
Member

dzenanz commented Sep 19, 2023

Merge after CI comes back clean.

@thewtex thewtex merged commit acc31dc into InsightSoftwareConsortium:main Sep 20, 2023
18 checks passed
@jhlegarreta jhlegarreta deleted the FixExtractTimestampCMakePolicyWarnings branch September 20, 2023 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants