Skip to content

Commit 92a1337

Browse files
alext-mkrstingleby
authored andcommitted
cmake: bump minimum version to address a deprecation warning
This fixes the following warning shown while configuring: [cmake] CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): [cmake] Compatibility with CMake < 3.10 will be removed from a future version of [cmake] CMake. We don't have a clearly defined supported distro/versions list, so I took Ubuntu 22.04 as arguably the oldest one we'd want to support for the reference point. It has CMake 3.22, released in July 2022. Signed-off-by: Alex T <alext.mkrs@gmail.com>
1 parent ee6e65a commit 92a1337

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

CMakeLists.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
cmake_minimum_required (VERSION 2.8.11)
1+
cmake_minimum_required (VERSION 3.22)
22
project (mraa C)
33

44
FIND_PACKAGE (Threads REQUIRED)
55

6-
if (CMAKE_VERSION VERSION_LESS "3.1")
7-
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
8-
set (CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
9-
endif ()
10-
else ()
11-
set (CMAKE_C_STANDARD 99)
12-
endif ()
6+
set (CMAKE_C_STANDARD 99)
137

148
option (BUILDCPP "Enable C++ (needed by FTDI4222 and tests)" ON)
159

0 commit comments

Comments
 (0)