From b18ee3977962921c49fabe06d26ae19694497c26 Mon Sep 17 00:00:00 2001 From: JRPan <25518778+JRPan@users.noreply.github.com> Date: Thu, 25 Sep 2025 12:17:16 -0400 Subject: Override CMkale flags to enable assertion in release builds (#132) --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2292e8b..5041c22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,8 +40,9 @@ if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") add_compile_options("$<$:-Wall;-Wno-unused-function;-Wno-sign-compare;-ggdb;-fPIC>") else() add_compile_definitions(DEBUG=0) - add_compile_options("$<$:-O3;-g;-Wall;-Wno-unused-function;-Wno-sign-compare;-fPIC>") - add_compile_options("$<$:-Wall;-Wno-unused-function;-Wno-sign-compare;-fPIC>") + # Override the default release flags to keep asserts enabled + set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O3 -g3 -fPIC") + set(CMAKE_C_FLAGS_RELEASE "-Wall -O3 -g3 -fPIC") endif() # Add CUDA version -- cgit v1.3