cmake: do all compile tests with -D_GNU_SOURCE=1
parent
ac99db9fc8
commit
61f76efb85
|
@ -131,16 +131,17 @@ else()
|
||||||
set(PROCESSOR_ARCH "x86")
|
set(PROCESSOR_ARCH "x86")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Get the platform
|
|
||||||
SDL_DetectCMakePlatform()
|
|
||||||
|
|
||||||
set(SDL_CHECK_REQUIRED_INCLUDES "" CACHE STRING "Extra includes (for CMAKE_REQUIRED_INCLUDES)")
|
set(SDL_CHECK_REQUIRED_INCLUDES "" CACHE STRING "Extra includes (for CMAKE_REQUIRED_INCLUDES)")
|
||||||
set(SDL_CHECK_REQUIRED_LINK_OPTIONS "" CACHE STRING "Extra link options (for CMAKE_REQUIRED_LINK_OPTIONS)")
|
set(SDL_CHECK_REQUIRED_LINK_OPTIONS "" CACHE STRING "Extra link options (for CMAKE_REQUIRED_LINK_OPTIONS)")
|
||||||
mark_as_advanced(SDL_CHECK_REQUIRED_INCLUDES SDL_CHECK_REQUIRED_LINK_OPTIONS)
|
mark_as_advanced(SDL_CHECK_REQUIRED_INCLUDES SDL_CHECK_REQUIRED_LINK_OPTIONS)
|
||||||
|
|
||||||
|
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -D_GNU_SOURCE=1")
|
||||||
list(APPEND CMAKE_REQUIRED_INCLUDES ${SDL_CHECK_REQUIRED_INCLUDES})
|
list(APPEND CMAKE_REQUIRED_INCLUDES ${SDL_CHECK_REQUIRED_INCLUDES})
|
||||||
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS ${SDL_CHECK_REQUIRED_LINK_OPTIONS})
|
list(APPEND CMAKE_REQUIRED_LINK_OPTIONS ${SDL_CHECK_REQUIRED_LINK_OPTIONS})
|
||||||
|
|
||||||
|
# Get the platform
|
||||||
|
SDL_DetectCMakePlatform()
|
||||||
|
|
||||||
# Don't mistake macOS for unix
|
# Don't mistake macOS for unix
|
||||||
if(UNIX AND NOT ANDROID AND NOT APPLE AND NOT RISCOS)
|
if(UNIX AND NOT ANDROID AND NOT APPLE AND NOT RISCOS)
|
||||||
set(UNIX_SYS ON)
|
set(UNIX_SYS ON)
|
||||||
|
|
Loading…
Reference in New Issue