Commit Graph

11780 Commits

Author SHA1 Message Date
Brad King
23e87ae163 Merge topic 'findblaslapack-cray'
76487b04b1 Find{BLAS,LAPACK}: clean variables
fc54e68c05 Find{BLAS,LAPACK}: improve found message on Cray

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6348
2021-07-15 10:50:22 -04:00
Seth R Johnson
76487b04b1 Find{BLAS,LAPACK}: clean variables 2021-07-14 11:00:20 -04:00
Seth R Johnson
fc54e68c05 Find{BLAS,LAPACK}: improve found message on Cray
With Cray compiler wrappers (implicitly tested on OLCF Spock) the
BLAS and LAPACK libraries are automatically linked as necessary through
the wrapper script and programming environment. With this change, the
configure output is:
```
-- Found BLAS: implicitly linked
<snip>
-- Found LAPACK: implicitly linked
```
rather than
```
-- Found BLAS: 1
<snip>
-- Found LAPACK: LAPACK_LIBRARIES-PLACEHOLDER-FOR-EMPTY-LIBRARIES
```
2021-07-14 10:59:59 -04:00
Brad King
f166d32576 Merge topic 'armlink_armar_detection'
509ef50a06 ARMClang: Fix regression in check for working compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6346
2021-07-14 10:06:29 -04:00
Lingkai Dong
509ef50a06 ARMClang: Fix regression in check for working compiler
Given the compiler to use, `CMakeFindBinUtils.cmake` automatically
determines a number of tools including linker (CMAKE_LINKER) and archiver
(CMAKE_AR) and stores them in a generated file `CMakeCCompiler.cmake` as
non-CACHE entries. The compiler-specific ARMClang.cmake then tries to
override CMAKE_LINKER and CMAKE_AR as CACHE entries.

Following the introduction of CMP0126, which is set to NEW in the test
for a working compiler, setting a CACHE entry does not replace a normal
entry of the same name anymore, resulting in a failed test due to wrong
linker and archiver.

To fix this, set CMAKE_LINKER and CMAKE_AR for ARMClang directly in
`CMakeFindBinUtils.cmake` as is done for other compilers.  Check
for them in `ARMClang.cmake` to safeguard cases when a project explicitly
includes `ARMClang.cmake` prior to compiler determination (which some
projects do to work around other problems in older CMake versions).
2021-07-14 09:45:09 -04:00
Brad King
89039dfed8 Merge topic 'FindPkgConfig-LIBRARY_PATH'
36979f5b43 FindPkgConfig: Tolerate PKG_CONFIG_SYSTEM_LIBRARY_PATH in environment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6345
2021-07-14 09:28:39 -04:00
Brad King
36979f5b43 FindPkgConfig: Tolerate PKG_CONFIG_SYSTEM_LIBRARY_PATH in environment
Tell `pkg-config --libs` not to filter out `-L` flags for entries of
`PKG_CONFIG_SYSTEM_LIBRARY_PATH` (and `LIBRARY_PATH` for `pkgconf`).
We should always search everywhere the `.pc` file expects.

Fixes: #22148
2021-07-13 10:33:16 -04:00
Axel Huebl
d9fcbb06f2 FindMPI: Interrogate Cray compiler
Cray traditionally does not ship mpicc/mpic++ compiler wrappers.
Due to that, the traditional CMake logic to find MPI is to *only*
support MPI on Cray systems if either

1. Cray Wrappers are used for compiling, or
2. an auxiliary MPI executable is found.

On many new Exascale prototypes, using the Cray wrappers for develop
work is extremely painful. Vendors such as AMD and integrators such
as HPE seem not to go well in lock-step in Cray programming envs,
making offloading with Cray wrappers too challenging. On the other
hand, using the working experimental Vendor compilers works well,
as long as one does not need MPI.

Extend the fallback MPI search logic by also interrogating the
CC/cc/ftn binaries if found for their MPI flags. This does not
change existing logic, i.e. using the Cray wrappers directly, but
provides an additional way to get MPI programs compiled on Cray.

