cmake: disable override warnings in 3rdparty code and viz

This commit is contained in:
Alexander Alekhin 2018-03-15 16:04:21 +03:00
parent 773877cd12
commit 0587f92d96
3 changed files with 3 additions and 1 deletions

View File

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

View File

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

View File

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