summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake
blob: 0ad942f28f84bd5ec5aabacce7a5b831b2d042d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
cmake_minimum_required(VERSION 3.15)
project(objcxxtest LANGUAGES CXX OBJCXX)

include(CheckOBJCXXCompilerFlag)
check_objcxx_compiler_flag(-fobjc-arc HAVE_OBJC_ARC)

if(HAVE_OBJC_ARC)
  add_compile_options(-fobjc-arc)
  add_compile_definitions(HAVE_OBJC_ARC)
endif()

add_library(myfuncs STATIC myfuncs.mm)