Commit Graph

12078 Commits

Author SHA1 Message Date
Brad King
908d2cd136 Merge topic 'gtest_discover_tests-PRE_TEST-dep'
1bf6d5979d gtest_discover_tests: Re-run PRE_TEST discovery on any arg change
715af43124 Tests: Fix and update wrongly named GoogleTest stdout file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6728
2021-11-17 08:44:29 -05:00
Craig Scott
1bf6d5979d gtest_discover_tests: Re-run PRE_TEST discovery on any arg change
Fixes: #22912
2021-11-16 09:45:26 -05:00
Brad King
d98b61c687 Merge topic 'clang_windows_thinlto'
3155b23260 Clang/Windows: Use ThinLTO if possible to match other platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6730
2021-11-16 09:06:10 -05:00
Brad King
3376f83889 Merge topic 'doc-gtest_discover_tests-filter'
1ef54f3163 Help: Clarify meaning of filter expression in gtest_discover_tests()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6727
2021-11-15 09:21:52 -05:00
Raul Tambre
3155b23260 Clang/Windows: Use ThinLTO if possible to match other platforms
Fixes #22905.
2021-11-14 15:05:25 +02:00
Craig Scott
1ef54f3163 Help: Clarify meaning of filter expression in gtest_discover_tests() 2021-11-14 16:49:23 +11:00
Brad King
180e14abc7 Merge topic 'IntelLLVM-Fortran-frontend-variant'
b1edd6e7c7 Fortran: Save frontend variant persistently for IntelLLVM

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6718
2021-11-12 08:58:58 -05:00
Brad King
c1fe4f68e4 Merge topic 'IntelLLVM-Fortran-frontend-variant' into release-3.22
b1edd6e7c7 Fortran: Save frontend variant persistently for IntelLLVM

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6718
2021-11-12 08:58:57 -05:00
Brad King
3ac8ea7696 Merge topic 'ti-armcl-unknown-arg-warning'
220f78e253 TI: Recognize invalid compiler option warning during try_compile()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6705
2021-11-12 08:55:14 -05:00
William R. Dieter
b1edd6e7c7 Fortran: Save frontend variant persistently for IntelLLVM
Since commit a90d2a9eed (IntelLLVM: Add support for Intel LLVM-based
compilers, 2020-11-02, v3.20.0-rc1~89^2~20), our IntelLLVM compiler
support populates `CMAKE_Fortran_COMPILER_FRONTEND_VARIANT`.  However,
the frontend variant was not stored in `CMakeCompilerFortran.cmake`.

Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2021-11-11 11:22:07 -05:00
Craig Scott
220f78e253 TI: Recognize invalid compiler option warning during try_compile()
Fixes: #22866
2021-11-11 10:53:31 -05:00
Brad King
1a0cd53994 Merge topic 'FindVulkan-pre-1.2.175'
db8bd5965f FindVulkan: Fix finding versions < 1.2.175

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6717
2021-11-11 10:48:26 -05:00
Brad King
79354bf7a4 Merge topic 'FindThreads-libc-pthread-flag'
68285bc8a9 FindThreads: Honor THREADS_PREFER_PTHREAD_FLAG when pthread is found in libc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !6693
2021-11-11 10:47:33 -05:00
Brad King
0712314f8e Merge topic 'IntelLLVM-no-xilink'
48f29b5805 IntelLLVM: Use MSVC linker with MSVC frontend variant

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6719
2021-11-11 10:45:20 -05:00
Brad King
e2ceaec991 Merge topic 'IntelLLVM-no-xilink' into release-3.22
48f29b5805 IntelLLVM: Use MSVC linker with MSVC frontend variant

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6719
2021-11-11 10:45:19 -05:00
William R. Dieter
48f29b5805 IntelLLVM: Use MSVC linker with MSVC frontend variant
The Intel compiler (pre-LLVM) expected xilink.exe and had special logic to
set xilink.exe.  The newer LLVM-based compiler does not want xilink.exe.
link.exe works better for host code, and is the default, so change
the matching condition such that the old compiler matches (and gets
xilink.exe) and the new compiler gets the default link.exe it expects.

