changeset 878:491f408f6294

cmake: bump the minimum required version to 3.12 Even Debian old-old-stable (buster) shipped 3.13. This is needed because modern cmake (3.28) warns about specifying too old of a minimum required version: CMake Deprecation Warning at .../CMakeLists.txt:23 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake. Instead of bumping the version to 3.11 (the minimum), this change bumps it to 3.12 to make it past CMake policy CMP0075 change. The new behavior (respect CMAKE_REQUIRED_LIBRARIES in check_include_file) is saner, and so instead of explicitly opting for it in 3.11 we get it implicitly in 3.12. For completeness, here's the warning: CMake Warning (dev) at /usr/local/share/cmake-3.23/Modules/CheckIncludeFile.cmake:82 (message): Policy CMP0075 is not set: Include file check macros honor CMAKE_REQUIRED_LIBRARIES. Run "cmake --help-policy CMP0075" for policy details. Use the cmake_policy command to set the policy and suppress this warning. CMAKE_REQUIRED_LIBRARIES is set to: pthread For compatibility with CMake 3.11 and below this check is ignoring it. Call Stack (most recent call first): /usr/local/share/cmake-3.23/Modules/CheckTypeSize.cmake:256 (check_include_file) cmake/config-datamodel.cmake:25 (check_type_size) cmake/config.cmake:36 (include) CMakeLists.txt:54 (include) Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Sat, 20 Apr 2024 08:51:59 -0400
parents 187741719a64
children 5dd01b60e33b
files CMakeLists.txt cmake/check-for-gnu-ld/CMakeLists.txt
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Wed Apr 17 08:52:09 2024 -0400
+++ b/CMakeLists.txt	Sat Apr 20 08:51:59 2024 -0400
@@ -20,7 +20,7 @@
 # SOFTWARE.
 #
 
-cmake_minimum_required(VERSION 2.8.12.2)
+cmake_minimum_required(VERSION 3.12)
 project(libjeffpc)
 
 set(JEFFPC_VERSION 0.22-rc1)
--- a/cmake/check-for-gnu-ld/CMakeLists.txt	Wed Apr 17 08:52:09 2024 -0400
+++ b/cmake/check-for-gnu-ld/CMakeLists.txt	Sat Apr 20 08:51:59 2024 -0400
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2016 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
+# Copyright (c) 2016,2024 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +20,7 @@
 # SOFTWARE.
 #
 
-cmake_minimum_required(VERSION 2.8.12.2)
+cmake_minimum_required(VERSION 3.12)
 project(test)
 
 add_library(shared-test SHARED test.c)