cmake/macros.cmake
changeset 7182 1089a8a701c3
parent 6674 45a21e50ba5e
child 9465 bf1da29c9509
     1.1 --- a/cmake/macros.cmake	Thu May 16 00:48:20 2013 -0700
     1.2 +++ b/cmake/macros.cmake	Thu May 16 00:52:33 2013 -0700
     1.3 @@ -63,3 +63,11 @@
     1.4      set(${_OUTPUT} "${_LPREFIX}${_ITEM} ${${_OUTPUT}}")
     1.5    endforeach()
     1.6  endmacro()
     1.7 +
     1.8 +macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR)
     1.9 +  set(PREV_REQUIRED_DEFS "${CMAKE_REQUIRED_DEFINITIONS}")
    1.10 +  set(CMAKE_REQUIRED_DEFINITIONS "-ObjC ${PREV_REQUIRED_DEFS}")
    1.11 +  CHECK_C_SOURCE_COMPILES(${SOURCE} ${VAR})
    1.12 +  set(CMAKE_REQUIRED_DEFINITIONS "${PREV_REQUIRED_DEFS}")
    1.13 +endmacro()
    1.14 +