[opencv] 45/53: cmake: Avoid adding default path as system directory for GCC 6.x

Nobuhiro Iwamatsu iwamatsu at moszumanska.debian.org
Sun Aug 27 23:27:07 UTC 2017


This is an automated email from the git hooks/post-receive script.

iwamatsu pushed a commit to annotated tag 2.4.13.3
in repository opencv.

commit 572c86176a6467db2e42ec68939cea43f45b1bdf
Author: Christof Kaufmann <christof.kaufmann at hs-bochum.de>
Date:   Thu Mar 9 16:13:46 2017 +0100

    cmake: Avoid adding default path as system directory for GCC 6.x
    
    This is a completion for PR #7390 and fixes #6517 and #815.
---
 cmake/OpenCVPCHSupport.cmake | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/cmake/OpenCVPCHSupport.cmake b/cmake/OpenCVPCHSupport.cmake
index 7d7aacf..0084747 100644
--- a/cmake/OpenCVPCHSupport.cmake
+++ b/cmake/OpenCVPCHSupport.cmake
@@ -69,6 +69,9 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
     FOREACH(item ${DIRINC})
         if(item MATCHES "^${OpenCV_SOURCE_DIR}/modules/")
           LIST(APPEND ${_out_compile_flags} "${_PCH_include_prefix}\"${item}\"")
+        elseif(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND
+               item MATCHES "/usr/include$")
+          # workaround for GCC 6.x bug
         else()
           LIST(APPEND ${_out_compile_flags} "${_PCH_isystem_prefix}\"${item}\"")
         endif()
@@ -78,6 +81,9 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
     FOREACH(item ${DIRINC})
         if(item MATCHES "^${OpenCV_SOURCE_DIR}/modules/")
           LIST(APPEND ${_out_compile_flags} "${_PCH_include_prefix}\"${item}\"")
+        elseif(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND
+               item MATCHES "/usr/include$")
+          # workaround for GCC 6.x bug
         else()
           LIST(APPEND ${_out_compile_flags} "${_PCH_isystem_prefix}\"${item}\"")
         endif()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git



More information about the debian-science-commits mailing list