Commit Graph

12096 Commits

Author SHA1 Message Date
Brad King 1f8b4afbce Merge topic 'FindMatlab-r2021b'
a013404f43 FindMatlab: Add R2021b => 9.11 version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6556
2021-09-24 09:14:20 -04:00
Felipe Torrezan a9073db736 IAR: update language specification detection 2021-09-23 22:09:57 +02:00
Brad King 956160bb9a IRSL: Fix search for Windows redist files with Intel Classic compiler
The oneAPI icx/ifx compilers are under `.../windows/bin`.
The classic icl/ifort compilers are under `.../windows/bin/intel64`.
Add paths to the redist directory relative to both locations.

Fixes: #22673
2021-09-23 11:45:35 -04:00
Michael Hirsch a013404f43 FindMatlab: Add R2021b => 9.11 version
R2021b released 09/22/2021.
2021-09-23 10:41:20 -04:00
Brad King c5b91304ed Merge topic 'iar-asm-deduplication'
b1727b8a7e IAR: ASM module code deduplication

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6553
2021-09-23 10:36:27 -04:00
Felipe Torrezan b1727b8a7e IAR: ASM module code deduplication 2021-09-23 10:35:06 -04:00
Brad King 272d23579f Merge topic 'matlab_versions_natural_sort'
2f43ba5073 FindMatlab: Sort available Matlab versions using natural comparison.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6555
2021-09-23 10:32:27 -04:00
Brad King 2452067fb2 Merge topic 'iar-rl78-xlink'
8954f93543 IAR: emit fatal message for RL78 XLINK

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6552
2021-09-23 10:31:25 -04:00
Brad King 54188c0e8c Merge topic 'iar-riscv-binutils'
7c3684b356 IAR: fix assembler detection for RISC-V

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6551
2021-09-23 10:30:26 -04:00
Brad King 3f46b94e0a Merge topic 'IAR-executable-suffix'
9254e7ddf2 IAR: Use same executable suffix as try_compile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6546
2021-09-23 10:29:24 -04:00
Igor S. Gerasimov 88969b5167 FindBLAS: Update FlexiBLAS 2021-09-22 15:16:22 -04:00
Igor S. Gerasimov 21250d4dd2 FindBLAS: Update OpenBLAS 2021-09-22 15:16:22 -04:00
Igor S. Gerasimov 84b7e2e15d FindBLAS: Update FLAME 2021-09-22 15:16:22 -04:00
Igor S. Gerasimov bf048d2ddd FindBLAS: Update Generic BLAS 2021-09-22 15:16:22 -04:00
Igor S. Gerasimov c4d4f0708b FindBLAS: Move NVHPC from Generic BLAS 2021-09-22 15:16:22 -04:00
Igor S. Gerasimov 2531e464df FindLAPACK: Update Generic LAPACK 2021-09-22 15:16:22 -04:00
Igor S. Gerasimov 8fdbd272b5 FindLAPACK: Update FlexiBLAS 2021-09-22 15:16:22 -04:00
Igor S. Gerasimov 285c518937 FindLAPACK: Update OpenBLAS 2021-09-22 15:16:21 -04:00
Igor S. Gerasimov 9f52532757 FindLAPACK: Update NVHPC 2021-09-22 15:16:21 -04:00
Igor S. Gerasimov 7cb89314dd FindLAPACK: EML: LAPACK is in BLAS 2021-09-22 15:16:21 -04:00
Igor S. Gerasimov f17f20f6cd FindLAPACK: IBMESSL: LAPACK is in BLAS 2021-09-22 15:16:21 -04:00
Igor S. Gerasimov 8a859fd6ae FindLAPACK: Fujitsu_SSL2: LAPACK is in BLAS 2021-09-22 15:16:21 -04:00
Vincent Newsum 2f43ba5073 FindMatlab: Sort available Matlab versions using natural comparison.
On Windows, when FindMatlab.cmake searches the registry for installed Matlab versions, it sorts these versions alphabetically.
Since Matlab 2021a (version 9.10) came out this became a problem as now version 9.10 is placed after 9.1 instead of after a higher version less than 9.10.
The result is that FindMatlab doesn't return the highest version by default.
This fix uses the natural sort comparison which was introduced in CMake 3.18.
2021-09-22 09:43:56 +02:00
Brad King 4aeaf72fd6 Merge topic 'clang-manifest'
b73857561f Clang: embed windows manifests with GNU interface

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6534
2021-09-21 11:02:23 -04:00
Brad King bcdd8cfe44 Merge topic 'platform-vars'
a136b6ec98 MINGW: Define variable only when targeting Windows platforms
39c5dad0cb Ninja: Remove redundant check for GNU-like compiler on Windows
0b7ae84a96 Cygwin: Remove redundant definitions of CYGWIN and UNIX variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6538
2021-09-21 11:01:18 -04:00
Felipe Torrezan 8954f93543 IAR: emit fatal message for RL78 XLINK 2021-09-21 14:34:16 +02:00
Felipe Torrezan 7c3684b356 IAR: fix assembler detection for RISC-V 2021-09-21 11:45:22 +02:00
Rainer Keller 9254e7ddf2 IAR: Use same executable suffix as try_compile
There was a mismatch in the executable suffix between the compiler
detection and try_compile. This resulted in the generated executable
having a different suffix than what try_compile was looking for.