A better solution will be to use the compiler as the linker.  A future
change will switch to compiler as linker by default, but that fix needs
more validation.

Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2021-11-10 13:41:06 -05:00
Ralf Habacker
db8bd5965f FindVulkan: Fix finding versions < 1.2.175 2021-11-10 16:11:46 +01:00
Mattias Ellert
68285bc8a9 FindThreads: Honor THREADS_PREFER_PTHREAD_FLAG when pthread is found in libc
The `-pthread` flag tells the compiler/linker to link to additional
libraries needed for thread support (e.g. libatomic on riscv64). The
flag therefore should be used if requested using
`THREADS_PREFER_PTHREAD_FLAG` also when the pthread functions are
found in libc.
2021-11-10 14:29:09 +01:00
Brad King
4fd2d62613 Merge topic 'cuda_clang_cmp0105'
4707ecbe6f CUDA: Support CMP0105 on Clang
15fde4c420 CUDA: Use local shorthands for variables in Clang device link code
cf7e68087d CUDA: Avoid unnecessary allocation and GetLinkLanguage()
5b0693411e CUDA: Ignore USE_WATCOM_QUOTE for device link rules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6709
2021-11-09 07:56:21 -05:00
Raul Tambre
4707ecbe6f CUDA: Support CMP0105 on Clang
Add link flags during the "device compile" step.

Enabled the relevant tests. The disable reasons regarding separable compilation
were outdated and the actual failure case was device link flags support.
2021-11-08 21:26:00 +02:00
Brad King
befcd6ea1d Merge topic 'cpack-drop-osxx11'
4ef974e6cb CPack: Remove undocumented deprecated OSXX11 generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6704
2021-11-08 12:40:00 -05:00
Brad King
c0e23058f6 Merge topic 'vs-framework-version'
d51246c662 VS: Default TargetFrameworkVersion to v4.7.2 for VS 2022
f97f8537f3 VS: Model a default target framework
e40cedddc0 cmVisualStudio10TargetGenerator: Refactor target framework selection
78782cc7dc cmGlobalVisualStudio8Generator: Refactor SetGeneratorPlatform

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6699
2021-11-08 12:38:48 -05:00
Brad King
2b9b64269f Merge topic 'vs-framework-version' into release-3.22
d51246c662 VS: Default TargetFrameworkVersion to v4.7.2 for VS 2022
f97f8537f3 VS: Model a default target framework
e40cedddc0 cmVisualStudio10TargetGenerator: Refactor target framework selection
78782cc7dc cmGlobalVisualStudio8Generator: Refactor SetGeneratorPlatform

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6699
2021-11-08 12:38:47 -05:00
Craig Scott
3ef926bb3a Merge topic 'doc-PKG_CONFIG_ARGN'
76c0281421 Help: Clarify how PKG_CONFIG env var initializes cache vars

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6706
2021-11-08 04:30:08 -05:00
Craig Scott
76c0281421 Help: Clarify how PKG_CONFIG env var initializes cache vars
Fixes: #22870
2021-11-07 16:09:42 +11:00
Brad King
f97f8537f3 VS: Model a default target framework
Add fields to the VS generator to select a target framework.
Migrate the existing default for VS 12 .NET CF for Windows CE.

Report the values in `CMAKE_VS_*` variables and use them for
the CSharp compiler id project too.

Issue: #22849
2021-11-06 06:08:54 -04:00
Brad King
4ef974e6cb CPack: Remove undocumented deprecated OSXX11 generator
This CPack generator was never documented, and has been deprecated since
commit 2ed00e8ef8 (CPack: Deprecate OSXX11 generator, 2020-01-31,
v3.17.0-rc1~45^2).

