From adf18108c33fc38f392490dca85d8dbd02c23333 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Wed, 19 Oct 2016 02:21:24 +0200 Subject: [PATCH] build: Use -O1 for release builds Optimize less to not break the code. Still some undefined behaviour that are messing with builds using -O3 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a67fb858..3e7d4ee1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake/modules) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wno-unused-parameter -Wno-unused-local-typedefs") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -O0 -g2") -set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") +set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O1") set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED ON)