Commit 77bd9900 authored by Orion Poplawski's avatar Orion Poplawski Committed by Robert Maynard
Browse files

Support gcc versions up to 9.X

parent 7b7175dd
......@@ -174,7 +174,7 @@ macro(_vtk_test_compiler_hidden_visibility)
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
OUTPUT_VARIABLE _gcc_version_info
ERROR_VARIABLE _gcc_version_info)
string(REGEX MATCH "[3456]\\.[0-9]\\.[0-9]*"
string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
_gcc_version "${_gcc_version_info}")
# gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
# patch level, handle this here:
......
......@@ -32,7 +32,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
OUTPUT_VARIABLE _gcc_version_info
ERROR_VARIABLE _gcc_version_info)
string (REGEX MATCH "[3456]\\.[0-9]\\.[0-9]*"
string (REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
_gcc_version "${_gcc_version_info}")
if(NOT _gcc_version)
string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment