Commit 813f333d authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Fix c99 not being set if cmake < 3.1 and compiler is gcc

parent 70dcc26c
......@@ -23,10 +23,16 @@
function(require_c99 target)
if(CMAKE_C_COMPILER_ID STREQUAL "QCC")
target_compile_options(${target} PRIVATE "-std=gnu99")
else()
if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_compile_options(${target} PRIVATE "-std=gnu99")
endif()
else()
set_property(TARGET ${target} PROPERTY C_STANDARD 99)
set_property(TARGET ${target} PROPERTY C_STANDARD_REQUIRED TRUE)
endif()
endif()
endfunction()
set(INCLUDES ${ANTLR3C_INCLUDE_DIRS})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment