diff options
author | Ryan C. Gordon <icculus@icculus.org> | 2015-04-07 20:01:43 -0400 |
---|---|---|
committer | Ryan C. Gordon <icculus@icculus.org> | 2015-04-07 20:01:43 -0400 |
commit | 0638247dd79f47c3222ab940bc3132d4d2f6fc8a (patch) | |
tree | bc3af13e1b7e6042b9e77becfb5de14a89cb7ba8 | |
parent | ec383fd5e79a900592de1a53b536d57f174dacbb (diff) | |
download | sdl-0638247dd79f47c3222ab940bc3132d4d2f6fc8a.tar.gz |
CMake: fix CHECK_OBJC_SOURCE_COMPILES to work with GCC (thanks, Ivan!).
Apparently -ObjC works with Clang, but -x objective-c works with both.
Fixes Bugzilla #2392.
-rw-r--r-- | cmake/macros.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/macros.cmake b/cmake/macros.cmake index c234a566c..96a7ce8b1 100644 --- a/cmake/macros.cmake +++ b/cmake/macros.cmake @@ -66,7 +66,7 @@ endmacro() macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR) set(PREV_REQUIRED_DEFS "${CMAKE_REQUIRED_DEFINITIONS}") - set(CMAKE_REQUIRED_DEFINITIONS "-ObjC ${PREV_REQUIRED_DEFS}") + set(CMAKE_REQUIRED_DEFINITIONS "-x objective-c ${PREV_REQUIRED_DEFS}") CHECK_C_SOURCE_COMPILES(${SOURCE} ${VAR}) set(CMAKE_REQUIRED_DEFINITIONS "${PREV_REQUIRED_DEFS}") endmacro() |