From: Yurii Rashkovskii Date: Fri, 23 Dec 2022 22:33:31 +0000 (-0800) Subject: Problem: modern CMake warns about version 2.8 X-Git-Tag: json-c-0.17-20230812~24^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F802%2Fhead;p=thirdparty%2Fjson-c.git Problem: modern CMake warns about version 2.8 The warning is as follows: ``` Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. ``` Solution: set it at 2.8.12 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 2be027d6..d234af72 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,9 @@ -# Many projects still are stuck using CMake 2.8 is several places so it's good to provide backward support too. This is +# Many projects still are stuck using CMake 2.8 in several places so it's good to provide backward support too. This is # specially true in old embedded systems (OpenWRT and friends) where CMake isn't necessarily upgraded. -cmake_minimum_required(VERSION 2.8) +# We set it to 2.8.12 as CMake currently indicates that support for versions below it will be removed +# from a future version ("Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.") +# 2.8.12 was released in 2013. +cmake_minimum_required(VERSION 2.8.12) if(POLICY CMP0048) cmake_policy(SET CMP0048 NEW)