summaryrefslogtreecommitdiff
path: root/examples/example.cmake
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-06-28 16:27:44 +0700
committerhathach <[email protected]>2022-06-28 16:27:44 +0700
commit898b52be45f476d7062d50fed722d92f0dccf4ae (patch)
treeb86a779cde318059dc76dc254ea8768c050e3bcb /examples/example.cmake
parent83602ea1234e992dd90d6b3c9b1f0fd8b2bf5a78 (diff)
update rp2040 warnings
- remove "-Wno-stringop-overflow -Wno-array-bounds" - skip -Wconversion for gcc 9 and prior - suppress_tinyusb_warnings only when building with gcc 9 and below
Diffstat (limited to 'examples/example.cmake')
-rw-r--r--examples/example.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/example.cmake b/examples/example.cmake
index 6bb82a56d..3e395d53f 100644
--- a/examples/example.cmake
+++ b/examples/example.cmake
@@ -21,5 +21,11 @@ target_compile_options(${PROJECT} PUBLIC
-Wuninitialized
-Wunused
-Wredundant-decls
+ )
+
+# GCC version 9 or prior has a bug with incorrect Wconversion warnings
+if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)
+ target_compile_options(${PROJECT} PUBLIC
-Wconversion
)
+endif()