From 0587f92d96aa187ee70daf2a61267bfa01521c55 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 15 Mar 2018 16:04:21 +0300 Subject: [PATCH] cmake: disable override warnings in 3rdparty code and viz --- 3rdparty/openexr/CMakeLists.txt | 1 + 3rdparty/protobuf/CMakeLists.txt | 1 + modules/viz/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/3rdparty/openexr/CMakeLists.txt b/3rdparty/openexr/CMakeLists.txt index 730b9a0d7e..5472b6df73 100644 --- a/3rdparty/openexr/CMakeLists.txt +++ b/3rdparty/openexr/CMakeLists.txt @@ -44,6 +44,7 @@ source_group("Src" FILES ${lib_srcs}) ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wunused -Wsign-compare -Wundef -Wmissing-declarations -Wuninitialized -Wswitch -Wparentheses -Warray-bounds -Wextra -Wdeprecated-declarations -Wmisleading-indentation -Wdeprecated + -Wsuggest-override -Winconsistent-missing-override ) ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4099 /wd4100 /wd4101 /wd4127 /wd4189 /wd4245 /wd4305 /wd4389 /wd4512 /wd4701 /wd4702 /wd4706 /wd4800) # vs2005 ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4334) # vs2005 Win64 diff --git a/3rdparty/protobuf/CMakeLists.txt b/3rdparty/protobuf/CMakeLists.txt index f5ca6f1fff..e506fe9642 100644 --- a/3rdparty/protobuf/CMakeLists.txt +++ b/3rdparty/protobuf/CMakeLists.txt @@ -20,6 +20,7 @@ else() -Wundef -Wtautological-undefined-compare -Wignored-qualifiers -Wextra -Wunused-function -Wunused-const-variable -Wshorten-64-to-32 -Wno-invalid-offsetof -Wenum-compare-switch + -Wsuggest-override -Winconsistent-missing-override ) endif() if(CV_ICC) diff --git a/modules/viz/CMakeLists.txt b/modules/viz/CMakeLists.txt index 3575a0cb6e..903022bbaf 100644 --- a/modules/viz/CMakeLists.txt +++ b/modules/viz/CMakeLists.txt @@ -24,7 +24,7 @@ if(NOT BUILD_SHARED_LIBS) endif() endif() -ocv_warnings_disable(CMAKE_CXX_FLAGS -Winconsistent-missing-override) +ocv_warnings_disable(CMAKE_CXX_FLAGS -Winconsistent-missing-override -Wsuggest-override) ocv_define_module(viz opencv_core WRAP python) ocv_target_link_libraries(${the_module} LINK_PRIVATE ${VTK_LIBRARIES})