forked from pool/opencv
1 OBS-URL: https://build.opensuse.org/request/show/499529 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opencv?expand=0&rev=65
36 lines
1.6 KiB
Diff
36 lines
1.6 KiB
Diff
From 583e3a68758f02060099994b1fd41b823ddc2bab Mon Sep 17 00:00:00 2001
|
|
From: Christof Kaufmann <christof.kaufmann@hs-bochum.de>
|
|
Date: Thu, 9 Mar 2017 16:13:46 +0100
|
|
Subject: [PATCH] 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 29f21d80158..4f9be6d1556 100644
|
|
--- a/cmake/OpenCVPCHSupport.cmake
|
|
+++ b/cmake/OpenCVPCHSupport.cmake
|
|
@@ -65,6 +65,9 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
|
|
ocv_is_opencv_directory(__result ${item})
|
|
if(__result)
|
|
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()
|
|
@@ -75,6 +78,9 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
|
|
ocv_is_opencv_directory(__result ${item})
|
|
if(__result)
|
|
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()
|