Issue: #20235
2021-11-05 12:39:22 -04:00
Brad King
b75ffd5ee0 Merge topic 'CheckLinkerFlag-policies'
58c8d649e1 CheckLinkerFlag: Set policies needed by the implementation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6701
2021-11-05 10:07:58 -04:00
Thomas Dickerson
58c8d649e1 CheckLinkerFlag: Set policies needed by the implementation
The module was added in CMake 3.18 by commit af96c0f4fa
(CheckLinkerFlag: Add module to check validity of linker flags,
2020-05-16, v3.18.0-rc1~103^2), but it is still possible for projects to
use it without setting policies to the 3.18 version level.
2021-11-04 14:01:09 -04:00
Brad King
e0bb15abfd Merge topic 'FindHDF5-avoid-duplicate-library-entries'
247f1149e1 FindHDF5: clear language-specific libraries list before discovery
f56963cf05 FindHDF5: clear library output variables at the top of the module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6698
2021-11-04 09:06:40 -04:00
Brad King
753d861a3b Merge topic 'FindHDF5-avoid-duplicate-library-entries' into release-3.22
247f1149e1 FindHDF5: clear language-specific libraries list before discovery
f56963cf05 FindHDF5: clear library output variables at the top of the module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6698
2021-11-04 09:06:39 -04:00
Brad King
52e1ff3315 Merge topic 'FindHDF5-fix-windows-hl-implib-query'
6f830c5c38 FindHDF5: fix variable name when querying `hdf5_hl`'s implib

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6697
2021-11-04 09:04:42 -04:00
Brad King
274e3fb7f4 Merge topic 'FindHDF5-fix-windows-hl-implib-query' into release-3.22
6f830c5c38 FindHDF5: fix variable name when querying `hdf5_hl`'s implib

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6697
2021-11-04 09:04:41 -04:00
Brad King
7456127e01 Merge topic 'GNUtoMS-vs2022' into release-3.22
571a795d2f GNUtoMS: Add search path for VS 2022 environment scripts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6695
2021-11-04 09:03:22 -04:00
Brad King
bbc9a27e5f Merge topic 'GNUtoMS-vs2022'
571a795d2f GNUtoMS: Add search path for VS 2022 environment scripts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6695
2021-11-04 09:03:22 -04:00
Ben Boeckel
247f1149e1 FindHDF5: clear language-specific libraries list before discovery 2021-11-03 13:24:30 -04:00
Ben Boeckel
f56963cf05 FindHDF5: clear library output variables at the top of the module
This avoids accumulation of `HDF5_LIBRARIES` results when calling
`find_package(HDF5)` multiple times within a single scope.
2021-11-03 13:05:18 -04:00
Ben Boeckel
6f830c5c38 FindHDF5: fix variable name when querying hdf5_hl's implib
Introduced in 4150048a3b (FindHDF5: unset some variables, 2017-07-24).
2021-11-03 11:29:20 -04:00
Brad King
98f0ee645f Merge topic 'nvhpc-isystem'
92624714c4 NVHPC: Support SYSTEM include directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6691
2021-11-03 10:37:55 -04:00
Brad King
28d63320f1 Merge topic 'nvhpc-isystem' into release-3.22
92624714c4 NVHPC: Support SYSTEM include directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6691
2021-11-03 10:37:54 -04:00
Brad King
571a795d2f GNUtoMS: Add search path for VS 2022 environment scripts
Extend the logic from commit 08c5b3eff0 (GNUtoMS: Add search path for VS
2019 environment scripts, 2020-01-09, v3.16.3~15^2) to consider VS 2022
paths too.

Fixes: #22847
2021-11-03 10:32:14 -04:00
Robert Maynard
92624714c4 NVHPC: Support SYSTEM include directories
Fixed #22834
2021-11-02 14:33:18 -04:00
Brad King
4e84a4763d Merge topic 'support_nvcc_native_flag'
14d8a2768d CUDA: Support nvcc 11.5 new -arch=all|all-major flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !6652
2021-11-02 08:55:13 -04:00
Brad King
d0e0d92882 Merge topic 'FindMPI-pkg-config'
56d949f05f FindMPI: Fix finding PkgConfg for fallback

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6685
2021-11-02 08:48:13 -04:00
Robert Maynard
14d8a2768d CUDA: Support nvcc 11.5 new -arch=all|all-major flags 2021-11-01 14:57:58 -04:00
Brad King
56d949f05f FindMPI: Fix finding PkgConfg for fallback
In commit 0723b2c935 (MPI: Add fallback detection code for MPI when cross
compiling, 2021-09-17, v3.22.0-rc1~89^2) the FindPkgConfig module was
included directly.  This produces warnings like:

    The package name passed to `find_package_handle_standard_args` (PkgConfig)
    does not match the name of the calling package (MPI).

Use `find_package(PkgConfig)` instead, as other find modules do.

Fixes: #22823
2021-11-01 08:09:15 -04:00
Brad King
3026d8468b Merge topic 'msvc-c17'
c5cc4ddac4 MSVC: Add support for C17
6561b032bc MSVC: Tolerate c_std_17 and c_std_23 features on older compiler versions
22f804e0ec MSVC: Refactor C compile features table for C90, C99, and C11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !6677
2021-10-29 08:52:18 -04:00
Brad King
c5cc4ddac4 MSVC: Add support for C17
C17 support has been available in MSVC since VS 16.8.

Fixes: #22816
2021-10-28 12:27:00 -04:00
Brad King
6561b032bc MSVC: Tolerate c_std_17 and c_std_23 features on older compiler versions
MSVC `cl` versions prior to 19.27 had no `-std:c*` flags for C
standards.  List the `c_std_{17,23}` features anyway.  This allows
projects to at least attempt compilation with these compilers since they
do not have any modes.
2021-10-28 12:27:00 -04:00
Brad King
22f804e0ec MSVC: Refactor C compile features table for C90, C99, and C11
The custom "no modes" `cmake_record_c_compile_features` implementation
should only be used in `cl` versions prior to 19.27 because they had no
`-std:c*` flags for C standards.  For 19.27 we need a different custom
implementation to account for partial C11 support.  For 19.28 and above
we can use the default implementation through the `*__HAS_FULL_SUPPORT`
settings.

We already use this pattern in the MSVC C++ compile feature table.
2021-10-28 12:27:00 -04:00