Merge pull request #2618 from rcurtin/go-version-regex

Fix regex for versions of Go without a patch version
This commit is contained in:
Ryan Birmingham
2020-09-11 17:57:24 -04:00
committed by GitHub
+2 -2
View File
@@ -14,9 +14,9 @@ if (GO_EXECUTABLE)
RESULT_VARIABLE RESULT
)
if (RESULT EQUAL 0)
string(REGEX REPLACE ".*([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1"
string(REGEX REPLACE ".*([0-9]+\\.[0-9]+\(\\.[0-9]+\)?).*" "\\1"
GO_VERSION_STRING ${GO_VERSION_STRING})
endif()
endif()
endif()
include(FindPackageHandleStandardArgs)