mirror of
https://github.com/albfan/miraclecast.git
synced 2025-02-13 10:11:54 +00:00
check gcc version to ensure c11 generic select feature
This commit is contained in:
parent
3a3ff4208d
commit
4c047b1886
1 changed files with 8 additions and 0 deletions
|
@ -30,6 +30,14 @@ endif()
|
|||
set(CMAKE_C_FLAGS "-std=gnu11 -Wall ${CMAKE_C_FLAGS}")
|
||||
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)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
|
Loading…
Reference in a new issue