mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-29 04:09:35 +03:00
FindRuby: Fix incorrect code and versions
This commit is contained in:
1 parent
deb67fa837
commit
752d5cace6
1 file changed
+3
-3
@@ -420,12 +420,12 @@ if (Ruby_EXECUTABLE AND NOT Ruby_VERSION_MAJOR)
|
||||
# check whether we found 2.[0-7].x
|
||||
if (${Ruby_EXECUTABLE} MATCHES "ruby2")
|
||||
set(Ruby_VERSION_MAJOR 2)
|
||||
string(REGEX_REPLACE ${Ruby_EXECUTABLE} "ruby2\\.?([0-7])" "\\1" Ruby_VERSION_MINOR)
|
||||
string(REGEX REPLACE ${Ruby_EXECUTABLE} "ruby2\\.?([0-7])" "\\1" Ruby_VERSION_MINOR)
|
||||
endif ()
|
||||
# check whether we found 3.[0-1].x
|
||||
# check whether we found 3.[0-4].x
|
||||
if (${Ruby_EXECUTABLE} MATCHES "ruby3")
|
||||
set(Ruby_VERSION_MAJOR 3)
|
||||
string(REGEX_REPLACE ${Ruby_EXECUTABLE} "ruby3\\.?([0-1])" "\\1" Ruby_VERSION_MINOR)
|
||||
string(REGEX REPLACE ${Ruby_EXECUTABLE} "ruby3\\.?([0-4])" "\\1" Ruby_VERSION_MINOR)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
Reference in new issue
Block a user