summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-12-17 19:18:21 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-12-26 20:09:06 -0700
commit1aecc70750ee6ce9c96ebf3e6b4a7fb322ff8ca3 (patch)
tree1e2c607ae9980b47917effe4203b4448a1dd4c5f /CMakeLists.txt
parentc7a0d6de46610ac9ceaea5afe1b7983550fc1be6 (diff)
Build the full matrix of CMAKE_BUILD_TYPE
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(