summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJordan Williams <jordan@jwillikers.com>2022-07-22 14:27:14 -0500
committerJordan Williams <jordan@jwillikers.com>2022-07-25 14:14:56 -0500
commitad5836cb0d24b0f4f35ee6d57392e21570f56689 (patch)
tree918b77583d5b9cf5dfa816ae403308f597f3f0f2 /CMakeLists.txt
parent8e0290fcc8908c89788c3fe254708c4b3cc02186 (diff)
downloaddbus-ad5836cb0d24b0f4f35ee6d57392e21570f56689.tar.gz
Bump CMake version to 3.4
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 2 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c7090d01..0773cecc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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