mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Add release flags to iOS toolchain.
- Without explicitly specifying the flags for release compilation in the iOS toolchain file, no additional flags are passed and so the libraries were not being built with full optimisations, even though the CMAKE_BUILD_TYPE was 'Release'. Change-Id: I742bab7589906b556640776d481491a8cc2303d4
This commit is contained in:
@@ -110,6 +110,7 @@ set (CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
|
||||
# Hidden visibilty is required for cxx on iOS
|
||||
set (CMAKE_C_FLAGS_INIT "")
|
||||
set (CMAKE_CXX_FLAGS_INIT "-fvisibility=hidden -fvisibility-inlines-hidden")
|
||||
set (CMAKE_CXX_FLAGS_RELEASE_INIT "-DNDEBUG -O3 -fomit-frame-pointer -ffast-math")
|
||||
|
||||
set (CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
|
||||
set (CMAKE_CXX_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
|
||||
|
||||
Reference in New Issue
Block a user