Skip to content

FindRuby: Update to handle RVM environments

Julien Marrec requested to merge jmarrec/cmake:20370_FindRuby into master

EDIT: This merge request originally made changes to support ruby 2.7 and RVM. The former parts have been moved to !4463 (merged), !4476 (merged), and !4481 (merged).

Original Description

Fixes #20370 (closed) (hopefully). This is my first code contribution to the CMake project so I assume there's a bunch of stuff that could use adjustments.

Focus points:

  • Result variables have historically been all upper case, that is RUBY_xxx instead of Ruby_xxx like other FindXXX.cmake modules. Eg it returns RUBY_EXECUTABLE instead of Ruby_EXECUTABLE. I didn't want to break backward compat so I didn't change that.
  • I tried to add thorough tests (and they helped catch a bunch of issues), but they are pretty specific to my own machine, due to fact that I test based on my system version and the RVM versions I have installed... I know nothing about your CI setup, so not in a position to make that better right now.

Side Notes:

Topic-rename: FindRuby-rvm

Edited by Brad King

Merge request reports