mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
Tests/FindRuby/Rvm: Honor Ruby_FIND_VIRTUALENV ONLY
This commit is contained in:
@@ -21,21 +21,17 @@ endif()
|
||||
# Test: FindRuby.UnsetRvmOnly
|
||||
if (NOT RUBY_HOME)
|
||||
|
||||
# If ENV{MY_RUBY_HOME} isn't defined, it should default back to "STANDARD"
|
||||
# At which point:
|
||||
# If ENV{MY_RUBY_HOME} isn't defined and Ruby_FIND_VIRTUALENV is set to ONLY
|
||||
# then Ruby should not be found
|
||||
|
||||
# It shouldn't find the RVM ruby
|
||||
find_package (Ruby ${RVM_RUBY_VERSION} EXACT QUIET)
|
||||
if(Ruby_FOUND)
|
||||
message(FATAL_ERROR "Found RVM ruby when expecting system")
|
||||
message (FATAL_ERROR "RVM Ruby unexpectedly found.")
|
||||
endif()
|
||||
|
||||
# it should find the system ruby
|
||||
# it should *not* find the system ruby
|
||||
find_package (Ruby ${SYSTEM_RUBY_VERSION} EXACT QUIET)
|
||||
if(NOT Ruby_FOUND)
|
||||
message (FATAL_ERROR "Ruby not found.")
|
||||
endif()
|
||||
if (Ruby_FOUND MATCHES "^${RUBY_HOME}/.+")
|
||||
message(FATAL_ERROR "Failed to find system ruby")
|
||||
if(Ruby_FOUND)
|
||||
message (FATAL_ERROR "Ruby unexpectedly found.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user