You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
391 B

cmake_minimum_required(VERSION 2.8.12)
project(CheckOBJCCompilerFlag)
include(CheckOBJCCompilerFlag)
if(CMAKE_COMPILER_IS_GNUOBJC)
set(COMPILER_FLAG -fobjc-direct-dispatch)
else()
set(COMPILER_FLAG -fobjc-gc)
endif()
CHECK_OBJC_COMPILER_FLAGS(${COMPILER_FLAG} HAS_COMPILER_FLAG)
if(NOT HAS_COMPILER_FLAG)
message(SEND_ERROR "Test fail: HAS_COMPILER_FLAG: ${COMPILER_FLAG}")
endif