Skip to content

Commit

Permalink
Silence warnings when building with CMake 3.27
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
hjmallon committed Oct 27, 2023
1 parent 5911e57 commit 78d54f7
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 1 files
+6 −0 cmake/HunterGate.cmake

0 comments on commit 78d54f7

Please sign in to comment.