]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
CMake: request all policies up to CMake 3.12 being set to NEW 826/head
authorRolf Eike Beer <eb@emlix.com>
Tue, 5 Sep 2023 12:31:24 +0000 (14:31 +0200)
committerRolf Eike Beer <eb@emlix.com>
Tue, 5 Sep 2023 12:31:24 +0000 (14:31 +0200)
CMakeLists.txt

index 2484d1f501eaf3aed341b48ec016ae60282e8046..4ce1da944d3ed01b4197da5e0bb819b4cf494058 100644 (file)
@@ -3,7 +3,7 @@
 #   and many OpenWRT packages require, much newer CMake packages.
 #  We're stopping before 3.10 because that version starts requiring
 #   c++11, which isn't available on e.g HPUX.
-cmake_minimum_required(VERSION 3.9)
+cmake_minimum_required(VERSION 3.9...3.12)
 
 # JSON-C library is C only project.
 # PROJECT_VERSION{,_MAJOR,_MINOR,_PATCH} set by project():
@@ -16,13 +16,6 @@ endif()
 
 set(CMAKE_C_FLAGS_RELEASE   "${CMAKE_C_FLAGS_RELEASE} -O2")
 
-# Include file check macros honor CMAKE_REQUIRED_LIBRARIES
-# i.e. the check_include_file() calls will include -lm when checking.
-# New in version 3.12.
-if(POLICY CMP0075)
-       cmake_policy(SET CMP0075 NEW)
-endif()
-
 include(CTest)
 
 # Set some packaging variables.