1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0026247: Too huge binaries are produced for Android platform using MinGW

Parameter "-s" was added to CMAKE_CXX_FLAGS_RELEASE and CMAKE_C_FLAGS_RELEASE to optimize size of binaries
This commit is contained in:
ski 2015-07-10 10:52:53 +03:00 committed by bugmaster
parent 4525373bf3
commit 41ec04dbbd

View File

@ -90,5 +90,11 @@ if (DEFINED CMAKE_COMPILER_IS_GNUCXX OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xC
set (CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
endif()
# Optimize size of binaries
if (NOT WIN32 AND NOT APPLE)
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
endif()
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNo_Exception")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNo_Exception")