From ddc9c394a251517f70860ebfd340551b4d1a327e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20A=2E=20Col=C3=B3n=20V=C3=A9lez?= Date: Sat, 8 Aug 2015 22:10:40 -0400 Subject: [PATCH] Don't use O2 in the Debug Build. --- cmake/BuildParameters.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index d9f12b026f..282c9b06c1 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -272,7 +272,11 @@ else() endif() if(NOT DEFINED OPTIMIZATION_FLAG) - set(OPTIMIZATION_FLAG -O2) + if (CMAKE_BUILD_TYPE STREQUAL Debug) + set(OPTIMIZATION_FLAG -O0) + else() + set(OPTIMIZATION_FLAG -O2) + endif() endif() # Note: -DGTK_DISABLE_DEPRECATED can be used to test a build without gtk deprecated feature. It could be useful to port to a newer API