From d5391142f7c44cd27384c3af9ebf5bc51f916caa Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 13 Apr 2018 13:49:43 +0200 Subject: Make sure we get C99 The compiler might default to something older, so make sure we get the features we need. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index ca1e85b6..a63288a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,9 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -UNDEBUG") set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -UNDEBUG") set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -UNDEBUG") +# Make sure we get a sane C version +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") + # Tell the compiler to be stringent set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat=2") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wformat=2") -- cgit v1.2.3