From: Craig Scott Date: Wed, 16 Aug 2023 05:55:44 +0000 (+1000) Subject: [PATCH] Specify CMake policy range to avoid deprecation warning X-Git-Tag: archive/raspbian/0.8.0+dfsg-9+rpi1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=db0c64fabd7e911d22267848330ee8d1bad2d22f;p=yaml-cpp.git [PATCH] Specify CMake policy range to avoid deprecation warning CMake 3.27 started issuing a deprecation warning for any cmake_minimum_required() call that specified a minimum version older than 3.5. Specifying a version range instead of a simple minimum version avoids that warning without raising the minimum supported CMake version. The NEW policy behavior will be used for all policies introduced up to CMake 3.14 with this change. Gbp-Pq: Name 1211.patch --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 09b3a0b..a052e17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,6 @@ -# 3.5 is actually available almost everywhere, but this a good minimum -cmake_minimum_required(VERSION 3.4) +# 3.5 is actually available almost everywhere, but this a good minimum. +# 3.14 as the upper policy limit avoids CMake deprecation warnings. +cmake_minimum_required(VERSION 3.4...3.14) # enable MSVC_RUNTIME_LIBRARY target property # see https://cmake.org/cmake/help/latest/policy/CMP0091.html