Skip to content

Conversation

@hjmallon
Copy link

  • I've checked this Git style guide. [Yes]
  • I've checked this CMake style guide. [Yes]
  • My change will work with CMake 3.5 (minimum requirement for Hunter). [Yes]
  • I will try to keep this pull request as small as possible and will try not to mix unrelated features. [Yes]

When I use Hunter with CMake 3.27 I see various CMake warnings

CMP0135 warning

CMake Warning (dev) at /usr/local/Cellar/cmake/3.27.7/share/cmake/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.

CMP0114 warning

CMake Warning (dev) at /usr/local/Cellar/cmake/3.27.7/share/cmake/Modules/ExternalProject.cmake:4099 (message):
  Policy CMP0114 is not set to NEW.  In order to support the Xcode "new build
  system", this project must be updated to set policy CMP0114 to NEW.

  Since CMake is generating for the Xcode "new build system",
  ExternalProject_Add will use policy CMP0114's NEW behavior anyway, but the
  generated build system may not match what the project intends.

This change (which requires this PR in HunterGate cpp-pm/gate#16) fixes both of those warnings in Hunter download and in Hunter project builds.

* CMake policy CMP0114 (introduced CMake 3.19) warns if
  ExternalProject is used with Xcode generator and is
  required to use Xcode 'new build system'
* CMake policy CMP0135 (introduced CMake 3.24) warns if
  DOWNLOAD_EXTRACT_TIMESTAMP is not specified in
  ExternalProject.
* TEMP: Also integrate cpp-pm/gate#16
  applying this to HunterGate
@hjmallon hjmallon marked this pull request as ready for review October 30, 2023 09:28
@hjmallon
Copy link
Author

gate rebased after my PR there was merged, this is ready now

@NeroBurner NeroBurner merged commit 8c3a9ba into cpp-pm:master Oct 30, 2023
@NeroBurner
Copy link

NeroBurner added a commit that referenced this pull request Jun 6, 2025
Link to Release:
https://github.com/cpp-pm/hunter/releases/tag/v0.25.3

Changes:

- Silence warnings when building with CMake 3.27 [GH#717](#717)
  - update `gate` submodule with fixed CMake 3.27 deprecation warnings as well
- `glog`: add version `0.6.0` and disable new dependencies [GH#719](#719)
- `ceres-solver`: update to `v2.2.0-p1` [GH#720](#720)
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.

2 participants