Commit Graph

10255 Commits

Author SHA1 Message Date
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
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
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
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
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
Bo Anderson
1044776472 FindPython: Convert env CMAKE_FRAMEWORK_PATH to CMake path 2020-03-11 13:35:33 -04:00
Bo Anderson
c841d43d70 CMakeFindFrameworks: Search CMAKE_FRAMEWORK_PATH 2020-03-11 12:54:26 -04:00
Brad King
dd45b7b429 Merge topic 'FindCUDAToolkit-reduce-verbosity' into release-3.17
a7cf574417 CUDAToolkit: Mark find queries as advanced variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4455
2020-03-11 08:56:40 -04:00
Brad King
c22c17eff0 Merge topic 'FindCUDAToolkit-reduce-verbosity'
a7cf574417 CUDAToolkit: Mark find queries as advanced variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4455
2020-03-11 08:56:40 -04:00
Saleem Abdulrasool
f481b3a947 Swift: repair RPATH handling for macOS
The configuration previously handled Linux properly but did not function
on macOS as `ld64` does not support `:` delimited paths.  Account for
that by setting it to the empty string which will use multiple
invocations of the `-Xlinker -rpath -Xlinker ...` pattern to compute the
correct RPATH.
2020-03-11 08:45:47 -04:00
Robert Maynard
a7cf574417 CUDAToolkit: Mark find queries as advanced variables
Fixes #20435
2020-03-10 13:27:16 -04:00
Brad King
c06e035601 Merge topic 'cuda_toolkit_dirs'
0703e5fb6f CUDA: Perform CUDA toolkit include directory detection only on nvcc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4443
2020-03-10 10:30:49 -04:00
Kyle Edwards
228232d454 Merge topic 'swift-ninja-multiconfig'
87819db28d Merge branch 'backport-swift-ninja-multiconfig' into swift-ninja-multiconfig
65b3848de0 Swift: support Ninja Multi-Config

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4440
2020-03-10 10:16:17 -04:00
Brad King
1ba7225480 Merge topic 'TI-C'
5a0fc68312 TI: Fix C toolchain command-lines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4422
2020-03-10 08:24:13 -04:00
Oliver Blasius
5a0fc68312 TI: Fix C toolchain command-lines
Fix `armar` arguments.  Fix the linker `--map_file=` argument.
Enable response files.
2020-03-09 12:02:20 -04:00
Brad King
bb9dc34800 Merge topic 'FindArmadillo-wrappers'
38c6dd7b19 FindArmadillo: Add support for non-wrapper case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4418
2020-03-09 09:13:40 -04:00
Kyle Edwards
87819db28d Merge branch 'backport-swift-ninja-multiconfig' into swift-ninja-multiconfig 2020-03-09 09:12:54 -04:00
Saleem Abdulrasool
65b3848de0 Swift: support Ninja Multi-Config
Enable support for multi-configuration builds using Ninja when building
Swift.
2020-03-09 09:11:22 -04:00
Raul Tambre
0703e5fb6f CUDA: Perform CUDA toolkit include directory detection only on nvcc
The code is specific to nvcc.
2020-03-08 18:58:56 +02:00
Ryan Birmingham
38c6dd7b19 FindArmadillo: Add support for non-wrapper case
Armadillo is typically built as a wrapper library, which is what this
find module has historically supported, but it does not have to be.
If not, then instead of armadillo itself, we need to link to some
combination of dependencies and not armadillo.
2020-03-06 11:29:21 -05:00
Brad King
995b122471 Merge topic 'FindPython-artifacts-scope'
e5b4c74238 FindPython: Add possibility to control scope of artifacts.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4426
2020-03-06 09:18:24 -05:00
Marc Chevrier
e5b4c74238 FindPython: Add possibility to control scope of artifacts.
Fixes: #20362
2020-03-05 16:44:48 +01:00
Brad King
fbe5caee8f Merge topic 'findx11-improvement'
77802aab97 FindX11: Find additional libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !4101
2020-03-05 07:22:39 -05:00
Zsolt Parragi
77802aab97 FindX11: Find additional libraries
With this change, FindLibrary(X11) learns about the following libraries:

 * xcb
 * X11-xcb
 * xcb-icccm
 * xcb-xkb
 * xkbcommon
 * xkbcommon-X11
2020-03-04 16:55:32 +01:00
Brad King
5bf1081962 Merge topic 'FindOpenAL-updates'
a67f0a4ac7 FindOpenAL: Move user-relevant comments into public documentation
cf0ce977de FindOpenAL: Minor implementation cleanup

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4414
2020-03-04 08:29:36 -05:00
Brad King
022a935f3a Merge topic 'msvc-librarian'
55196a1440 MSVC: Use 'lib' instead of 'link /lib' to create static libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4409
2020-03-04 08:28:01 -05:00
Brad King
95b151af90 Merge topic 'FindPython-manage-SOABI-suffix'
0c97b73bc0 FindPython: python_add_library can now manage SOABI suffix.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4420
2020-03-04 08:20:18 -05:00
Brad King
ab00435e79 Merge topic 'FindPython-manage-SOABI-suffix' into release-3.17
0c97b73bc0 FindPython: python_add_library can now manage SOABI suffix.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4420
2020-03-04 08:20:17 -05:00
Brad King
71633304c4 Merge topic 'llvm-rc-defines-not-flags'
ee70c5de4d llvm-rc: Forward DEFINES instead of FLAGS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4419
2020-03-04 08:19:30 -05:00
Nguyễn Gia Phong
a67f0a4ac7 FindOpenAL: Move user-relevant comments into public documentation
In particular, the role of frameworks in the search order can
help users trying to use the ``OPENALDIR`` environment variable.

