From 0dfb36c837cd7e28f8d95795acb446a97f6a92d3 Mon Sep 17 00:00:00 2001 From: Oleg Shparber Date: Fri, 14 Aug 2026 04:47:44 +0300 Subject: [PATCH] build(cmake): set CMP0218 to NEW (#1952) --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a8b1c80..bae8081f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,9 +9,15 @@ setup_homebrew() # CMake options. set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) set(CMAKE_DISABLE_SOURCE_CHANGES ON) -set(CMAKE_ERROR_DEPRECATED TRUE) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") +if(POLICY CMP0218) + cmake_policy(SET CMP0218 NEW) + cmake_diagnostic(SET CMD_DEPRECATED FATAL_ERROR) +else() + set(CMAKE_ERROR_DEPRECATED TRUE) +endif() + # VERSION is the next development version, bumped automatically after each release. # ZEAL_RELEASE_VERSION is the last released version, updated by `just release-prepare`. # When both match, the build is treated as a release; otherwise it's a dev build.