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

- improve compatibility with further compiler versions
- warnings are not errors by default
pull/21517/head
Alexander Alekhin 3 years ago
parent f811ba8777
commit 30ff9c6775
  1. 10
      cmake/OpenCVCompilerOptions.cmake

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

Loading…
Cancel
Save