summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-11 14:08:56 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-11 19:19:48 -0700
commit9f6f267cc4acb6c72872e42593ca701df1f5fdc3 (patch)
treefb01515d0a7e3801ed29380575b5b9f6216a1607 /CMakeLists.txt
parent6ae2bbf849aa597054d7c84d20fc634ed87a1da5 (diff)
build-sys: Add -Wswitch-enum
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 100214c..c9774c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,15 @@ project(sbc_harness)
pico_sdk_init()
-add_compile_options(-Wall -Wextra -Werror)
+add_compile_options(-Wall -Wextra -Wswitch-enum -Werror)
+
+function(_suppress_tinyusb_warnings)
+ __suppress_tinyusb_warnings()
+ set_source_files_properties(
+ ${PICO_TINYUSB_PATH}/src/device/usbd.c
+ PROPERTIES
+ COMPILE_OPTIONS "-Wno-switch-enum")
+endfunction()
function(target_embed_sources arg_target arg_hdrname)
set(embed_objs)