]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Bump CMake version to 3.4
authorJordan Williams <jordan@jwillikers.com>
Fri, 22 Jul 2022 19:27:14 +0000 (14:27 -0500)
committerJordan Williams <jordan@jwillikers.com>
Mon, 25 Jul 2022 19:14:56 +0000 (14:14 -0500)
With the minimum version set to 3.4, none of the policies need to be set explicitly to the `NEW` behavior.
Each of the policies removed here was introduced before CMake version 3.4.
By default then, each of them will be set to NEW automatically.
This is part of the behavior of cmake_minimum_required.
The cmake_policy commands are therefore redundant and have been removed.

CMakeLists.txt
README.cmake

index c7090d01942fbce0e8a897b7ba48af6986e267a3..0773cecc69dbd8416ca24d9e9551f3fa33d313a9 100644 (file)
@@ -1,3 +1,5 @@
+cmake_minimum_required(VERSION 3.4)
+
 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
@@ -7,20 +9,6 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0)
 
 project(dbus)
 
-# we need to be up to date
-cmake_minimum_required(VERSION 3.4 FATAL_ERROR)
-if(COMMAND cmake_policy)
-    cmake_policy(SET CMP0003 NEW)
-endif()
-
-if(CMAKE_MAJOR_VERSION GREATER 2)
-    cmake_policy(SET CMP0026 NEW)
-    if(CMAKE_MAJOR_VERSION GREATER 4 OR CMAKE_MINOR_VERSION GREATER 1)
-        cmake_policy(SET CMP0053 NEW)
-        cmake_policy(SET CMP0054 NEW)
-    endif()
-endif()
-
 option(DBUS_BUILD_TESTS "enable unit test code" ON)
 
 # detect version
index 281b730d11375f427df93e45672a8544879f03d8..03e5f27b3821cd5f9b591f0d7a0adf042526b9c2 100644 (file)
@@ -2,7 +2,7 @@ This file describes how to compile dbus using the cmake build system
 
 Requirements
 ------------
-- cmake version >= 2.6.0 see http://www.cmake.org
+- cmake version >= 3.4 see http://www.cmake.org
 - installed libexpat see http://sourceforge.net/projects/expat/ 
     unsupported RelWithDebInfo builds could be fetched 
     from http://sourceforge.net/projects/kde-windows/files/expat/