Commit 0ede1b5b authored by Alexander Alekhin's avatar Alexander Alekhin

cmake: enable override warnings (requires C++11 compilation mode)

parent d800a0bd
...@@ -103,6 +103,13 @@ if(CV_GCC OR CV_CLANG) ...@@ -103,6 +103,13 @@ if(CV_GCC OR CV_CLANG)
add_extra_compiler_option(-Wsign-promo) add_extra_compiler_option(-Wsign-promo)
add_extra_compiler_option(-Wuninitialized) add_extra_compiler_option(-Wuninitialized)
add_extra_compiler_option(-Winit-self) add_extra_compiler_option(-Winit-self)
if(HAVE_CXX11)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_extra_compiler_option(-Wsuggest-override)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_extra_compiler_option(-Winconsistent-missing-override)
endif()
endif()
if(ENABLE_NOISY_WARNINGS) if(ENABLE_NOISY_WARNINGS)
add_extra_compiler_option(-Wcast-align) add_extra_compiler_option(-Wcast-align)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment