summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2016-10-14 20:54:05 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2016-10-14 20:54:05 +0200
commit3386ad49c46b4475d2160f109b483bc6833eca77 (patch)
tree76ec09fe11431f97a704596cce440b7948af001f /CMakeLists.txt
parent99a620f9a1ef81e7d9991ea801d44e8d1c740985 (diff)
Set proper flags for the verbose mode (debug flags)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9b028448..b4d2ae5e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,7 +70,12 @@ if(MSVC)
set(FLAGS "/Ox")
set(FLAGS "${FLAGS} /wd4715")
else()
- set(FLAGS "-O3 -std=c++11")
+ set(FLAGS "-std=c++11")
+ if(VERBOSE)
+ set(FLAGS "${FLAGS} -O1 -g")
+ else()
+ set(FLAGS "${FLAGS} -O3")
+ endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
set(FLAGS "${FLAGS} -Wall -Wno-comment -Wno-return-type -Wno-switch -Wno-missing-noreturn")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9.0)