The IAR module is changed to use the same suffix as try_compile.

Fixes: #22567
2021-09-21 07:54:26 +02:00
Brad King 36966f63ca Merge topic 'hip-no-hipcc'
cb93f72624 HIP: Simplify detection of HIP runtime CMake package
a71f0fc9c7 HIP: Remove ROMClang compiler id and use Clang directly
b125e9809a HIP: Detect ROCm path earlier
735f41fc2d HIP: Use 'rocm_agent_enumerator' to determine CMAKE_HIP_ARCHITECTURES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Acked-by: Axel Huebl <axel.huebl@plasma.ninja>
Merge-request: !6533
2021-09-20 12:38:44 -04:00
Brad King bc0d6e61fd Merge topic 'hip-no-hipcc' into release-3.21
cb93f72624 HIP: Simplify detection of HIP runtime CMake package
a71f0fc9c7 HIP: Remove ROMClang compiler id and use Clang directly
b125e9809a HIP: Detect ROCm path earlier
735f41fc2d HIP: Use 'rocm_agent_enumerator' to determine CMAKE_HIP_ARCHITECTURES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Raul Tambre <raul@tambre.ee>
Acked-by: Axel Huebl <axel.huebl@plasma.ninja>
Merge-request: !6533
2021-09-20 12:38:43 -04:00
Helmut Grohne 0723b2c935 MPI: Add fallback detection code for MPI when cross compiling
The MPI libraries use a compiler wrapper to automatically inject
required flags and libraries into the compiler argument list. However,
the wrapper does not support cross-compiling: the wrapper will try to
invoke the native compiler which cannot handle the cross architecture
MPI libraries and fail.

This MR adds some fallback code for this case, which tries to bypass the
faulty wrapper and determine the necessary flags and libraries directly
from the MPI pkg-config files. The patch tries to be as unintrusive as
possible and should not break any existing use-cases.

Fixes: #22650
2021-09-17 18:55:02 +02:00
Brad King a136b6ec98 MINGW: Define variable only when targeting Windows platforms
The `MINGW` variable indicates that the compiler targets MinGW, a GNU
ABI on Windows.  Since commit aff3147917 (Modernize GNU compiler info on
Windows, 2009-12-02, v2.8.2~636), we load the `Platform/Windows-GNU`
module for compilers targetin MinGW, so set the variable there instead.
This is equivalent to `Platform/Windows-MSVC` setting the `MSVC`
variable.  Also remove `if(MINGW)` checks from the module, which have
not been necessary since the enclosed logic was moved to that module.

The undocumented `CMAKE_COMPILER_IS_MINGW` internal variable is now
unused, so remove it too.

Fixes: #22647
2021-09-17 12:17:35 -04:00
Brad King c23e8411e5 Merge topic 'android-PATH'
94f3776774 Android: Restore searching PATH for executables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6528
2021-09-17 09:33:45 -04:00
Brad King 1127b591ec Merge topic 'android-PATH' into release-3.21
94f3776774 Android: Restore searching PATH for executables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6528
2021-09-17 09:33:44 -04:00
Brad King dfb31d3a3f Merge topic 'iar-enable-in-list-operator'
f77ffbc0e3 IAR: Restore support for projects not enabling policy CMP0057

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6527
2021-09-17 09:32:50 -04:00
Thomas Bernard b73857561f Clang: embed windows manifests with GNU interface
Solves: #22611
2021-09-17 00:35:32 +02:00
Brad King cb93f72624 HIP: Simplify detection of HIP runtime CMake package
It only makes sense to use the CMake package from the same ROCm
installation that the compiler uses.  Ask the HIP compiler to report the
location of the ROCm installation.  Verify up front that it contains the
expected CMake package file.
2021-09-16 15:33:53 -04:00
Brad King a71f0fc9c7 HIP: Remove ROMClang compiler id and use Clang directly
Since commit bd844387df (ROCMClang: Add the ROCm toolkit derived clang
compiler to CMake, 2020-08-28, v3.21.0-rc1~66^2~6) and commit ff0d2858e1
(HIP: Extract clang compiler details from hipcc, 2020-10-21,
v3.21.0-rc1~66^2~5), the separate `ROCMClang` compiler id for `hipcc`
has caused a few problems:

