summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e7b4682..e4f4d91 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,6 +18,13 @@ pico_sdk_init()
add_compile_options(-Wall -Wextra -Wswitch-enum -Werror)
+string(TOUPPER "${CMAKE_BUILD_TYPE}" _upper_cmake_build_type)
+string(REPLACE " " ";" _build_type_flags "${CMAKE_C_FLAGS_${_upper_cmake_build_type}}")
+if ("-DNDEBUG" IN_LIST _build_type_flags)
+ add_compile_options(-Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable)
+ target_compile_definitions(pico_printf INTERFACE PICO_PRINTF_ALWAYS_INCLUDED=1)
+endif()
+
function(_suppress_tinyusb_warnings)
__suppress_tinyusb_warnings()
set_source_files_properties(