From 30ff9c6775f3449dcf015eb9c7da26be3e51191d Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 26 Jan 2022 04:34:51 +0000 Subject: [PATCH] cmake: don't force -Werror=... - improve compatibility with further compiler versions - warnings are not errors by default --- cmake/OpenCVCompilerOptions.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake index 90f1896c30..bbfd889690 100644 --- a/cmake/OpenCVCompilerOptions.cmake +++ b/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)