aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-10-31 04:29:40 +0100
committerPřemysl Eric Janouch <p@janouch.name>2021-10-31 04:30:04 +0100
commit686a39df387806c85664cb48a353bef5d41b810c (patch)
tree77f546734b51c00b9fc458b4dabd3c5a1702110e /CMakeLists.txt
parent9cea3fca91cfe9c011901bd8978005751e244bd8 (diff)
downloadxK-686a39df387806c85664cb48a353bef5d41b810c.tar.gz
xK-686a39df387806c85664cb48a353bef5d41b810c.tar.xz
xK-686a39df387806c85664cb48a353bef5d41b810c.zip
CMakeLists.txt: slightly modernize
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc2d146..ec97e26 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,5 @@
-cmake_minimum_required (VERSION 3.0)
+# Ubuntu 18.04 LTS and OpenBSD 6.4
+cmake_minimum_required (VERSION 3.10)
project (uirc3 VERSION 1.4.0 LANGUAGES C)
# Options
@@ -6,10 +7,13 @@ option (WANT_READLINE "Use GNU Readline for the UI (better)" ON)
option (WANT_LIBEDIT "Use BSD libedit for the UI" OFF)
# Moar warnings
+set (CMAKE_C_STANDARD 99)
+set (CMAKE_C_STANDARD_REQUIRED ON)
+set (CMAKE_C_EXTENSIONS OFF)
+
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUCC)
# -Wunused-function is pretty annoying here, as everything is static
- set (wdisabled "-Wno-unused-function")
- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -Wextra ${wdisabled}")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-function")
endif ()
# Version