905d5667e8 FindRuby: Add support for RVM installations
e6699b9b59 FindRuby: Validate Ruby_EXECUTABLE before accepting it
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4386
Since commit 957c2aac7f (RC: Simplify selection of resource compiler
based on C/C++ toolchain, 2015-05-07, v3.3.0-rc1~93^2~5) we select
windres as the RC compiler on MinGW via `CMAKE_RC_COMPILER_INIT`. Drop
the special case from commit be9afbf453 (Find mingw's windres also when
Unix Makefiles are used, 2012-08-27, v2.8.10~152^2).
The check_language sets internal variables with a common name in the
caller's scope: `result`, `output` and `content`.
They are now prefixed with `_cl_`,
inspired by the CheckLibraryExists module.
46064c8193 FindRuby: Add support for versions up to 2.7
675eaf3bd0 FindRuby: Update MSVC runtime library selection
b970e25d98 FindRuby: Remove extra whitespace
ecdace4d61 FindRuby: Include FPHSA closer to where it is used
f52f496138 FindRuby: Provide Ruby_LIBRARIES result variable
b00d736a0b FindRuby: Add dedicated tests
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4481
In commit 3dab4682f6 (FindPython: reduces consumption of resources,
2020-02-10, v3.17.0-rc1~11^2) we accidentally broke the python
executable version validation when the "LOCATION" strategy is used
with the plain `FindPython` module. Fix the logic and add test
cases covering those combinations.
Fixes: #20465
Use the `MSVC_TOOLSET_VERSION` variable computed by CMake to get the
matching Ruby library name component.
Inspired-by: Julien Marrec <julien.marrec@gmail.com>
9728839b9e ASM: Fix executable link lines with GNU 'as' tool as CMAKE_ASM_COMPILER
5932f0be4f ASM: Fix depfile flags for GNU 'as' tool
0d0aa98c84 ASM: Record vendor-specific output matched to identify assembler
ee3ec27465 CMakeDetermineCompilerId: Set locale to C for vendor output match
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4460
In commit e672db628b (FindRuby: Rename variables to match case of module
name, 2020-03-11) compatibility was provided for result variables but
not for the cache entries that scripts might set.
e672db628b FindRuby: Rename variables to match case of module name
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Frank Dana <ferdnyc@gmail.com>
Merge-request: !4463
When executing googltests in parallel using 'ctest -j n' and using
'--gtest_output=xml' there is a race condition upon file creation.
See googletest issue https://github.com/google/googletest/issues/2506.
As all testcases (potentially) can be run in parallel each testcase has
to create it's own XML JUnit file. EXTRA_ARGS is not suitable because it
is identical per testsuite.
So instead a new (opitional) parameter has been introduced to specify
the storage location for each test of the testsuite.
The GNU `as --help` shows `--MD <file>` as an option to generate depfiles
as needed by Ninja. There is no `-MT <target>` flag but fortunately the
generated files automatically account for the `-o <obj>` flag.
Issue: #20426
For example, with GNU `as`, we match `GNU assembler`, but with GNU `gcc`
as the assembler, we do not match anything. Distinguishing these cases
may be useful for constructing assembler command lines.
Apply the change from commit d751d2d2ed (CMakeDetermineCompilerABI: set
locale to C for try_compile(), 2019-01-14, v3.14.0-rc1~108^2~1) to the
`CMAKE_DETERMINE_COMPILER_ID_VENDOR` implementation too.
Fixes regression introduced dac201442d (GoogleTest: Optimize gtest_discover_tests, 2020-02-18).
The generated CTest include files has the form:
if(EXISTS "foo_tests.cmake")
include("foo_tests.cmake")
else()
add_test(foo_NOT_BUILT foo_test_NOT_BUILT)
endif()
Starting in dac201442d, an empty discovery_timeout_test[1]_tests.cmake was written
as soon as GoogleTestAddTests was processed.
This meant, that even if test discovery would fail (due to a crash or timeout in the executable),
we would always produce an empty CTest file.
So instead of reporting:
Unable to find executable: foo_NOT_BUILT
Errors while running CTest
We instead get:
No tests were found!!!
To fix the problem, we WRITE the file on the first call to flush_script,
thus creating the file once we know we have valid output
and the call to gtest_discover_tests hasn't failed.
After creating the file, we then set the mode to APPEND
and append to the file for every subsequent call.