diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a5cae812b9c16161ee4f76e57ae958488d5d963..11d78541572968bcd3c2c7d338b568473c80addc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,6 +38,9 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
     "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
 endif()
 
+#set(CMAKE_CXX_FLAGS "-Wall -Wextra")
+set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
+set(CMAKE_CXX_FLAGS_RELEASE "-O3")
 
 # unit testing coverage, does not work yet
 #include (CodeCoverage)