Debian Codegraph @

Tests/RunCMake/FindRuby/Rvm/UnsetRvmOnly.cmake

raw
1 set(CMAKE_FIND_LIBRARY_PREFIXES "")
2 set(CMAKE_FIND_LIBRARY_SUFFIXES "")
3
4 set(Ruby_FIND_VIRTUALENV ONLY)
5 set(Ruby_RBENV_EXECUTABLE "") # Suppress rbenv code path for this test.
6
7 # If ENV{MY_RUBY_HOME} isn't defined and Ruby_FIND_VIRTUALENV is set to ONLY
8 # then Ruby should not be found
9 find_package (Ruby ${RVM_RUBY_VERSION} EXACT QUIET)
10 if (Ruby_FOUND)
11 message (FATAL_ERROR "Incorrectly found Ruby: ${Ruby_EXECUTABLE}")
12 endif()
13
14 # it should *not* find the system ruby
15 find_package (Ruby ${SYSTEM_RUBY_VERSION} EXACT QUIET)
16 if (Ruby_FOUND)
17 message (FATAL_ERROR "Incorrectly found Ruby: ${Ruby_EXECUTABLE}")
18 endif()