mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-11 17:49:38 -06:00
FindRuby: Fix incorrect code and versions
This commit is contained in:
committed by
Brad King
parent
deb67fa837
commit
752d5cace6
@@ -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