Commit c31b8ac7 authored by Lukáš Tvrdý's avatar Lukáš Tvrdý

Disable O2,Ob1,Ob2 in Release and RelWithDebInfo for MSVC compiler

CCBUG:344569
parent cd30e3fd
......@@ -10,6 +10,17 @@ if(NOT MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -fPIC")
endif()
# turn off O2 and Ob1 or Ob2 for g'mic
if (MSVC)
# RelWithDebInfo
string(REPLACE "/O2" "/Oi /Ot /Oy /Gs /GF /Gy" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
string(REPLACE "/Ob1" "/Ob0" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
#Release
string(REPLACE "/O2" "/Oi /Ot /Oy /Gs /GF /Gy" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
string(REPLACE "/Ob2" "/Ob0" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
endif()
set(gmic_sources_SRCS
${GMIC_SOURCE_DIR}/gmic.cpp
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment