Debian Codegraph @

Tests/RunCMake/FindRuby/Rvm/RvmOnly.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 # Trying to find the exact system ruby version using ONLY virtual environment should fail
8 find_package (Ruby ${SYSTEM_RUBY_VERSION} EXACT QUIET)
9 if (Ruby_FOUND)
10 message (FATAL_ERROR "Incorrectly found system Ruby: ${Ruby_EXECUTABLE}, ${MY_RUBY_HOME}")
11 endif()
12
13 # Finding RVM version should work
14 find_package (Ruby ${RVM_RUBY_VERSION} EXACT QUIET)
15 if (!Ruby_FOUND)
16 message (FATAL_ERROR "Failed to find RVM Ruby: ${MY_RUBY_HOME}")
17 endif()