From 9f6f267cc4acb6c72872e42593ca701df1f5fdc3 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Mon, 11 Nov 2024 14:08:56 -0700 Subject: build-sys: Add -Wswitch-enum --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3-2-g168b