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)