Skip to content

Commit

Permalink
Silence warnings when building with CMake 3.27 (#717)
Browse files Browse the repository at this point in the history
* HunterGate: Update embedded HunterGate to latest

* Silence warnings when building with CMake 3.27

* 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.
* Also integrate cpp-pm/gate#16
  applying this to HunterGate
  • Loading branch information
hjmallon committed Oct 30, 2023
1 parent f1ecb94 commit 8c3a9ba
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions cmake/modules/hunter_create_cache_file.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,22 @@ function(hunter_create_cache_file cache_path)
"set(CMAKE_POLICY_DEFAULT_CMP0069 NEW CACHE INTERNAL \"\")\n"
)

# CMP0114 should be set to NEW to squash CMake warnings at Xcode build time,
# without modifying source code
file(
APPEND
"${temp_path}"
"set(CMAKE_POLICY_DEFAULT_CMP0114 NEW CACHE INTERNAL \"\")\n"
)

# CMP0135 should be set to NEW to squash CMake warnings at build time,
# without modifying source code
file(
APPEND
"${temp_path}"
"set(CMAKE_POLICY_DEFAULT_CMP0135 NEW CACHE INTERNAL \"\")\n"
)

# Disable package registry {
### http://www.cmake.org/cmake/help/v3.1/manual/cmake-packages.7.html#disabling-the-package-registry
file(
Expand Down
2 changes: 1 addition & 1 deletion gate
Submodule gate updated 3 files
+3 −3 CMakeLists.txt
+44 −21 README.md
+20 −16 cmake/HunterGate.cmake

0 comments on commit 8c3a9ba

Please sign in to comment.