summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2017-06-26 21:36:56 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2017-06-26 21:36:56 +0200
commita823edb65ffadd21bb825b9e2184e09a06879c1d (patch)
tree99539ae7b5d0d14d6adbb9840fa33468ba597a8a
parent19504ed60973bcdb920ec3e8c3004c2c7ca98e93 (diff)
Reduced optimization level for the (non-performance critical) host-code to speed-up compilation
-rw-r--r--CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c602c5e2..94d9cbc2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,14 +76,14 @@ endif(MSVC)
# C++ compiler settings
if(MSVC)
- set(FLAGS "/Ox")
+ set(FLAGS "/Ot")
set(FLAGS "${FLAGS} /wd4715")
else()
set(FLAGS "-std=c++11")
if(VERBOSE)
set(FLAGS "${FLAGS} -O1 -g")
else()
- set(FLAGS "${FLAGS} -O3")
+ set(FLAGS "${FLAGS} -O2")
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
set(FLAGS "${FLAGS} -Wall -Wno-comment -Wno-return-type -Wno-switch -Wno-missing-noreturn")
@@ -107,9 +107,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAGS}")
# C compiler settings (for the sample)
if(MSVC)
- set(CFLAGS "/Ox")
+ set(CFLAGS "/Ot")
else()
- set(CFLAGS "-O3 -std=c99")
+ set(CFLAGS "-O2 -std=c99")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CFLAGS}")