summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-12-26 20:09:17 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-12-26 20:09:17 -0700
commite7e0cff1960fca598e0ba01be2bb56b65cbb9e2b (patch)
tree1e2c607ae9980b47917effe4203b4448a1dd4c5f /CMakeLists.txt
parentd0e9e9c4a178fe396f3ba255bc440a15b107a097 (diff)
parent1aecc70750ee6ce9c96ebf3e6b4a7fb322ff8ca3 (diff)
Merge branch 'lukeshu/check-build'
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(