- 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()
 |