Commit Graph

10302 Commits

Author SHA1 Message Date
Brad King
545875bebe Merge topic 'mingw-windres-cross-compile'
af4adf6aa9 MinGW: Fix default windres selection when cross-compiling
0251ddadab MinGW: Drop unnecessary windres selection code with Unix Makefiles

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4520
2020-03-26 09:06:13 -04:00
Brad King
79415fa6d3 Merge topic 'FindRuby-rvm'
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
2020-03-25 08:16:38 -04:00
Brad King
f2b4576373 Merge topic 'FindPython-polish'
bf1ecfef7f FindPython: misc. fixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4519
2020-03-25 08:13:07 -04:00
Brad King
af4adf6aa9 MinGW: Fix default windres selection when cross-compiling
When cross-compiling to MinGW, select the `windres` tool named with the
toolchain's prefix.

Fixes: #20500
2020-03-25 07:21:01 -04:00
Brad King
0251ddadab MinGW: Drop unnecessary windres selection code with Unix Makefiles
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).
2020-03-25 07:21:01 -04:00
Marc Chevrier
bf1ecfef7f FindPython: misc. fixes
Help: Fix errors regardings HINTS.
Code: Optimize Python signature cache variable to avoid unecessary searchs.
2020-03-24 18:26:16 +01:00
Julien Marrec
905d5667e8 FindRuby: Add support for RVM installations 2020-03-23 13:22:23 +01:00
Julien Marrec
e6699b9b59 FindRuby: Validate Ruby_EXECUTABLE before accepting it 2020-03-23 13:21:40 +01:00
Brad King
dfca1887b0 Merge topic 'FindMatlab-r2020' into release-3.17
75331a4578 FindMatlab: Add R2020a=9.8

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4507
2020-03-20 06:22:48 -04:00
Brad King
a2bbc34ace Merge topic 'FindMatlab-r2020'
75331a4578 FindMatlab: Add R2020a=9.8

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4507
2020-03-20 06:22:48 -04:00
Brad King
3ab89b5475 Merge topic 'GetPrerequisites-vcruntime-is-system' into release-3.17
417b765f5a GetPrerequisites: Classify vcruntime libraries as system

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4506
2020-03-20 06:17:49 -04:00
Brad King
7c0346e90a Merge topic 'GetPrerequisites-vcruntime-is-system'
417b765f5a GetPrerequisites: Classify vcruntime libraries as system

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4506
2020-03-20 06:17:49 -04:00
Michael Hirsch, Ph.D
75331a4578 FindMatlab: Add R2020a=9.8
This allows Matlab R2020a to be recognized as a valid Matlab version.
2020-03-19 12:47:10 -04:00
Err0rC0deX
417b765f5a GetPrerequisites: Classify vcruntime libraries as system
Previously GetPrerequisites classified `vcruntime*.dll` as type "other".
They should be classified as type "system".
2020-03-19 10:17:40 -04:00
Hannes Vogt
36baf1f13c CheckLanguage: hide commonly used variable names
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.
2020-03-18 17:47:06 +01:00
Brad King
863b0fa2ac Merge topic 'FindRuby-updates'
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
2020-03-18 09:09:18 -04:00
Brad King
d9ad00119d Merge topic 'FindPkgConfig-broken-pkg-config'
1c99f5df28 FindPkgConfig: Add test for specified pkg-config tool missing
b59f36aad8 FindPkgConfig: Unset results when pkg-config is broken

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4451
2020-03-18 09:08:12 -04:00
Brad King
9abc99e905 Merge topic 'FindPython-version-validation-fix' into release-3.17
cc7f116cb4 FindPython: fix regression on version validation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4492
2020-03-18 07:54:23 -04:00
Brad King
3c7774e207 Merge topic 'FindPython-version-validation-fix'
cc7f116cb4 FindPython: fix regression on version validation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4492
2020-03-18 07:54:23 -04:00
Marc Chevrier
cc7f116cb4 FindPython: fix regression on version validation
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
2020-03-17 10:08:34 -04:00
Julien Marrec
46064c8193 FindRuby: Add support for versions up to 2.7
Fixes: #20370
2020-03-17 08:43:10 -04:00
Brad King
675eaf3bd0 FindRuby: Update MSVC runtime library selection
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>
2020-03-17 08:39:06 -04:00
Brad King
2e42bcdbf1 Merge topic 'FindThreads-doc'
1502f281dd FindThreads: Improve documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4480
2020-03-17 07:51:25 -04:00
Julien Marrec
b970e25d98 FindRuby: Remove extra whitespace 2020-03-16 14:07:30 -04:00
Brad King
ecdace4d61 FindRuby: Include FPHSA closer to where it is used 2020-03-16 14:07:30 -04:00
Brad King
f52f496138 FindRuby: Provide Ruby_LIBRARIES result variable
The `cmake-developer(7)` manual documents that a plural non-cached
name should be used for results.
2020-03-16 14:05:26 -04:00
Brad King
b59f36aad8 FindPkgConfig: Unset results when pkg-config is broken
Inspired-by: FUJI Goro <goro@fastly.com>
2020-03-16 12:27:11 -04:00
Rolf Eike Beer
1502f281dd FindThreads: Improve documentation
Issue: #19823
2020-03-16 11:46:38 -04:00
Brad King
c6def2107f Merge topic 'gtest-parallel-xml'
32bc6aa9b6 GoogleTest: Add release note for XML_OUTPUT_DIR
0001339a6f GoogleTest: Add test case for XML_OUTPUT_DIR
e9ab39eb1d GoogleTest: Add XML_OUTPUT_DIR parameter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4433
2020-03-16 11:40:21 -04:00
Brad King
eea528fd92 Merge topic 'gnu-as'
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
2020-03-16 11:31:25 -04:00
Brad King
ffa08d256f FindRuby: Fix compatibility with upper-case cache variables
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.
2020-03-13 14:13:17 -04:00
Brad King
50c97e1da0 FindRuby: Fix name of Ruby_LIBRARY variable
Fix a typo in the variable name caused by commit e672db628b (FindRuby:
Rename variables to match case of module name, 2020-03-11).
2020-03-13 13:59:17 -04:00
Brad King
3766633b8a Merge topic 'FindRuby-variable-case'
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
2020-03-13 11:01:56 -04:00
Alexander Stein
e9ab39eb1d GoogleTest: Add XML_OUTPUT_DIR parameter
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.
2020-03-13 10:47:33 -04:00
Brad King
c3ab1c22b0 Merge topic 'GoogleTest-gtest_discover_tests-failure'
2ba8ac07ed GoogleTest: Fix CTest not failing if gtest_discover_tests fails
2c9680eec5 GoogleTest: Add missing test case for gtest_discover_tests failure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Steffen Seckler <steffen.seckler@tum.de>
Acked-by: Matthew Woehlke <matthew.woehlke@kitware.com>
Merge-request: !4466
2020-03-13 10:46:20 -04:00
Brad King
ba216592fc Merge topic 'cuda_language'
f75bea1071 CUDA: Abstract language flag to compiler modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4464
2020-03-13 10:43:57 -04:00
Brad King
9728839b9e ASM: Fix executable link lines with GNU 'as' tool as CMAKE_ASM_COMPILER
The GNU `as` tool does not know how to drive linking like the C compiler
does.  When using `as` as the compiler, use the linker directly.
2020-03-13 09:55:36 -04:00
Brad King
5932f0be4f ASM: Fix depfile flags for GNU 'as' tool
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
2020-03-13 09:55:36 -04:00
Brad King
0d0aa98c84 ASM: Record vendor-specific output matched to identify assembler
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.
2020-03-12 10:07:30 -04:00
Brad King
ee3ec27465 CMakeDetermineCompilerId: Set locale to C for vendor output match
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.
2020-03-12 10:07:29 -04:00
Brad King
2ca34f0685 Merge topic 'apple-clang-flags-c++17'
a67f2d00d8 Apple Clang: add flags for C++17 standard

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4468
2020-03-12 09:33:19 -04:00
Brad King
c852c0d138 Merge topic 'apple-clang-flags-c++17' into release-3.17
a67f2d00d8 Apple Clang: add flags for C++17 standard

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4468
2020-03-12 09:33:18 -04:00
Brad King
0683f2e9e4 Merge topic 'CMakeFindFrameworks-CMAKE_FRAMEWORK_PATH'
c841d43d70 CMakeFindFrameworks: Search CMAKE_FRAMEWORK_PATH

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4461
2020-03-12 08:24:22 -04:00
Brad King
c278b4eda9 Merge topic 'FindPython-ENV-CMAKE_FRAMEWORK_PATH' into release-3.17
1044776472 FindPython: Convert env CMAKE_FRAMEWORK_PATH to CMake path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Marc Chevrier <marc.chevrier@gmail.com>
Merge-request: !4462
2020-03-12 08:18:54 -04:00
Brad King
3a49ea6f25 Merge topic 'FindPython-ENV-CMAKE_FRAMEWORK_PATH'
1044776472 FindPython: Convert env CMAKE_FRAMEWORK_PATH to CMake path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Marc Chevrier <marc.chevrier@gmail.com>
Merge-request: !4462
2020-03-12 08:18:54 -04:00
Brad King
fffbafc607 Merge topic 'swift-rpath'
f481b3a947 Swift: repair RPATH handling for macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4456
2020-03-12 08:18:04 -04:00
Brad King
c5f850d145 Merge topic 'swift-rpath' into release-3.17
f481b3a947 Swift: repair RPATH handling for macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4456
2020-03-12 08:18:03 -04:00
Marc Chevrier
a67f2d00d8 Apple Clang: add flags for C++17 standard 2020-03-12 08:09:12 -04:00
Ryan Thornton
2ba8ac07ed GoogleTest: Fix CTest not failing if gtest_discover_tests fails
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.
2020-03-11 15:11:00 -05:00
Raul Tambre
f75bea1071 CUDA: Abstract language flag to compiler modules
Separate this detail out into compiler-specific modules.
Required for Clang support, as it uses slightly different language flags.
2020-03-11 21:30:09 +02:00