mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-22 06:40:58 +00:00
- 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
32 lines
789 B
CMake
32 lines
789 B
CMake
target_compile_options(${PROJECT} PUBLIC
|
|
-Wall
|
|
-Wextra
|
|
-Werror
|
|
-Wfatal-errors
|
|
-Wdouble-promotion
|
|
#-Wstrict-prototypes
|
|
-Wstrict-overflow
|
|
#-Werror-implicit-function-declaration
|
|
-Wfloat-equal
|
|
#-Wundef
|
|
-Wshadow
|
|
-Wwrite-strings
|
|
-Wsign-compare
|
|
-Wmissing-format-attribute
|
|
-Wunreachable-code
|
|
-Wcast-align
|
|
-Wcast-function-type
|
|
-Wcast-qual
|
|
-Wnull-dereference
|
|
-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()
|