Fixes: #22368
2021-07-13 09:47:51 -04:00
Brad King
460e812369 Merge topic 'cpack-deb-lib-multiarch'
68b961d361 CPack/DEB: Add postinst/postrm ldconfig for multi-arch lib dirs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6341
2021-07-13 08:25:20 -04:00
Brad King
48abfe9976 Merge topic 'UseSWIG-dependencies-VS-generators'
d1bece92d5 UseSWIG: Use swig generated dependencies for Visual Studio

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6327
2021-07-13 08:22:28 -04:00
Brad King
27d248a784 Merge topic 'cpack-deb-post-ops' into release-3.21
805fa791d1 CPack/DEB: Avoid overriding user-provided `postinst` and `postrm`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6335
2021-07-13 08:16:26 -04:00
Brad King
ca85c6913d Merge topic 'cpack-deb-post-ops'
805fa791d1 CPack/DEB: Avoid overriding user-provided `postinst` and `postrm`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6335
2021-07-13 08:16:26 -04:00
Brad King
9b12ffc1e8 Merge topic 'FindBLAS-LAPACK-All'
31ac4b9165 ci: Verify that Intel MKL is found when it is the only BLAS/LAPACK
57dcde19da Find{BLAS,LAPACK}: Avoid clobbering results when no vendor is requested

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6336
2021-07-13 08:15:07 -04:00
Alex Turbov
68b961d361 CPack/DEB: Add postinst/postrm ldconfig for multi-arch lib dirs
Fixes: #22411
2021-07-12 17:10:02 -04:00
Alex Turbov
805fa791d1 CPack/DEB: Avoid overriding user-provided postinst and postrm
When a user provides `CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA` or
`CPACK_DEBIAN_<comp>_PACKAGE_CONTROL_EXTRA` variables in
`CMakeLists.txt` and the package contains dynamic libraries, the
`CPackDeb.cmake` sets `CPACK_ADD_LDCONFIG_CALL` to `1`.  Later it
analyzes if defaulted `postinst`/`postrm` should be generated trying to
check if the user provides any in `CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA`
variable. However, the `foreach` loop uses the invalid variable
`PACKAGE_CONTROL_EXTRA` instead, so these files gonna be overridden.
Fix the variable name.

Fixes: #22410
2021-07-12 17:04:29 -04:00
Brad King
57dcde19da Find{BLAS,LAPACK}: Avoid clobbering results when no vendor is requested
Logic added by commit 4c74c86f40 (FindBLAS/LAPACK: Add support for the
Fujitsu SSL2 library, 2021-01-27, v3.21.0-rc1~402^2~1) accidentally
expressed a boolean condition without proper grouping.  The pattern was
then copied by commit 2c9e623e31 (Find{BLAS,LAPACK}: Add support for the
NVHPC LAPACK library, 2021-05-05, v3.21.0-rc1~192^2).  The resulting
logic incorrectly tries Fujitsu and NVHPC vendors even after results are
found from another vendor, and then erases those.  Fix the grouping.

Fixes: #22403
2021-07-12 11:08:05 -04:00
Brad King
c9cd039e5f Merge topic 'LWYU-externalization'
14e57e9637 LINK_WHAT_YOU_USE feature: externalize configuration
9c5132a586 PGI: Fix "LINKER:" prefix generated separator
8a93de080c cmGeneratorTarget: Add method for LINKER: prefix translation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6306
2021-07-12 08:43:32 -04:00
Brad King
2d830247ba Merge topic 'cpack-rpm-requires-exclude-from'
bb5fc38209 CPack/RPM: Add option to set %global __requires_exclude_from

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6324
2021-07-12 08:42:03 -04:00
Brad King
79ca88ccd8 Merge topic 'FindJPEG-revert-turbo' into release-3.21
0de1f1503b FindJPEG: Revert "Search for 'turbojpeg' and 'turbojpeg-static' too"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6326
2021-07-12 08:32:18 -04:00
Brad King
ac9353f960 Merge topic 'FindJPEG-revert-turbo'
0de1f1503b FindJPEG: Revert "Search for 'turbojpeg' and 'turbojpeg-static' too"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6326
2021-07-12 08:32:18 -04:00
Marc Chevrier
d1bece92d5 UseSWIG: Use swig generated dependencies for Visual Studio 2021-07-09 17:31:20 +02:00
Marc Chevrier
14e57e9637 LINK_WHAT_YOU_USE feature: externalize configuration
Currently, this feature is only supported on ELF platforms. So, the property
LINK_WHAT_YOU_USE will be ignored for other plateforms.
Moreover, flags and commands are now controled by CMake variables.

Fixes: #20174
2021-07-09 14:50:50 +02:00
Marc Chevrier
9c5132a586 PGI: Fix "LINKER:" prefix generated separator
Fix a typo from commit 66ea1a3795 (LINK_OPTIONS: Add support of "LINKER:" prefix,
2018-04-30, v3.13.0-rc1~437^2).
2021-07-09 14:49:01 +02:00
Lisa Welsch
bb5fc38209 CPack/RPM: Add option to set %global __requires_exclude_from 2021-07-09 08:06:00 -04:00
Brad King
0de1f1503b FindJPEG: Revert "Search for 'turbojpeg' and 'turbojpeg-static' too"
Revert commit 74cc2e3326 (FindJPEG: Search for 'turbojpeg' and
'turbojpeg-static' too, 2021-01-09, v3.20.0-rc1~176^2) pending further
investigation.  The "turbo" variants are not drop-in replacements on all
platforms.

Fixes: #22333
2021-07-09 07:49:12 -04:00
Brad King
1ec39e9bd6 Merge topic 'iar-linker-placeholder'
bf810c75ac IAR: Use placeholders in linker and archiver rules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6322
2021-07-08 09:32:41 -04:00
Jean-Marc Hengen
bf810c75ac IAR: Use placeholders in linker and archiver rules
Update the IAR linker and archiver rules to use the `<CMAKE_LINKER>`
and `<CMAKE_AR>` placeholders instead of hard-coding the tool names.

Fixes: #22395
2021-07-08 08:08:52 -04:00
Brad King
dad3a178a4 Merge topic 'FindMPI-adjust-compile-definitions-early'
0c1b9b3516 FindMPI: Choose definitions for MPI_CXX_SKIP_MPICXX before first use

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6303
2021-07-08 07:57:28 -04:00
Brad King
fc0a74145d Merge topic 'cpack-nsis_update-languange-list'
9ce235fe5d CPack/NSIS: Update language list in template

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6310
2021-07-08 07:56:35 -04:00
Brad King
eb692af623 Merge topic 'FindCUDAToolkit-doc-version' into release-3.21
266fc8ada5 FindCUDAToolkit: Properly document the version support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6320
2021-07-08 07:53:52 -04:00
Brad King
1c6d09768f Merge topic 'FindCUDAToolkit-doc-version'
266fc8ada5 FindCUDAToolkit: Properly document the version support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6320
2021-07-08 07:53:52 -04:00
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
Brad King
ecd557cbd7 Merge topic 'check_cxx_compiler_flag_no_normal_variable' into release-3.21
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:30 -04:00
Brad King
01b40cfd4b Merge branch 'check_cxx_compiler_flag_no_normal_variable' into release-3.20
Merge-request: !6318
2021-07-08 07:46:41 -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
Robert Maynard
266fc8ada5 FindCUDAToolkit: Properly document the version support 2021-07-07 13:42:08 -04:00
Brad King
5115dd1e2c 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:25:38 -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
Marc Ruiz
9ce235fe5d CPack/NSIS: Update language list in template
Fixes: #22382
2021-07-07 11:59:49 -04:00
Ye Luo
0c1b9b3516 FindMPI: Choose definitions for MPI_CXX_SKIP_MPICXX before first use
Fixes: #22391
2021-07-07 09:51:01 -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