From e38b8505b76160970663fa555ca3d64c3bbdfa36 Mon Sep 17 00:00:00 2001 From: Bruce Perens Date: Thu, 15 Oct 2015 08:46:29 +0800 Subject: [PATCH] remove O3 if cmake debug build --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 621be518f..01779ce13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -426,9 +426,9 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) set(VISIBILITY_FLAG -fvisibility=hidden) endif() if (UNIX) - set(CMAKE_C_FLAGS "-Wall -Werror -O3 ${VISIBILITY_FLAG} ${CMAKE_C_FLAGS}" ) + set(CMAKE_C_FLAGS "-Wall -Werror ${VISIBILITY_FLAG} ${CMAKE_C_FLAGS}" ) else(UNIX) - set(CMAKE_C_FLAGS "-Wall -O3 ${VISIBILITY_FLAG} ${CMAKE_C_FLAGS}" ) + set(CMAKE_C_FLAGS "-Wall ${VISIBILITY_FLAG} ${CMAKE_C_FLAGS}" ) endif(UNIX) endif ()