diff options
Diffstat (limited to 'cmake/scripts/darwin/Macros.cmake')
| -rw-r--r-- | cmake/scripts/darwin/Macros.cmake | 8 |
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 @@ | |||
| 1 | macro(enable_arc) | ||
| 2 | if(CMAKE_GENERATOR STREQUAL Xcode) | ||
| 3 | set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES) | ||
| 4 | else() | ||
| 5 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fobjc-arc") | ||
| 6 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fobjc-arc") | ||
| 7 | endif() | ||
| 8 | endmacro() | ||
