109 Commits

Author SHA1 Message Date
Charlie Savage
fe006b5e9d FindRuby: Only search for released Ruby versions 2026-01-26 14:25:59 -08:00
Charlie Savage
82d39e5a7c FindRuby: Fix cache strings 2026-01-26 13:16:41 -08:00
Charlie Savage
a6a27d9160 FindRuby: Change MESSAGE to message. 2026-01-26 13:16:14 -08:00
Charlie Savage
af39d00aaa FindRuby: Fix debug message to output correct variable. 2026-01-26 13:15:36 -08:00
Charlie Savage
c5e7cb691c FindRuby: Add support for interpreter and development components 2026-01-23 10:35:43 -05:00
Charlie Savage
dc8e05c4d2 FindRuby: Simplify finding the Ruby library - Ruby already knows! 2026-01-23 10:35:43 -05:00
Charlie Savage
b192f706aa FindRuby: Remove broken, untested and unmaintained cross-compiling support 2026-01-23 10:35:43 -05:00
Charlie Savage
ee75b3e7b4 FindRuby: Clean up variables read from Ruby 2026-01-23 10:35:43 -05:00
Charlie Savage
ba37066185 FindRuby: Versions are strings not paths. 2026-01-23 10:35:43 -05:00
Charlie Savage
b2bd6b221c FindRuby: Enclose Ruby executable in quotes 2026-01-23 10:35:43 -05:00
Charlie Savage
752d5cace6 FindRuby: Fix incorrect code and versions 2026-01-23 10:35:42 -05:00
Charlie Savage
deb67fa837 FindRuby: Remove duplicate word 2026-01-23 10:35:42 -05:00
Charlie Savage
dba840934c FindRuby: Add Ruby 4.0 support 2026-01-23 10:35:42 -05:00
Charlie Savage
56b3437108 FindRuby: Fix finding headers on Github MacOS runners using Brew 2026-01-23 10:35:42 -05:00
Charlie Savage
b4f2c7beab FindRuby: Hide interpreter query cache entries
Avoid exposing them to editing in `cmake-gui` or `ccmake`.
2025-12-11 09:22:06 -05:00
Charlie Savage
996a65a328 FindRuby: Add support for Brew on macOS
Brew is a common way to install Ruby on MacOS.  Search using paths
provided by the ruby interpreter.
2025-12-09 15:46:22 -05:00
Peter Kokot
0fedf1592c
Find*: Update *_FOUND variables
This marks all `<PACKAGENAME>_FOUND` result variables as deprecated
where possible (for `<PackageName>` find modules) to make it clearer
which variable to use.

In CMake 3.3, the FindPackageHandleStandardArgs module was refactored to
set both `<PackageName>_FOUND` and uppercase `<PACKAGENAME>_FOUND`
result variables to the same values. Before that, the FOUND_VAR argument
could be used to set the result variable.

* FindMatlab: Uppercased MATLAB_FOUND is not mentioned as it was never
  documented.
* Documentation for FindPythonInterp and FindPythonLibs modules synced
  accordingly to their deprecation (3.12 instead of 4.2).
* OPENGL_FOUND: deprecation version synced with other find modules.
* DevIL_FOUND was introduced in CMake 3.8. The uppercased variant not
  mentioned as it was previously never documented.

Fixes: #27242
2025-09-23 21:40:58 +02:00
Peter Kokot
8510666702
FindRuby: Sync documentation
- Added intro code block showing how to use this module.
- Resorted result variables.
- Synced descriptions.
- Added separate examples section.
2025-08-06 00:37:13 +02:00
cfis
c972050ff5 FindRuby: Improve logic populating MSVC runtime alternatives
Ruby (mswin) links to vcruntime140, but future proof by using MSVC
toolset version.
2025-05-14 08:44:48 -04:00
cfis
cc4f7a73bd FindRuby: Improve order of library name alternatives
Prefer long versions over short versions.
Prefer dotted versions over no-dot versions.
2025-05-14 08:42:22 -04:00
cfis
e99cb9e35a FindRuby: The library name on Windows uses major.minor.0 format 2025-05-13 11:25:34 -04:00
cfis
d703443809 FindRuby: Improve formatting of list of possible library names 2025-05-05 09:50:14 -04:00
cfis
120192cde7 FindRuby: Fix typos in variable names 2025-05-05 09:48:44 -04:00
cfis
13da6bea6e FindRuby: Generalize name of runtime candidates variable 2025-05-05 09:47:22 -04:00
cfis
ae1ce9048a FindRuby: Name private version variables more consistently 2025-05-05 09:46:12 -04:00
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Charlie Savage
21a5ca5fc2 FindRuby: Update comments 2025-02-03 11:44:02 -05:00
Brad King
d65f522a50 Merge topic 'FindRuby-compat-vars'
2d86cf314f FindRuby: Drop upper-case RUBY_ results in favor of Ruby_ variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10273
2025-02-02 07:03:10 -05:00
Brad King
2d86cf314f FindRuby: Drop upper-case RUBY_ results in favor of Ruby_ variables
Add policy CMP0185 for compatibility.

