CMakeLists.txt: slightly modernize
This commit is contained in:
parent
9cea3fca91
commit
686a39df38
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue