From 9aefbd5d3405631e4d7bb8e925b38ac3893d62d4 Mon Sep 17 00:00:00 2001
From: patrick96
Date: Sat, 17 Nov 2018 14:30:02 +0100
Subject: [PATCH] build: Add UndefinedBehaviorSanitizer
---
cmake/01-core.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake/01-core.cmake b/cmake/01-core.cmake
index 0063fae2..973c4b7d 100644
--- a/cmake/01-core.cmake
+++ b/cmake/01-core.cmake
@@ -95,7 +95,7 @@ if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
endif()
# Custom build type ; SANITIZE
-SET(CMAKE_CXX_FLAGS_SANITIZE "-O1 -g -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls"
+SET(CMAKE_CXX_FLAGS_SANITIZE "-O0 -g -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls"
CACHE STRING "Flags used by the C++ compiler during sanitize builds." FORCE)
SET(CMAKE_C_FLAGS_SANITIZE ""
CACHE STRING "Flags used by the C compiler during sanitize builds." FORCE)