Fixes: #26640
2025-02-01 07:12:30 -05:00
Charlie Savage
8d1f9e5408 FindRuby: Port debug output to message(DEBUG) 2025-01-31 09:07:19 -05:00
Brad King
7afa58b15d Modules/Find*: Include FindPackageHandleStandardArgs normally
Since commit d74210a8bd (CMP0017: Remove support for OLD behavior,
2024-11-17) we can rely on CMP0017's NEW behavior unconditionally.
Calling `include(FindPackageHandleStandardArgs)` in a builtin module
will always get the builtin `FindPackageHandleStandardArgs`.
2025-01-30 08:53:12 -05:00
Charlie Savage
64e4b4c638 FindRuby: Reformat code so it is consistent 2025-01-29 10:29:16 -08:00
Brad King
ec7cc80370 Merge topic 'patch-lower-case-style'
4e6a13f211 Use lower case style for commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !10245
2025-01-29 11:37:51 -05:00
Peter Kokot
4e6a13f211 Use lower case style for commands
Where possible this syncs the CS for command names:

- check_c_source_compiles()
- check_cxx_compiler_flag()
- check_cxx_source_compiles()
- check_cxx_symbol_exists()
- check_include_file_cxx()
- check_include_file()
- check_include_files()
- check_library_exists()
- check_source_compiles()
- check_struct_has_member()
- check_symbol_exists()
- check_type_size()
- cmake_dependent_option()
- cmake_parse_arguments()
- feature_summary()
- file()
- find_package_handle_standard_args()
- if(), endif...
- install(FILES)
- list()
- message()
- pkg_check_modules()
- select_library_configurations()
- set_package_info()
- test_big_endian()
2025-01-28 13:51:46 -05:00
cfis
ef2c3ca828 FindRuby: Add rbenv support 2025-01-27 20:36:06 -05:00
Charlie Savage
61c3718a00 FindRuby: Use find_program VALIDATOR
Avoid caching an unsuitable version of `Ruby_EXECUTABLE`.
2025-01-17 18:02:34 -05:00
Charlie Savage
e891159657 FindRuby: Clarify search process comments and conditions 2025-01-17 17:05:47 -05:00
Charlie Savage
9f0b3e90b6 FindRuby: Remove unused variable 2025-01-17 17:05:47 -05:00
Brad King
e184dda2da FindRuby: Query Ruby_EXECUTABLE again if it changes 2025-01-17 17:05:47 -05:00
cfis
a023377b86 FindRuby: Move checking of RVM and System Ruby to separate functions. 2024-12-04 13:21:04 -08:00
cfis
48bf16fba1 FindRuby: Remove unneeded code and define all functions at the top-level. 2024-12-03 12:12:59 -08:00
cfis
21e51dca1d FindRuby: Add support for 3.4 2024-12-02 13:25:54 -05:00
Charlie Savage
c2bf3e46fa FindRuby: Fix finding Ruby 3.1+ on Windows
It switched to the UCRT C runtime.
2024-03-05 08:47:59 -05:00
Charlie Savage
867550db43 FindRuby: Add support for 3.3 2024-03-05 08:46:29 -05:00
Heiko Becker
77ed529c22 FindRuby: Add support for 3.2 2023-10-10 09:25:05 -04:00
Hannes Braun
0d7f40a5c4 FindRuby: Remove documentation for non-existent Ruby_ROOT_DIR
Documentation was added by commit 905d5667e8 (FindRuby: Add support for
RVM installations, 2020-03-23, v3.18.0-rc1~497^2), but this feature was
never implemented.

Closes: #21528
2022-11-28 10:35:00 -05:00
Diego Pino Garcia
abe8192d82 FindRuby: Simplify version matching 2022-06-30 09:51:15 +08:00
Mihai Moldovan
6b6bc7791d FindRuby: evict non-matching binaries and keep scanning.
The possible executable names list always starts with a plain "ruby"
binary, which is scanned for first. If that does exist (which satisfies
find_program), but doesn't match the requested version, the executable
will be dismissed by _RUBY_VALIDATE_INTERPRETER (which is sane), but
searching also stops.

Fix that by keeping the search going, removing items from the list as we
go, until find_program returns a path that _RUBY_VALIDATE_INTERPRETER is
happy with or the list is empty.
2022-01-31 05:57:42 +01:00
Mihai Moldovan
42d99a248e FindRuby: add support for versions up to 3.1. 2022-01-31 05:51:36 +01:00
Pedro Luis Castedo Cepeda
238c2b6cb7 FindRuby: Consider ruby names with full nodot version suffixes 2021-03-25 15:30:09 -04:00