This commit is contained in:
Graham Sanderson 2022-07-04 15:02:07 +10:00 committed by GitHub
commit 2fc7b6e11c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 32 deletions

View File

@ -1,31 +1,32 @@
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()
# commented out for now as it breaks compilation with older GCC
#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()

@ -1 +1 @@
Subproject commit 92bd3b4c3ad2fce36166e4a357749b6d4fe9013b
Subproject commit 2a9fefd6ccf42e5d8570ae83fdc54c9c875ebdd1