diff options
| author | JRPan <[email protected]> | 2025-09-25 12:17:16 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-09-25 12:17:16 -0400 |
| commit | b18ee3977962921c49fabe06d26ae19694497c26 (patch) | |
| tree | 24d6114e1d30c5387bd0f26501929dc8ae16c912 | |
| parent | a3c52cf6416441bd7aa4a12d25b0bd355c002764 (diff) | |
Override CMkale flags to enable assertion in release builds (#132)
| -rw-r--r-- | CMakeLists.txt | 5 |
1 files 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("$<$<COMPILE_LANGUAGE:C>:-Wall;-Wno-unused-function;-Wno-sign-compare;-ggdb;-fPIC>") else() add_compile_definitions(DEBUG=0) - add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-O3;-g;-Wall;-Wno-unused-function;-Wno-sign-compare;-fPIC>") - add_compile_options("$<$<COMPILE_LANGUAGE:C>:-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 |
