]> source.dussan.org Git - tigervnc.git/commitdiff
Make sure we get C99
authorPierre Ossman <ossman@cendio.se>
Fri, 13 Apr 2018 11:49:43 +0000 (13:49 +0200)
committerPierre Ossman <ossman@cendio.se>
Fri, 13 Apr 2018 11:49:43 +0000 (13:49 +0200)
The compiler might default to something older, so make sure we get
the features we need.

CMakeLists.txt

index ca1e85b68f0af013f109e64c9cba6eb840d0ab83..a63288a374055bfa93b5af42bf8efd18b5fbb713 100644 (file)
@@ -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")