Skip to content

Commit

Permalink
Enabled c99 with CMake when using GCC (required for tests).
Browse files Browse the repository at this point in the history
  • Loading branch information
jrprice committed May 17, 2014
1 parent 7767309 commit fadabab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fadabab

Please sign in to comment.