CMake: bump the minimum required CMake version to 3.5 master
authorYegor Yefremov <yegorslists@googlemail.com>
Fri, 12 Jan 2024 07:50:32 +0000 (08:50 +0100)
committerPetr Štetiar <ynezz@true.cz>
Mon, 26 Feb 2024 08:09:14 +0000 (08:09 +0000)
From: Yegor Yefremov <yegorslists@googlemail.com>

Older CMake versions are marked as deprecated and generate
the related warning:

Compatibility with CMake < 3.5 will be removed from a future
version of CMake.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
CMakeLists.txt

index 8e86bd4ce598738daa1848895f3c9d3d38e4259c..a3eaf65e6c81ad605d9746a0433bd5fa19a43d53 100644 (file)
@@ -1,11 +1,9 @@
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 3.5)
 
 PROJECT(netifd C)
 
-IF(NOT ${CMAKE_VERSION} LESS 3.0)
-  include(CheckCCompilerFlag)
-  check_c_compiler_flag(-Wimplicit-fallthrough HAS_IMPLICIT_FALLTHROUGH)
-ENDIF()
+include(CheckCCompilerFlag)
+check_c_compiler_flag(-Wimplicit-fallthrough HAS_IMPLICIT_FALLTHROUGH)
 
 ADD_DEFINITIONS(-Wall -Werror)
 IF(CMAKE_C_COMPILER_VERSION VERSION_GREATER 6)