Skip to content

Commit 8c3a9ba

Browse files
authored
Silence warnings when building with CMake 3.27 (#717)
* 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
1 parent f1ecb94 commit 8c3a9ba

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

cmake/modules/hunter_create_cache_file.cmake

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,22 @@ function(hunter_create_cache_file cache_path)
195195
"set(CMAKE_POLICY_DEFAULT_CMP0069 NEW CACHE INTERNAL \"\")\n"
196196
)
197197

198+
# CMP0114 should be set to NEW to squash CMake warnings at Xcode build time,
199+
# without modifying source code
200+
file(
201+
APPEND
202+
"${temp_path}"
203+
"set(CMAKE_POLICY_DEFAULT_CMP0114 NEW CACHE INTERNAL \"\")\n"
204+
)
205+
206+
# CMP0135 should be set to NEW to squash CMake warnings at build time,
207+
# without modifying source code
208+
file(
209+
APPEND
210+
"${temp_path}"
211+
"set(CMAKE_POLICY_DEFAULT_CMP0135 NEW CACHE INTERNAL \"\")\n"
212+
)
213+
198214
# Disable package registry {
199215
### http://www.cmake.org/cmake/help/v3.1/manual/cmake-packages.7.html#disabling-the-package-registry
200216
file(

gate

0 commit comments

Comments
 (0)