From 22b26cd7b75c678eff28557f2d3a862c635bb63e Mon Sep 17 00:00:00 2001 From: Alex Stewart Date: Mon, 7 Jul 2014 22:08:24 +0100 Subject: [PATCH] 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 --- cmake/iOS.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/iOS.cmake b/cmake/iOS.cmake index 5ad71ad1c..03b845ab2 100644 --- a/cmake/iOS.cmake +++ b/cmake/iOS.cmake @@ -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}")