From f4a65fd3170b2e652a0d7499cc82731be3ea1235 Mon Sep 17 00:00:00 2001 From: Graham Pentheny Date: Fri, 14 Apr 2023 17:30:38 -0400 Subject: [PATCH] Enable UBSan and ASan when building tests with clang --- RecastDemo/premake5.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RecastDemo/premake5.lua b/RecastDemo/premake5.lua index 3c57b4f..05d2e9e 100644 --- a/RecastDemo/premake5.lua +++ b/RecastDemo/premake5.lua @@ -238,6 +238,11 @@ project "Tests" -- distribute executable in RecastDemo/Bin directory targetdir "Bin" + -- enable ubsan and asan when compiling with clang + filter "toolset:clang" + buildoptions { "-fsanitize=undefined", "-fsanitize=address" } -- , "-fsanitize=memory" } + linkoptions { "-fsanitize=undefined", "-fsanitize=address" } --, "-fsanitize=memory" } + -- linux library cflags and libs filter "system:linux" buildoptions {