0026911: Configuration, CMake - strips symbol information from the binary in release...
authoribs <ibs@opencascade.com>
Sat, 21 Nov 2015 10:46:04 +0000 (13:46 +0300)
committerbugmaster <bugmaster@opencascade.com>
Mon, 23 Nov 2015 11:48:20 +0000 (14:48 +0300)
add strip flag when the compiler is a variant of gcc

adm/cmake/occt_defs_flags.cmake

index 36ba859..609265c 100644 (file)
@@ -98,7 +98,7 @@ if (DEFINED CMAKE_COMPILER_IS_GNUCXX OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xC
 endif()
 
 # Optimize size of binaries
-if (NOT WIN32 AND NOT APPLE)
+if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR MINGW)
   set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
   set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
 endif()