[opencv] 07/89: cmake: fix for GCC 6.x
Nobuhiro Iwamatsu
iwamatsu at moszumanska.debian.org
Sat May 13 09:57:20 UTC 2017
This is an automated email from the git hooks/post-receive script.
iwamatsu pushed a commit to annotated tag 2.4.13.2
in repository opencv.
commit c181f2f4937186306dc6f1a72fc3cebd8685f37a
Author: Alexander Alekhin <alexander.alekhin at intel.com>
Date: Tue Oct 4 13:30:43 2016 +0300
cmake: fix for GCC 6.x
---
cmake/OpenCVPCHSupport.cmake | 7 +------
cmake/OpenCVUtils.cmake | 3 +++
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/cmake/OpenCVPCHSupport.cmake b/cmake/OpenCVPCHSupport.cmake
index e6585ca..7d7aacf 100644
--- a/cmake/OpenCVPCHSupport.cmake
+++ b/cmake/OpenCVPCHSupport.cmake
@@ -14,12 +14,7 @@
IF(CMAKE_COMPILER_IS_GNUCXX)
- EXEC_PROGRAM(
- ${CMAKE_CXX_COMPILER}
- 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" AND gcc_compiler_version VERSION_LESS "6.0.0")
+ IF(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.2.0")
SET(PCHSupport_FOUND TRUE)
ENDIF()
diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake
index 0692b76..0241c43 100644
--- a/cmake/OpenCVUtils.cmake
+++ b/cmake/OpenCVUtils.cmake
@@ -41,6 +41,9 @@ function(ocv_include_directories)
get_filename_component(__abs_dir "${dir}" ABSOLUTE)
if("${__abs_dir}" MATCHES "^${OpenCV_SOURCE_DIR}" OR "${__abs_dir}" MATCHES "^${OpenCV_BINARY_DIR}")
list(APPEND __add_before "${dir}")
+ elseif(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND
+ dir MATCHES "/usr/include$")
+ # workaround for GCC 6.x bug
else()
include_directories(AFTER SYSTEM "${dir}")
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