From 788d6a7105d00dd4b06e9121d7d101e563c5527c Mon Sep 17 00:00:00 2001 From: Sayed Adel Date: Wed, 2 May 2018 08:19:50 +0000 Subject: [PATCH] cmake: Disable -Wsuggest-override option in case of using PCH #11433 --- cmake/OpenCVCompilerOptions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake index 774103af3a..d83777fe4b 100644 --- a/cmake/OpenCVCompilerOptions.cmake +++ b/cmake/OpenCVCompilerOptions.cmake @@ -104,7 +104,7 @@ if(CV_GCC OR CV_CLANG) add_extra_compiler_option(-Wuninitialized) add_extra_compiler_option(-Winit-self) if(HAVE_CXX11) - if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT ENABLE_PRECOMPILED_HEADERS) add_extra_compiler_option(-Wsuggest-override) elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") add_extra_compiler_option(-Winconsistent-missing-override)