mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-11-24 02:29:43 +00:00
cmake: only use $<COMPILE_LANGUAGE:OBJC> when CMAKE_OBJC_COMPILER is defined
This commit is contained in:
parent
9eaea7d661
commit
1e8443f54e
@ -560,14 +560,20 @@ if(USE_GCC OR USE_CLANG)
|
|||||||
if(CMAKE_VERSION VERSION_LESS 3.3)
|
if(CMAKE_VERSION VERSION_LESS 3.3)
|
||||||
target_compile_options(sdl-global-options INTERFACE "-Werror=declaration-after-statement")
|
target_compile_options(sdl-global-options INTERFACE "-Werror=declaration-after-statement")
|
||||||
else()
|
else()
|
||||||
target_compile_options(sdl-global-options INTERFACE "$<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:OBJCC>>:-Werror=declaration-after-statement>")
|
target_compile_options(sdl-global-options INTERFACE "$<$<COMPILE_LANGUAGE:C>:-Werror=declaration-after-statement>")
|
||||||
|
if(CMAKE_OBJC_COMPILER)
|
||||||
|
target_compile_options(sdl-global-options INTERFACE "$<$<COMPILE_LANGUAGE:OBJC>:-Werror=declaration-after-statement>")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.3)
|
if(CMAKE_VERSION VERSION_LESS 3.3)
|
||||||
target_compile_options(sdl-global-options INTERFACE "-Wdeclaration-after-statement")
|
target_compile_options(sdl-global-options INTERFACE "-Wdeclaration-after-statement")
|
||||||
else()
|
else()
|
||||||
target_compile_options(sdl-global-options INTERFACE "$<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:OBJC>>:-Wdeclaration-after-statement>")
|
target_compile_options(sdl-global-options INTERFACE "$<$<COMPILE_LANGUAGE:C>:-Wdeclaration-after-statement>")
|
||||||
|
if(CMAKE_OBJC_COMPILER)
|
||||||
|
target_compile_options(sdl-global-options INTERFACE "$<$<COMPILE_LANGUAGE:OBJC>:-Wdeclaration-after-statement>")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user