From 28d5de33e66d08c44260a9f3783af8c7be5107f6 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Sun, 9 Jul 2023 17:47:16 +0200 Subject: [PATCH] Document that -O3 is still a bad idea for gcc-12 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f20db53e..f930515f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,6 +84,7 @@ endif() if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") add_compile_options(-fdiagnostics-color=always) # For gcc, -O3 is *much* worse than -O2 + # Update: This is still true for gcc-12 set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2 -g") set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O2 -g") elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")