cmake/macros.cmake
changeset 9465 bf1da29c9509
parent 7182 1089a8a701c3
equal deleted inserted replaced
9464:ae7a6c8cc189 9465:bf1da29c9509
    64   endforeach()
    64   endforeach()
    65 endmacro()
    65 endmacro()
    66 
    66 
    67 macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR)
    67 macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR)
    68   set(PREV_REQUIRED_DEFS "${CMAKE_REQUIRED_DEFINITIONS}")
    68   set(PREV_REQUIRED_DEFS "${CMAKE_REQUIRED_DEFINITIONS}")
    69   set(CMAKE_REQUIRED_DEFINITIONS "-ObjC ${PREV_REQUIRED_DEFS}")
    69   set(CMAKE_REQUIRED_DEFINITIONS "-x objective-c ${PREV_REQUIRED_DEFS}")
    70   CHECK_C_SOURCE_COMPILES(${SOURCE} ${VAR})
    70   CHECK_C_SOURCE_COMPILES(${SOURCE} ${VAR})
    71   set(CMAKE_REQUIRED_DEFINITIONS "${PREV_REQUIRED_DEFS}")
    71   set(CMAKE_REQUIRED_DEFINITIONS "${PREV_REQUIRED_DEFS}")
    72 endmacro()
    72 endmacro()
    73 
    73