From fadababc5993cacc3d93874330c619e203f0879d Mon Sep 17 00:00:00 2001 From: James Price Date: Sat, 17 May 2014 09:54:58 +0100 Subject: [PATCH] Enabled c99 with CMake when using GCC (required for tests). --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 22bafe31..d5bc6204 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,11 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND "DYLD_LIBRARY_PATH.") endif() +# Enable C99 for GCC (required for tests) +if (CMAKE_COMPILER_IS_GNUCC) + set(CMAKE_C_FLAGS "-std=c99") +endif() + # Disable min/max macros on Windows if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") add_definitions(-DNOMINMAX)