Cleanup optimization compile flags for mingw-w64.

After testing it seems that for safe debug sessions, debug build optimizations need to be off. 

Also removed sse flags from release flags since they are included in ray optimization flags which are on by default.
This commit is contained in:
Antony Riakiotakis
2012-05-14 23:36:07 +00:00
parent 8f2c848075
commit 232980eef0
2 changed files with 6 additions and 4 deletions

View File

@@ -1011,8 +1011,10 @@ elseif(WIN32)
set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
if(WITH_MINGW64)
#Yes, the point for MinGW64 is moar optimization by default :)
set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -mmmx -msse -msse2 -ftree-vectorize")
#We need to take care though not to have these on debug builds because they may play funky with gdb
if(CMAKE_BUILD_TYPE MATCHES "Release")
set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -mmmx -ftree-vectorize")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} -lpthread")