Fixes: #20334
2020-03-03 09:30:34 -05:00
Nguyễn Gia Phong
cf0ce977de FindOpenAL: Minor implementation cleanup
Use modern FPHSA signature.  Indent search paths.
2020-03-03 09:25:20 -05:00
Francisco Facioni
55196a1440 MSVC: Use 'lib' instead of 'link /lib' to create static libraries
`link.exe /lib` is an undocumented flag and it just calls `lib.exe`.
Also `link.exe` doesn't parse the `/lib` option correctly when in a
response file.
2020-03-03 08:31:13 -05:00
Thomas Bernard
ee70c5de4d llvm-rc: Forward DEFINES instead of FLAGS
Since commit 1c2d031cbd (Add -E cmake_llvm_rc to preprocess files for
llvm-rc, 2020-01-14, v3.17.0-rc1~24^2) we pass the full target `<FLAGS>`
to the llvm-rc resource compiler, but we should pass only `<DEFINES>`.

Fixes: #20414
2020-03-03 08:12:25 -05:00
Marc Chevrier
0c97b73bc0 FindPython: python_add_library can now manage SOABI suffix.
Fixes: #20408
2020-03-03 13:13:48 +01:00
Brad King
f32d41d295 Merge topic 'CheckTypeSize-ppc64'
a09d646b7c CheckTypeSize: Fix '..._CODE' result for ppc and ppc64

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4413
2020-03-02 10:48:41 -05:00
Brad King
178a166ae1 Merge topic 'xl-fortran-module-dir-use'
92785ed746 Tests: Enable Fortran submodule tests on XL compilers
210b0b99a9 XL: Fix using Fortran modules from their output directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4405
2020-03-02 10:48:05 -05:00
Brad King
813b505c67 Merge topic 'CheckFortranSource-def'
1bc521416f CheckFortranSource*: Avoid passing -DVAR to linker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4406
2020-03-02 10:47:11 -05:00
Brad King
a09d646b7c CheckTypeSize: Fix '..._CODE' result for ppc and ppc64
Check for ppc64 macros before plain ppc.  Consider both upper and lower
case variants because some compilers have only one of them.

Fixes: #20368
2020-02-28 13:57:31 -05:00
Brad King
fb377ab5ef Merge topic 'FortranCInterface-cross-compile'
8e2683cf6d FortranCInterface: Fix broken search for test exe when cross-compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4404
2020-02-28 11:36:10 -05:00
Brad King
e46f579637 Merge topic 'q_namespace_export'
426941c433 Autogen: Recognize the new Q_NAMESPACE_EXPORT macro in AUTOMOC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4398
2020-02-28 11:14:34 -05:00
Brad King
15ac1f671b Merge topic 'q_namespace_export' into release-3.17
426941c433 Autogen: Recognize the new Q_NAMESPACE_EXPORT macro in AUTOMOC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4398
2020-02-28 11:14:33 -05:00
Brad King
1bc521416f CheckFortranSource*: Avoid passing -DVAR to linker
The test project is compiled with a `-DVAR` compiler flag where `VAR` is
the result variable.  Tell `try_compile` to add the flag through
`add_definitions` instead of `CMAKE_Fortran_FLAGS` so that it is not
used for linking.  Otherwise some Fortran compilers (e.g. XL 15) do not
like the flag when used to drive linking.
2020-02-28 10:57:45 -05:00
Brad King
210b0b99a9 XL: Fix using Fortran modules from their output directory
The XL Fortran compiler's `-qmoddir=` flag sets the module output
directory but does not add the directory to the search path for using
modules.  This is inconsistent with other compilers like the GNU Fortran
compiler's `-J` flag that does both.  In order to make these consistent,
add the module output directory with a `-I` flag on the XL Fortran
compiler so that it will be searched when using modules too.

This fixes our `FortranModules` test's coverage of submodules on
Ninja + XL.  That test places module files in a subdirectory that with
Ninja is not the current working directory when the compiler runs.

Fixes: #20400
2020-02-28 10:37:11 -05:00
Brad King
8e2683cf6d FortranCInterface: Fix broken search for test exe when cross-compiling
Previously the `find_program` call we used to locate the test executable
but that can be broken by `CMAKE_FIND_ROOT_PATH_MODE_PROGRAM`.  Instead
teach the test project to write a file with the location of the
executable it builds.  Load that file to get the exact location.

Fixes: #20390
2020-02-27 11:09:25 -05:00
Brad King
ac23cfdee7 Merge topic 'FindPython-cache-cleanup'
42c6a1bfee FindPython: Do not cache computed result variables
a7b4516e1a FindPython: Mark non-public cache entries INTERNAL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4393
2020-02-27 08:31:46 -05:00
Brad King
b766d2ca77 Merge topic 'FindPython-cache-cleanup' into release-3.17
42c6a1bfee FindPython: Do not cache computed result variables
a7b4516e1a FindPython: Mark non-public cache entries INTERNAL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4393
2020-02-27 08:31:45 -05:00