From 0d5aa7d7b8b8df80a86b93e1b6e1b94e31a285d4 Mon Sep 17 00:00:00 2001 From: "Kirill A. Shutemov" Date: Thu, 25 Aug 2011 14:31:19 +0300 Subject: [PATCH] CMakeLists: no need in split debug/release build With GNU toolchain there's no need to split debug/release build. It's useful to have -O2 in debug envitonment since GCC show more warnings in this case. -O2 -g works fine. For release purpose, debug information can be stripted on later stage. Signed-off-by: Kirill A. Shutemov --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ffb53cd84..e149cd27f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,12 +57,10 @@ IF (MSVC) SET(CMAKE_C_FLAGS_DEBUG "/Od /DEBUG /MTd") SET(CMAKE_C_FLAGS_RELEASE "/MT /O2") ELSE () - SET(CMAKE_C_FLAGS "-Wall -Wextra") + SET(CMAKE_C_FLAGS "-O2 -g -Wall -Wextra") IF (NOT MINGW) # MinGW always does PIC and complains if we tell it to SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") ENDIF () - SET(CMAKE_C_FLAGS_DEBUG "-g -O0") - SET(CMAKE_C_FLAGS_RELEASE "-O2") ENDIF() # Build Debug by default