--- a/CMake/VTKGenerateExportHeader.cmake  2020-05-24 14:33:12.154603698 -0600
+++ b/CMake/VTKGenerateExportHeader.cmake  2020-05-24 14:33:34.864603776 -0600
@@ -174,8 +174,12 @@
     execute_process(COMMAND ${CMAKE_C_COMPILER} --version
       OUTPUT_VARIABLE _gcc_version_info
       ERROR_VARIABLE _gcc_version_info)
-    string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
+    string(REGEX MATCH "[1-9][0-9]\\.[0-9]\\.[0-9]*"
       _gcc_version "${_gcc_version_info}")
+    if(NOT _gcc_version)
+      string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
+        _gcc_version "${_gcc_version_info}")
+    endif()
     # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
     # patch level, handle this here:
     if(NOT _gcc_version)