Skip to content
Snippets Groups Projects
Commit 7405f246 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: #1707: fix OpenCV compilation with GCC 7

parent fa93eaec
No related branches found
No related tags found
1 merge request!220Resolve "SuperBuild - OpenCV compilation"
diff -burN OPENCV-orig/cmake/OpenCVDetectCXXCompiler.cmake OPENCV/cmake/OpenCVDetectCXXCompiler.cmake
--- OPENCV-orig/cmake/OpenCVDetectCXXCompiler.cmake 2018-09-05 09:39:36.254808812 +0200
+++ OPENCV/cmake/OpenCVDetectCXXCompiler.cmake 2018-09-05 09:44:19.273777344 +0200
@@ -77,6 +77,10 @@
# Split the three parts:
string(REGEX MATCHALL "[0-9]+" CMAKE_OPENCV_GCC_VERSIONS "${CMAKE_GCC_REGEX_VERSION}")
+ list(LENGTH CMAKE_OPENCV_GCC_VERSIONS CMAKE_OPENCV_GCC_VERSIONS_LENGTH)
+ if(${CMAKE_OPENCV_GCC_VERSIONS_LENGTH} LESS 2)
+ string(REGEX MATCHALL "[0-9]+" CMAKE_OPENCV_GCC_VERSIONS "${CMAKE_CXX_COMPILER_VERSION}")
+ endif()
list(GET CMAKE_OPENCV_GCC_VERSIONS 0 CMAKE_OPENCV_GCC_VERSION_MAJOR)
list(GET CMAKE_OPENCV_GCC_VERSIONS 1 CMAKE_OPENCV_GCC_VERSION_MINOR)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment