Commit Graph

11743 Commits

Author SHA1 Message Date
Brad King
c19b10883e Merge topic 'check_cxx_compiler_flag_no_normal_variable'
018d300ca0 Check*CompilerFlag: Do not set result as a normal variable too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6318
2021-07-08 07:49:31 -04:00
Robert Maynard
018d300ca0 Check*CompilerFlag: Do not set result as a normal variable too
This was previously fixed by commit d46590910c (Check*CompilerFlag: Do
not set result as a normal variable too, 2020-09-21, v3.18.3~1^2^2), but
was regressed by refactoring in commit 90dead024c (CheckCompilerFlag:
unified way to check compiler flags per language, 2020-09-25,
v3.19.0-rc1~88^2) due to the changes being developed concurrently.
Fix it again, and add a test case.

Fixes: #21207
2021-07-08 07:44:03 -04:00
Brad King
7b942e5068 Merge topic 'intel-oneapi-std-windows'
13961f3b43 Merge branch 'backport-3.20-intel-oneapi-std-windows'
5115dd1e2c IntelLLVM: Fix C/C++ standard level flags on Windows
84036d30d4 IntelLLVM: Fix C/C++ standard level flags on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6319
2021-07-08 07:36:57 -04:00
Brad King
84036d30d4 IntelLLVM: Fix C/C++ standard level flags on Windows
In commit a90d2a9eed (IntelLLVM: Add support for Intel LLVM-based
compilers, 2020-11-02, v3.20.0-rc1~89^2~20) we accidentally left out
activation of the C/C++ standard level selection logic when IntelLLVM is
targeting the MSVC ABI.

Fixes: #22388
2021-07-07 12:24:36 -04:00
Brad King
ed7b66561e Merge topic 'FindMPI-option-MPI_CXX_SKIP_MPICXX'
1a9ebd1694 FindMPI: Honor MPI_CXX_SKIP_MPICXX when set as a normal variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6315
2021-07-07 09:35:52 -04:00
Brad King
1eaef541cf Merge topic 'ifort_win32_log'
0602e35858 Intel/Fortran: Avoid recording warning 5117 lines in CMakeError.log

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6308
2021-07-07 09:34:48 -04:00
Brad King
d49b507bb6 Merge topic 'FindPkgConfig-pkgconf'
94a84dc0af FindPkgConfig: add pkgconf to the search list.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6301
2021-07-07 09:33:42 -04:00
Brad King
900617f977 Merge topic 'FindGLUT-pkg-config'
f90d15458a FindGLUT: Use pkg-config to find flags if available
f3f0401187 FindGLUT: Reduce if/else nesting and indentation
bece79f9be Tests: Add case covering FindGLUT variables and imported targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6251
2021-07-07 09:32:38 -04:00
Brad King
a1d0693175 Merge topic 'correct_cuda_toolkit_version_typo' into release-3.21
0d54276c82 Correct CUDAToolkit_VERSION_MINOR variable name typo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !6311
2021-07-07 09:29:06 -04:00
Brad King
8bfc96d5ed Merge topic 'correct_cuda_toolkit_version_typo'
0d54276c82 Correct CUDAToolkit_VERSION_MINOR variable name typo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !6311
2021-07-07 09:29:06 -04:00
Brad King
1a9ebd1694 FindMPI: Honor MPI_CXX_SKIP_MPICXX when set as a normal variable
Express the cache entry with `option()`.  In combination with policies
CMP0077 and CMP0102, this allows project code to control the switch with
a variable:

```
set(MPI_CXX_SKIP_MPICXX TRUE)
find_package(MPI COMPONENTS CXX)
```
2021-07-06 19:41:35 -04:00
Michael Hirsch
0602e35858 Intel/Fortran: Avoid recording warning 5117 lines in CMakeError.log 2021-07-06 14:03:14 -04:00
Robert Maynard
0d54276c82 Correct CUDAToolkit_VERSION_MINOR variable name typo 2021-07-06 08:43:13 -04:00
Christopher Degawa
f90d15458a FindGLUT: Use pkg-config to find flags if available
FindGLUT fails to properly link a static libglut as it does not list
the dependencies needed.

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
2021-07-02 13:33:18 -05:00
Christopher Degawa
f3f0401187 FindGLUT: Reduce if/else nesting and indentation
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
2021-07-02 13:33:18 -05:00
Alexander Neumann
94a84dc0af FindPkgConfig: add pkgconf to the search list. 2021-07-02 17:06:31 +02:00
Brad King
05c2108229 Merge topic 'FindCUDATookit-ordering'
d930145841 FindCUDATookit: Fix ordering of libraries in imported targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Merge-request: !6286
2021-07-02 08:10:23 -04:00
Brad King
a660f996d8 Merge topic 'compiler-id-msvc-no-lib'
e93245ec64 DetermineCompiler: Restore identification of MSVC with no INCLUDE or LIB

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6295
2021-07-02 08:05:53 -04:00
Brad King
e93245ec64 DetermineCompiler: Restore identification of MSVC with no INCLUDE or LIB
Update the change from commit c6aaaf066a (DetermineCompiler: Restore
identification of MSVC with no INCLUDE dirs, 2021-06-29,
v3.21.0-rc2~6^2) to also work with no `LIB` dirs.  Add the `-c` flag to
compile an object file without linking.
2021-07-01 13:04:16 -04:00
Dan Ibanez
d930145841 FindCUDATookit: Fix ordering of libraries in imported targets
Before this a downstream code linking to `CUDA::cusparse_static` and
`CUDA::curand_static` would get a link line with `libcusparse_static.a`,
then `libculibos.a`, then `libcurand_static.a`.  Use `IMPORTED_LOCATION`
to tell CMake about the proper dependency ordering where `libculibos.a`
comes last, because the other two libraries depend on `libculibos.a`.

Fixes: #22365
2021-07-01 12:18:27 -04:00
Chuck Atkins
8cce0ad32f FindMPI: Fix missing static warning in the mpi test source 2021-06-30 16:51:06 -04:00
Brad King
da79d6bdf6 Merge topic 'fujitsu-clang-findbinutils' into release-3.21
6ce97c2248 FujitsuClang: Change LTO option from -flto=thin to -flto
3a0effcd16 FujitsuClang: Set CMAKE_<LANG>_COMPILER_AR and CMAKE_<LANG>_COMPILER_RANLIB

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6281
2021-06-30 07:31:39 -04:00
Brad King
d4a0d59472 Merge topic 'fujitsu-clang-findbinutils'
6ce97c2248 FujitsuClang: Change LTO option from -flto=thin to -flto
3a0effcd16 FujitsuClang: Set CMAKE_<LANG>_COMPILER_AR and CMAKE_<LANG>_COMPILER_RANLIB

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6281
2021-06-30 07:31:39 -04:00
Brad King
e28c2ee9ae Merge topic 'rpm-suggests' into release-3.21
9b53eca317 CPack/RPM: Fix weak dep support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6274
2021-06-30 07:29:29 -04:00
Brad King
a63ae2f1b8 Merge topic 'rpm-suggests'
9b53eca317 CPack/RPM: Fix weak dep support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6274
2021-06-30 07:29:29 -04:00
Brad King
eb2ea3db8b Merge topic 'compiler-id-msvc-has-include'
c6aaaf066a DetermineCompiler: Restore identification of MSVC with no INCLUDE dirs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6284
2021-06-30 07:26:25 -04:00
Brad King
c6aaaf066a DetermineCompiler: Restore identification of MSVC with no INCLUDE dirs
Since commit bd844387df (ROCMClang: Add the ROCm toolkit derived clang
compiler to CMake, 2020-08-28, v3.21.0-rc1~66^2~6), our generated
compiler id source file contains a preprocessor condition of the form

    #elif ... && __has_include(...)

When MSVC is invoked with no include directories in the `INCLUDE`
environment variable or in `-I` flags, its implementation of
`__has_include` errors out immediately.  This breaks identification of
the compiler.

Work around the problem by adding a fallback attempt to compile the
identification source using a dummy include directory.
2021-06-29 12:55:35 -04:00
Alex Sweet
9b53eca317 CPack/RPM: Fix weak dep support
RPM 4.11.3 for el7 contains backported support for the RPM weak dep tags.
It only supports querying those tags, but rpmbuild can not make use of them.
Since CPack relies on rpmbuild --querytags to check for support, this
commit switches to rpm --suggests to check for support of weak
dependencies.

Fixes: #22350
2021-06-29 11:14:54 -04:00
Yuichiro Utsumi
6ce97c2248 FujitsuClang: Change LTO option from -flto=thin to -flto
Since -flto=thin is not supported officially in FujitsuClang,
change to -flto.
2021-06-29 09:31:53 -04:00
Yuichiro Utsumi
3a0effcd16 FujitsuClang: Set CMAKE_<LANG>_COMPILER_AR and CMAKE_<LANG>_COMPILER_RANLIB
Fixes: #22337
2021-06-29 09:31:53 -04:00
Brad King
c6223262a3 Merge topic 'Fortran-abi-f90'
97e2828d14 Fortran: Subsume F90 check into ABI check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6250
2021-06-28 09:23:45 -04:00
Brad King
5430379ee6 Merge topic 'yasm-no-deps' into release-3.21
f03d54bfc1 ASM_NASM: Do not generate depfiles with YASM

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6265
2021-06-28 09:19:06 -04:00
Brad King
78908c3527 Merge topic 'yasm-no-deps'
f03d54bfc1 ASM_NASM: Do not generate depfiles with YASM

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6265
2021-06-28 09:19:06 -04:00
Michael Hirsch
97e2828d14 Fortran: Subsume F90 check into ABI check
Follow the approach from commit 1d21dd0f7c (enable_language: Assume
compiler works if ABI detection compiles, 2020-05-25, v3.18.0-rc1~93^2)
to avoid a redundant check for F90 support.  Almost all maintained
Fortran compilers support F90 these days.

Fixes: #22222
2021-06-25 11:44:05 -04:00
Brad King
4a0e68266b Merge topic 'Help-UseJava-reorganization' into release-3.21
af9bd6c53f Help: UseJava reorganization

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6262
2021-06-25 07:24:46 -04:00
Brad King
d9ebfc844a Merge topic 'Help-UseJava-reorganization'
af9bd6c53f Help: UseJava reorganization

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6262
2021-06-25 07:24:46 -04:00
Brad King
fff5994e99 Merge topic 'fujitsu-ipo' into release-3.21
96e362fdc9 Fujitsu: Add IPO support for Fortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6261
2021-06-25 07:23:58 -04:00
Brad King
5840c3eab7 Merge topic 'fujitsu-ipo'
96e362fdc9 Fujitsu: Add IPO support for Fortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6261
2021-06-25 07:23:58 -04:00
Brad King
3e551ca51f Merge topic 'FindOpenMP-fujitsu'
b3bf33539b FindOpenMP: Link with OpenMP flags on Fujitsu

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6260
2021-06-25 07:22:55 -04:00
Gregor Jasny
f03d54bfc1 ASM_NASM: Do not generate depfiles with YASM
In 3aec26660a (Merge topic 'nasm_add_deps', 2021-03-03) the
ASM_NASM language enabled the generation of GCC compatible
depfiles for NASM. Unfortunatly, those are not supported by YASM.

Fixes: #22341
2021-06-25 12:28:02 +02:00
Marc Chevrier
af9bd6c53f Help: UseJava reorganization
Fixes: #22155
2021-06-24 11:04:01 -04:00
Eisuke Kawashima
b3bf33539b FindOpenMP: Link with OpenMP flags on Fujitsu
Fixes: #22332
2021-06-24 09:09:49 -04:00
Paul Zehner
96e362fdc9 Fujitsu: Add IPO support for Fortran 2021-06-24 09:02:15 -04:00
Brad King
7470ee3e05 Merge topic 'cuda-rules-override'
1d9009c27a CUDA: Implement CMAKE_USER_MAKE_RULES_OVERRIDE[_CUDA]

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6253
2021-06-23 08:55:27 -04:00
Seth R Johnson
1d9009c27a CUDA: Implement CMAKE_USER_MAKE_RULES_OVERRIDE[_CUDA]
This is implemented by other languages, and is documented for
all languages.  This was accidentally left out of CUDA.
2021-06-22 09:59:01 -04:00
Brad King
7d0018bd8e Merge topic 'ep-git-update-commit-ref'
360ff17dc6 ExternalProject: Use ${ref}^0 to avoid MSYS/Cygwin shell substitutions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6249
2021-06-21 10:03:37 -04:00
Brad King
b948b46668 Merge topic 'ep-git-update-commit-ref' into release-3.21
360ff17dc6 ExternalProject: Use ${ref}^0 to avoid MSYS/Cygwin shell substitutions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6249
2021-06-21 10:03:36 -04:00
Brad King
69b64ed85a Merge topic 'GNUInstallDirs-alpine'
37b24e0bed GNUInstallDirs: don't use lib64 on Alpine Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6244
2021-06-21 09:56:49 -04:00
Brad King
ed5bd39baa Merge topic 'GNUInstallDirs-alpine' into release-3.21
37b24e0bed GNUInstallDirs: don't use lib64 on Alpine Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6244
2021-06-21 09:56:48 -04:00
Brad King
a01a88dc95 Merge topic 'FindPkgConfig-PKG_CONFIG-args'
35d3e00e4e FindPkgConfig: split args if loaded from environment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6222
2021-06-21 09:53:51 -04:00