blob: f83b738dc21d323cddacd4ae9bc2fd9c9d941445 (
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(CheckOBJCXXCompilerFlag)
include(CheckOBJCXXCompilerFlag)
if(CMAKE_COMPILER_IS_GNUOBJCXX)
set(COMPILER_FLAG -fobjc-direct-dispatch)
else()
set(COMPILER_FLAG -fobjc-gc)
endif()
CHECK_OBJCXX_COMPILER_FLAGS(${COMPILER_FLAG} HAS_COMPILER_FLAG)
if(NOT HAS_COMPILER_FLAG)
message(SEND_ERROR "Test fail: HAS_COMPILER_FLAG: ${COMPILER_FLAG}")
endif()
|