From b299d226da94a06e54667107c86558073e4ce7f3 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Thu, 10 Sep 2020 19:45:46 -0400 Subject: [PATCH] Fix regex for versions of Go without a patch version. --- CMake/FindGo.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMake/FindGo.cmake b/CMake/FindGo.cmake index dfccd8a9fe..39b93f69aa 100644 --- a/CMake/FindGo.cmake +++ b/CMake/FindGo.cmake @@ -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)