From 48849518be0ecc692c1be89a88c2cde1388d4435 Mon Sep 17 00:00:00 2001 From: NepDisk Date: Mon, 10 Nov 2025 14:42:07 -0500 Subject: [PATCH] Bring back debug flags --- src/CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5803cda04..f9196feb6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -235,10 +235,11 @@ endif() # TODO: fix prng and P_CreateBlockmap overflow at some point target_compile_options(SRB2SDL2 PRIVATE -fwrapv) - -target_compile_options(SRB2SDL2 PRIVATE -O0) -target_compile_options(SRB2SDL2 PRIVATE -g) - +if (${CMAKE_BUILD_TYPE} MATCHES Debug) + target_compile_options(SRB2SDL2 PRIVATE -O0) +else() + target_compile_options(SRB2SDL2 PRIVATE -O3) +endif() # Compiler warnings configuration target_compile_options(SRB2SDL2 PRIVATE