diff --git a/cmake/OpenCVPCHSupport.cmake b/cmake/OpenCVPCHSupport.cmake index 13619daf27..e6585cae02 100644 --- a/cmake/OpenCVPCHSupport.cmake +++ b/cmake/OpenCVPCHSupport.cmake @@ -19,7 +19,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX) ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion OUTPUT_VARIABLE gcc_compiler_version) #MESSAGE("GCC Version: ${gcc_compiler_version}") - IF(gcc_compiler_version VERSION_GREATER "4.2.-1") + IF(gcc_compiler_version VERSION_GREATER "4.2.-1" AND gcc_compiler_version VERSION_LESS "6.0.0") SET(PCHSupport_FOUND TRUE) ENDIF()