1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-02-13 12:31:55 +00:00

check gcc version to ensure c11 generic select feature

This commit is contained in:
Derek Dai 2017-02-21 11:42:26 +08:00
parent 3a3ff4208d
commit 4c047b1886
No known key found for this signature in database
GPG key ID: E109CC97553EF009

View file

@ -30,6 +30,14 @@ endif()
set(CMAKE_C_FLAGS "-std=gnu11 -Wall ${CMAKE_C_FLAGS}") set(CMAKE_C_FLAGS "-std=gnu11 -Wall ${CMAKE_C_FLAGS}")
add_definitions(-D_GNU_SOURCE) add_definitions(-D_GNU_SOURCE)
if(CMAKE_COMPILER_IS_GNUCC)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
if(GCC_VERSION VERSION_LESS 4.9)
message(FATAL_ERROR "gcc >= 4.9 is requred")
endif()
endif()
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h) CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
add_subdirectory(src) add_subdirectory(src)