mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-25 23:38:06 +00:00
only enable warnings with approriate gcc version for rp2040
This commit is contained in:
parent
0bfb9d62de
commit
bb5dbd2da8
@ -4,28 +4,29 @@ target_compile_options(${PROJECT} PUBLIC
|
|||||||
-Werror
|
-Werror
|
||||||
-Wfatal-errors
|
-Wfatal-errors
|
||||||
-Wdouble-promotion
|
-Wdouble-promotion
|
||||||
#-Wstrict-prototypes
|
|
||||||
-Wstrict-overflow
|
|
||||||
#-Werror-implicit-function-declaration
|
|
||||||
-Wfloat-equal
|
-Wfloat-equal
|
||||||
#-Wundef
|
|
||||||
-Wshadow
|
-Wshadow
|
||||||
-Wwrite-strings
|
-Wwrite-strings
|
||||||
-Wsign-compare
|
-Wsign-compare
|
||||||
-Wmissing-format-attribute
|
-Wmissing-format-attribute
|
||||||
-Wunreachable-code
|
-Wunreachable-code
|
||||||
-Wcast-align
|
-Wcast-align
|
||||||
-Wcast-function-type
|
|
||||||
-Wcast-qual
|
-Wcast-qual
|
||||||
-Wnull-dereference
|
-Wnull-dereference
|
||||||
-Wuninitialized
|
-Wuninitialized
|
||||||
-Wunused
|
-Wunused
|
||||||
-Wredundant-decls
|
-Wredundant-decls
|
||||||
|
#-Wstrict-prototypes
|
||||||
|
#-Werror-implicit-function-declaration
|
||||||
|
#-Wundef
|
||||||
)
|
)
|
||||||
|
|
||||||
# GCC version 9 or prior has a bug with incorrect Wconversion warnings
|
# GCC 10
|
||||||
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)
|
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)
|
||||||
target_compile_options(${PROJECT} PUBLIC
|
target_compile_options(${PROJECT} PUBLIC -Wconversion)
|
||||||
-Wconversion
|
endif()
|
||||||
)
|
|
||||||
|
# GCC 8
|
||||||
|
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
|
||||||
|
target_compile_options(${PROJECT} PUBLIC -Wcast-function-type -Wstrict-overflow)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user