| 1 |
set(CMAKE_FIND_LIBRARY_PREFIXES "") |
| 2 |
set(CMAKE_FIND_LIBRARY_SUFFIXES "") |
| 3 |
|
| 4 |
unset(ENV{MY_RUBY_HOME}) # Suppress RVM code path for this test. |
| 5 |
|
| 6 |
# Should find rbenv Ruby |
| 7 |
unset(Ruby_EXECUTABLE CACHE) |
| 8 |
unset(RUBY_EXECUTABLE) # compatibility variable |
| 9 |
find_package (Ruby REQUIRED) |
| 10 |
if (NOT "${Ruby_EXECUTABLE}" STREQUAL "${RBENV_RUBY}") |
| 11 |
message (FATAL_ERROR "Failed to find rbenv Ruby: ${Ruby_EXECUTABLE}") |
| 12 |
endif() |
| 13 |
|
| 14 |
# Should find rbenv Ruby |
| 15 |
unset(Ruby_EXECUTABLE CACHE) |
| 16 |
unset(RUBY_EXECUTABLE) # compatibility variable |
| 17 |
find_package (Ruby ${RBENV_RUBY_VERSION} REQUIRED) |
| 18 |
if (NOT Ruby_EXECUTABLE MATCHES "${RBENV_RUBY}") |
| 19 |
message (FATAL_ERROR "Failed to find rbenv Ruby: ${Ruby_EXECUTABLE}") |
| 20 |
endif() |
| 21 |
|
| 22 |
# Should find standard Ruby |
| 23 |
unset(Ruby_EXECUTABLE CACHE) |
| 24 |
unset(RUBY_EXECUTABLE) # compatibility variable |
| 25 |
find_package (Ruby ${SYSTEM_RUBY_VERSION} EXACT) |
| 26 |
if (NOT Ruby_EXECUTABLE STREQUAL "${SYSTEM_RUBY}") |
| 27 |
message (FATAL_ERROR "Failed to find system Ruby: ${Ruby_EXECUTABLE}") |
| 28 |
endif() |