* The compiler id changed from behavior of CMake 3.20 and below,
  breaking projects that already built with `hipcc` treated as `Clang`.

* The implementation of `target_compile_features` was incomplete for
  the `ROCMClang` identity.

* Only `hipcc` was identified as `ROCMClang`, so after it is unwrapped
  to the underlying `clang++`, future runs of new CMake versions on
  an existing build tree would not repeat this.

* Clang should be usable as a HIP compiler without the `hipcc` wrapper.

Remove the `ROMClang` compiler identity, and revise HIP language support
to work directly with a Clang compiler.

Reject direct `hipcc` usage as a HIP compiler.  For now it cannot be
supported because it interferes with flags CMake needs to pass to Clang.

Fixes: #22536, #22460, #22593
2021-09-16 15:33:47 -04:00
Brad King b125e9809a HIP: Detect ROCm path earlier
Fail early if it is not found.

Use the detected location as a hint to find `rocm_agent_enumerator`.

Also remove the leading `_` prefix in case we want to document this
publicly later.
2021-09-16 14:45:07 -04:00
Zack Galbreath 735f41fc2d HIP: Use 'rocm_agent_enumerator' to determine CMAKE_HIP_ARCHITECTURES 2021-09-16 14:41:30 -04:00
Brad King 0b7ae84a96 Cygwin: Remove redundant definitions of CYGWIN and UNIX variables
These are set by modules loaded for `CMAKE_SYSTEM_NAME`.  We do not
need to set them again if the compiler defines `__CYGWIN__`.

Also remove the now-unused undocumented `CMAKE_COMPILER_IS_CYGWIN`
internal variable.
2021-09-16 09:55:26 -04:00
hhb 94f3776774 Android: Restore searching PATH for executables
Since commit a7f41a7ee4 (Android: Fix find_* search order within NDK for
unified toolchains, 2020-10-13, v3.20.0-rc1~610^2), we turn off
`CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH`.  This breaks `find_program`
searching `PATH` for host executables.  Fortunately, the setting turns
out not to be necessary, perhaps since commit cbc51a8be3 (Android:
restructure android search paths, 2020-11-06, v3.20.0-rc1~509^2).
Without it, none of NDK tests fail, so remove it to restore pre-3.20
behavior.

Fixes: #22634
2021-09-16 08:45:33 -04:00
Jean-Marc Hengen f77ffbc0e3 IAR: Restore support for projects not enabling policy CMP0057
Since commit 5b9bfe738c (IAR: Moved search logic to BinUtils.,
2021-07-19, v3.21.1~14^2), we use the `IN_LIST` operator in the
`CMakeFindBinUtils` module.  Set policy `CMP0057` to ensure it is
available regardless of the project's policy settings.

Fixes: #22640
2021-09-16 08:30:51 -04:00
Brad King 1375862764 Merge topic 'cpack-nsis-apps-n-features'
eb3b3bacdc CPack/NSIS: Fix uninstall on Windows using "Apps & Features"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6517
2021-09-15 10:18:55 -04:00
Robert Maynard 51fd21736b FindFLTK: Safe to include multiple times
FindFLTK could store multiple entries in `FLTK_INCLUDE_DIR`,
and when re-executed would stored into `FLTK_DIR` which had
uses which presumed single entries.

Fixes #13198
2021-09-14 11:10:28 -04:00
Andras Lasso eb3b3bacdc CPack/NSIS: Fix uninstall on Windows using "Apps & Features"
According to NSIS documentation [1], uninstaller executable path in
UninstallString must always be quoted.  Quote the uninstall executable
in `NSIS.template.in` so that it works when the path has spaces.

[1] https://nsis.sourceforge.io/Add_uninstall_information_to_Add/Remove_Programs
2021-09-14 09:52:19 -04:00
Brad King 8f67d42671 Merge topic 'find-matlab-imported-targets'
161990b921 FindMatlab: Add imported targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6488
2021-09-14 09:42:50 -04:00
Brad King fdeb9e0751 Merge topic 'GNUInstallDirs_become_conda_install_aware'
ecaca8c129 GNUInstallDirs now aware of conda lib directory requirements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Silvio Traversaro <pegua1@gmail.com>
Merge-request: !6512
2021-09-14 09:41:19 -04:00
Brad King 085719d4d8 Merge topic 'iwyu-cl'
ccfe1b0b40 IWYU: Add `--driver-mode=cl` when applicable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6511
2021-09-14 09:36:13 -04:00
Brad King 2a8d9bf4cc Merge topic 'CMakeDependentOption-condition-syntax'
059b90a0b4 CMakeDependentOption: Introduce policy CMP0127 for full Condition Syntax

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6493
2021-09-14 09:35:07 -04:00