cmake: don't force -Werror=...

- improve compatibility with further compiler versions
- warnings are not errors by default
This commit is contained in:
Alexander Alekhin 2022-01-26 04:34:51 +00:00
parent f811ba8777
commit 30ff9c6775

View File

@ -119,12 +119,12 @@ if(CV_GCC OR CV_CLANG)
# we want.
add_extra_compiler_option(-Wall)
endif()
add_extra_compiler_option(-Werror=return-type)
add_extra_compiler_option(-Werror=non-virtual-dtor)
add_extra_compiler_option(-Werror=address)
add_extra_compiler_option(-Werror=sequence-point)
add_extra_compiler_option(-Wreturn-type)
add_extra_compiler_option(-Wnon-virtual-dtor)
add_extra_compiler_option(-Waddress)
add_extra_compiler_option(-Wsequence-point)
add_extra_compiler_option(-Wformat)
add_extra_compiler_option(-Werror=format-security -Wformat)
add_extra_compiler_option(-Wformat-security -Wformat)
add_extra_compiler_option(-Wmissing-declarations)
add_extra_compiler_option(-Wmissing-prototypes)
add_extra_compiler_option(-Wstrict-prototypes)