diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake index 0ed941e496..1b6613515e 100644 --- a/adm/cmake/occt_defs_flags.cmake +++ b/adm/cmake/occt_defs_flags.cmake @@ -123,16 +123,6 @@ if ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang") # Optimize size of binaries set (CMAKE_SHARED_LINKER_FLAGS "-Wl,-s ${CMAKE_SHARED_LINKER_FLAGS}") elseif(MINGW) - # Set default release optimization option to O2 instead of O3, since in - # some OCCT related examples, this gives significantly smaller binaries - # at comparable performace with MinGW-w64. - string (REGEX MATCH "-O3" IS_O3_CXX "${CMAKE_CXX_FLAGS_RELEASE}") - if (IS_O3_CXX) - string (REGEX REPLACE "-O3" "-O2" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") - else() - set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2") - endif() - add_definitions(-D_WIN32_WINNT=0x0501) # workaround bugs in mingw with vtable export set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols")