diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake index fae91c165f..60c20192dc 100644 --- a/cmake/OpenCVUtils.cmake +++ b/cmake/OpenCVUtils.cmake @@ -259,7 +259,7 @@ function(ocv_include_directories) ocv_is_opencv_directory(__is_opencv_dir "${dir}") if(__is_opencv_dir) list(APPEND __add_before "${dir}") - elseif(CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND + elseif(((CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0") OR CV_CLANG) AND dir MATCHES "/usr/include$") # workaround for GCC 6.x bug else()