[Regression] FindRuby in CMake 3.18 no longer defines RUBY_INCLUDE_PATH
The FindRuby
module received several enhancement but it no longer defines the RUBY_INCLUDE_PATH
variable even though from the code it looks like it should still be defined:
From the code:
https://gitlab.kitware.com/cmake/cmake/-/blob/v3.18.1/Modules/FindRuby.cmake#L481-484
# Set some variables for compatibility with previous version of this file (no need to provide a CamelCase version of that...)
# ...
set(RUBY_INCLUDE_PATH ${Ruby_INCLUDE_DIRS})
Here the variable is defined with its correct value, but later:
https://gitlab.kitware.com/cmake/cmake/-/blob/v3.18.1/Modules/FindRuby.cmake#L486-512
# Backwards compatibility
# Define upper case versions of output variables
foreach(Camel
# ...
Ruby_INCLUDE_PATH
# ...
)
string(TOUPPER ${Camel} UPPER)
set(${UPPER} ${${Camel}})
endforeach()
Since the Ruby_INCLUDE_PATH
variable is not defined, the RUBY_INCLUDE_PATH
variable is deleted.
The documentation is also wrong since it says:
https://gitlab.kitware.com/cmake/cmake/-/blob/v3.18.1/Modules/FindRuby.cmake#L51-54
``Ruby_INCLUDE_PATH``
same as Ruby_INCLUDE_DIRS, only provided for compatibility reasons, don't use it
but it should probably still refer to RUBY_INCLUDE_PATH
(like in the previous version of the module) since it makes no sense to add a new variable in CMake 3.18 that is already deprecated...
It would be also nice if the other uppercase variables were mentioned here.