summaryrefslogtreecommitdiffstats
path: root/cmake/scripts/darwin
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/scripts/darwin')
-rw-r--r--cmake/scripts/darwin/Macros.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/scripts/darwin/Macros.cmake b/cmake/scripts/darwin/Macros.cmake
new file mode 100644
index 0000000..9a805c4
--- /dev/null
+++ b/cmake/scripts/darwin/Macros.cmake
@@ -0,0 +1,8 @@
+macro(enable_arc)
+ if(CMAKE_GENERATOR STREQUAL Xcode)
+ set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES)
+ else()
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fobjc-arc")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fobjc-arc")
+ endif()
+endmacro()