From 151bfb2ae238e0b074cfa272588211ac937eea3f Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Sat, 18 Jun 2011 13:09:57 +0000 Subject: [PATCH] use "-O2 -DNDEBUG" in release by default in the case of MinGW --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2810a8520..79c527ad5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)