blob: a9a96eebb25ee656523ac3ae5894a899fc48658b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
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
|