use "-O2 -DNDEBUG" in release by default in the case of MinGW

This commit is contained in:
Vadim Pisarevsky 2011-06-18 13:09:57 +00:00
parent 0e14fef96e
commit 151bfb2ae2

View File

@ -41,8 +41,11 @@ set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "" CACHE INTERNAL "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "" CACHE INTERNAL "" FORCE)
set(CMAKE_VERBOSE OFF CACHE BOOL "Verbose mode")
if (MINGW)
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "")
if (WIN32)
if(${CMAKE_GENERATOR} MATCHES "(MinGW)|(MSYS)")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "")
endif()
endif()
if(CMAKE_VERBOSE)