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:
Alex Stewart
2014-07-07 22:08:24 +01:00
parent 753ada79ea
commit 22b26cd7b7
+1
View File
@@ -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}")