diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2019-11-09 12:45:18 (GMT) |
---|---|---|
committer | Cristian Adam <cristian.adam@gmail.com> | 2019-11-11 16:43:17 (GMT) |
commit | bb42e1ed43cc56581e7d16ec93a417b7971d108b (patch) | |
tree | 6e227c62d724f3d1cd9b8ceb181962667b360da4 /Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake | |
parent | 5e328c6d74ed6b6470e1df1005d07fe930185b52 (diff) | |
download | CMake-bb42e1ed43cc56581e7d16ec93a417b7971d108b.zip CMake-bb42e1ed43cc56581e7d16ec93a417b7971d108b.tar.gz CMake-bb42e1ed43cc56581e7d16ec93a417b7971d108b.tar.bz2 |
ObjC: Add OBJC/OBJCXX flags to Xcode projects
Fixes: #19936
Diffstat (limited to 'Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake')
-rw-r--r-- | Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake b/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake new file mode 100644 index 0000000..0ad942f --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeObjcxxFlags.cmake @@ -0,0 +1,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) |