From 5b6e064acd3da2b90883ae79fd14a79df50eeb8e Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 7 Apr 2015 20:01:43 -0400 Subject: [PATCH] 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. --- cmake/macros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()