summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eef2617..4bffff9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,10 @@ project(sbc_harness)
pico_sdk_init()
add_compile_options(-Wall -Wextra -Wswitch-enum -Werror)
+if (PICO_PLATFORM STREQUAL "host")
+ add_compile_options(-fsanitize=undefined)
+ add_link_options(-fsanitize=undefined)
+endif()
function(_suppress_tinyusb_warnings)
__suppress_tinyusb_warnings()