From 03cf683cdd04592ec9bbdba12081da3b8b9fd249 Mon Sep 17 00:00:00 2001 From: superp00t Date: Sun, 21 Jul 2024 20:09:16 -0400 Subject: [PATCH] fix(build): UBsan is enabled and disabled with the WHOA_UB_SAN option now --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ae7b9d8..2d5b00a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,7 +59,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU # Some templates abuse offsetof set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-invalid-offsetof") - if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT WHOA_ALLOW_UNDEFINED_BEHAVIOR) + if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND WHOA_UB_SAN) # Enable UBsan set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined") # Allow strange alignments