diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2018-07-31 15:35:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-31 15:35:17 -0700 |
commit | 9e3a4a2646533b5044b866a0c1932a1079a9c919 (patch) | |
tree | 179d28690eeab7aca98683eeb1c38f16ffa13d24 /cmake | |
parent | 9bdd765a02de75851a00ab85223d5d582a104757 (diff) | |
download | qtlocation-mapboxgl-9e3a4a2646533b5044b866a0c1932a1079a9c919.tar.gz |
[ios, macos] Enable link-time optimization for iOS release builds (#12502)
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/loop-darwin.cmake | 2 | ||||
-rw-r--r-- | cmake/mbgl.cmake | 3 | ||||
-rw-r--r-- | cmake/offline.cmake | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/cmake/loop-darwin.cmake b/cmake/loop-darwin.cmake index 3109911e66..f60972902f 100644 --- a/cmake/loop-darwin.cmake +++ b/cmake/loop-darwin.cmake @@ -13,4 +13,6 @@ create_source_groups(mbgl-loop-darwin) set_target_properties(mbgl-loop-darwin PROPERTIES FOLDER "Core") +initialize_xcode_cxx_build_settings(mbgl-loop-darwin) + xcode_create_scheme(TARGET mbgl-loop-darwin)
\ No newline at end of file diff --git a/cmake/mbgl.cmake b/cmake/mbgl.cmake index 7f2eaf86b0..338c2fd708 100644 --- a/cmake/mbgl.cmake +++ b/cmake/mbgl.cmake @@ -203,6 +203,9 @@ macro(initialize_xcode_cxx_build_settings target) # -Wrange-loop-analysis set_xcode_property(${target} CLANG_WARN_RANGE_LOOP_ANALYSIS YES) + + # -flto + set_xcode_property(${target} LLVM_LTO $<$<OR:$<CONFIG:Release>,$<CONFIG:RelWithDebugInfo>>:YES>) endmacro(initialize_xcode_cxx_build_settings) # CMake 3.1 does not have this yet. diff --git a/cmake/offline.cmake b/cmake/offline.cmake index d9dfb6c6e8..d1094c33c7 100644 --- a/cmake/offline.cmake +++ b/cmake/offline.cmake @@ -21,6 +21,8 @@ mbgl_platform_offline() create_source_groups(mbgl-offline) +initialize_xcode_cxx_build_settings(mbgl-offline) + set_target_properties(mbgl-offline PROPERTIES FOLDER "Executables") xcode_create_scheme( |