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.