mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
cmake: Avoid adding default path as system directory for GCC 6.x
This is a completion for PR #7390 and fixes #6517 and #815.
This commit is contained in:
parent
e4377e7c51
commit
583e3a6875
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user