Debian Codegraph @

Tests/RunCMake/FindRuby/Rbenv/RbenvOnly.cmake

raw
1 set(CMAKE_FIND_LIBRARY_PREFIXES "")
2 set(CMAKE_FIND_LIBRARY_SUFFIXES "")
3
4 set(Ruby_FIND_VIRTUALENV ONLY)
5 unset(ENV{MY_RUBY_HOME}) # Suppress RVM code path for this test.
6
7 # We should find the rbenv Ruby not standard Ruby
8 unset(Ruby_EXECUTABLE CACHE)
9 unset(RUBY_EXECUTABLE) # compatibility variable
10 find_package (Ruby QUIET)
11 if (NOT Ruby_EXECUTABLE STREQUAL "${RBENV_RUBY}")
12 message (FATAL_ERROR "Failed to find rbenv Ruby: ${Ruby_EXECUTABLE}")
13 endif()
14
15 # We should find the rbenv Ruby not standard Ruby
16 unset(Ruby_EXECUTABLE CACHE)
17 unset(RUBY_EXECUTABLE) # compatibility variable
18 find_package (Ruby ${RBENV_RUBY_VERSION} QUIET)
19 if (NOT Ruby_EXECUTABLE STREQUAL "${RBENV_RUBY}")
20 message (FATAL_ERROR "Failed to find rbenv Ruby: ${Ruby_EXECUTABLE}")
21 endif()
22
23 # We should not find standard Ruby
24 unset(Ruby_EXECUTABLE CACHE)
25 unset(RUBY_EXECUTABLE) # compatibility variable
26 find_package (Ruby ${SYSTEM_RUBY_VERSION} EXACT QUIET)
27 if (NOT Ruby_EXECUTABLE STREQUAL "Ruby_EXECUTABLE-NOTFOUND")
28 message (FATAL_ERROR "Incorrectly found Ruby: ${Ruby_EXECUTABLE}")
29 endif()