Commit Graph

12415 Commits

Author SHA1 Message Date
Brad King
c267ed205a CUDA: Defer architecture testing to the compiler testing step
Verifying the architectures during compiler identification is redundant,
and requires a lot more up-front information than we should need.
It also causes unsupported architectures to break the compiler id and
version detection, so the resulting output from CMake does not report
the compiler version, which is useful information to know why the
specified architectures are not supported.

The "detecting compiler ABI info" and "check for working compiler" steps
already pass `CMAKE_CUDA_ARCHITECTURES` into their test projects.
Therefore we can just drop the earlier architecture testing.  Bad
architectures will be reported as a not-working compiler, and the
output will include the compiler's error message.

This reverts the approach from:

* commit 19cc5bc296 (CUDA: Throw error if user-specified architectures
                     don't work, 2020-05-26, v3.18.0-rc1~79^2)
* commit 650c1029a0 (CUDA: Detect non-working user-specified architectures
                     on NVCC, 2020-05-28, v3.18.0-rc1~51^2)
* commit 01428c5560 (CUDA: Fail fast if CMAKE_CUDA_ARCHITECTURES
                     doesn't work during detection,
                     2020-08-29, v3.19.0-rc1~241^2).

Their goal was in part to avoid waiting until the test for working
compiler to detect unsupported architectures.  However, experience has
shown that failing earlier is more trouble than it's worth.

Fixes: #23161
Issue: #20756
2022-04-25 15:01:36 -04:00
Brad King
b48e348b66 Merge topic 'FindICU-show-found-libs'
c3c7e6d609 FindICU: Show location of found libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7193
2022-04-22 09:11:42 -04:00
Brad King
bd8acc3a1b Merge topic 'clang-cl-asm-msvc-runtime'
b41fab9285 Clang: populate MSVC runtime library abstraction table

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7048
2022-04-22 09:01:35 -04:00
Brad King
1bd85e8f3f Merge topic 'NO_CMAKE_INSTALL_PREFIX'
42f7e39789 Find: Support per call disabling of CMAKE_INSTALL_PREFIX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7163
2022-04-22 08:59:09 -04:00
Brad King
417de67afd Merge topic 'CheckCompilerFlags-revert-linker-warnings'
4941887d7d CheckCompilerFlags: Revert "Catch linker warning about ignored flags"
c2341ece47 CheckLinkerFlag: Catch linker warning when the checked flag is ignored

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7190
2022-04-22 08:55:57 -04:00
Don Olmstead
c3c7e6d609 FindICU: Show location of found libraries
Announce locations of the libraries without the use of `ICU_DEBUG`.
2022-04-21 12:54:02 -04:00
Brad King
0473d714de Merge topic 'FindPython-pypy-v7.3.9-support'
5440eafaae FindPython: Add support for pypy v7.3.9 and uppers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7189
2022-04-21 11:50:28 -04:00
Brad King
4941887d7d CheckCompilerFlags: Revert "Catch linker warning about ignored flags"
Revert commit f745e0497e (CheckCompilerFlags: Catch linker warning about
ignored flags, 2022-01-03, v3.23.0-rc1~174^2).  It regressed cases where
incidental linker warnings were previously tolerated.  Revert the change
pending further investigation.

Fixes: #23432
Issue: #22961
2022-04-21 11:36:21 -04:00
Brad King
c2341ece47 CheckLinkerFlag: Catch linker warning when the checked flag is ignored
Prior to commit 219dde4ea8 (CheckPIESupported: now uses any SYSROOT settings,
2022-01-16, v3.23.0-rc1~110^2), the checks for `-pie` and `-no_pie` on macOS
failed due to executing the compiler directly without any `-isysroot`,
producing `ld: library not found for -lc++`.  See issues #23053 and #19180.
The failing check for `-pie` was a bug because it is supported on macOS,
both for `x86_64` and `arm64`, and the commit fixed that check.

However, `-no_pie` is not supported on macOS `arm64`.  The above commit was
only able to detect that due to commit f745e0497e (CheckCompilerFlags: Catch
linker warning about ignored flags, 2022-01-03, v3.23.0-rc1~174^2), which we
need to revert due to issue #23432.  Instead, catch only the linker warning
about the exact flag being checked.
2022-04-21 11:35:30 -04:00
Marc Chevrier
5440eafaae FindPython: Add support for pypy v7.3.9 and uppers
Library name versioning has changed.

Fixes: #23439
2022-04-20 15:29:50 +02:00
Saleem Abdulrasool
b41fab9285 Clang: populate MSVC runtime library abstraction table
!3211 overlooked populating the runtime library selection flags for
clang-cl in MSVC compatibility mode.  There is no flag that needs to be
passed, but the value is expected to be available by the generators.  We
simply provide the empty string to appease the generators without
emitting any additional flags.

Fixes: #23048
2022-04-17 21:13:44 -07:00
Robert Maynard
42f7e39789 Find: Support per call disabling of CMAKE_INSTALL_PREFIX
Fixes #23359
2022-04-15 09:33:55 -04:00
Brad King
b760828d3f CPack/DMG: Do not use CPACK_RESOURCE_FILE_LICENSE for SLA by default
Since macOS 12.0 deprecated the tools needed to attach a SLA to a
`.dmg`, we should no longer do this by default.  Add a policy to
change the default to off.

Fixes: #22978
2022-04-14 10:14:58 -04:00
Brad King
3ca187ad3d Merge topic 'FindGit-no-easygit'
b656a3fa16 FindGit: remove EasyGit

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7169
2022-04-14 09:25:21 -04:00
Brad King
359d7c19e5 Merge topic 'FindwxWidgets-mingw'
6fac8af9ca FindwxWidgets: set wxWidgets_FIND_STYLE to unix on MINGW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7162
2022-04-12 08:21:37 -04:00
Brad King
1b9630782a Merge topic 'FindGLUT-freeglut'
2c45465ffb FindGLUT: Search for freeglut as well using PkgConfig.
804ce3ee42 FindGLUT: Search for "freeglut" first On Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7161
2022-04-12 08:21:01 -04:00
Brad King
bd59d50ecb Merge topic 'doc-CheckPIESupported'
91c859d1e5 CheckPIESupported: Prevent separate output lines running together
ab5455aa79 Help: Correct/add missing details for CheckPIESupported

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7157
2022-04-12 08:18:10 -04:00
Brad King
8fd65bef7d Merge topic 'doc-CheckPIESupported' into release-3.23
91c859d1e5 CheckPIESupported: Prevent separate output lines running together
ab5455aa79 Help: Correct/add missing details for CheckPIESupported

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7157
2022-04-12 08:18:09 -04:00
Brad King
7a1c6fd3e6 Merge topic 'FindPostgreSQL-14'
23671318f3 FindPostgreSQL: add support for PostgreSQL 14

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7158
2022-04-12 08:17:16 -04:00
Michael Hirsch
b656a3fa16 FindGit: remove EasyGit
Blame shows EasyGit was part of initial FindGit 11 years ago.
I can hardly find Easy Git as a package. Given that Git is vital
for many complex CMake projects, it seems good to ensure CMake
FindGit is finding a Git program likely to work.

Crucial CMake modules like FetchContent also use FindGit, emphasizing
the importance of having a Git executable with proper functionality.
2022-04-11 14:08:01 -04:00
Craig Scott
91c859d1e5 CheckPIESupported: Prevent separate output lines running together 2022-04-11 09:06:37 -04:00
Craig Scott
ab5455aa79 Help: Correct/add missing details for CheckPIESupported 2022-04-11 09:06:37 -04:00
Even Rouault
23671318f3 FindPostgreSQL: add support for PostgreSQL 14 2022-04-11 09:00:18 -04:00
Brad King
c362d02e74 Merge topic 'check-flag-fembed-bitcode-conflict'
a10fc754a6 CheckSourceCompiles: Avoid linker warning with -fembed-bitcode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7156
2022-04-11 08:50:58 -04:00
Mehdi Chinoune
6fac8af9ca FindwxWidgets: set wxWidgets_FIND_STYLE to unix on MINGW
The MinGW variant has wx-config which make it easier to find.
2022-04-11 06:23:50 +01:00
Mehdi Chinoune
2c45465ffb FindGLUT: Search for freeglut as well using PkgConfig. 2022-04-11 06:03:10 +01:00
Mehdi Chinoune
804ce3ee42 FindGLUT: Search for "freeglut" first On Windows 2022-04-11 06:02:35 +01:00
Craig Scott
a10fc754a6 CheckSourceCompiles: Avoid linker warning with -fembed-bitcode
When the Apple linker sees -headerpad_max_install_names and
bitcode is enabled with a flag like -fembed-bitcode, it issues a warning
and ignores the -headerpad_max_install_names flag. This causes
unrelated compiler and linker flag checks to fail for valid flags.
In f745e0497e (CheckCompilerFlags: Catch linker warning about ignored
flags, 2022-01-03), we started detecting linker warnings, which caused
a regression for projects that were setting -fembed-bitcode in their
CMAKE_CXX_FLAGS or similar. Prevent that regression by removing
the -headerpad_max_install_names linker flag when we know it will
warn and be ignored anyway.

Fixes: #23390
Issue: #23408
2022-04-09 21:51:09 +10:00
Brad King
9cb77a6294 Merge topic 'CheckCompilerFlag-restore-env'
9dd585d12c CheckCompilerFlag: Fix regression in locale environment preservation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7153
2022-04-08 08:58:30 -04:00
Brad King
9dd585d12c CheckCompilerFlag: Fix regression in locale environment preservation
Fix a typo from commit 660e0d80ae (internal/CheckCompilerFlag: rely on
common configuration, 2022-01-12, v3.23.0-rc1~124^2~1) that caused
locale environment variables to not be restored after they are set
during the check.
2022-04-07 15:07:48 -04:00
Brad King
c8f912fa59 Merge topic 'FindJNI-targets'
00c4f488f2 FindJNI: support Android NDK
171d45c039 FindJNI: added components and imported targets
35e92ec619 FindJNI: improved description

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !7069
2022-04-07 09:11:56 -04:00
Brad King
c508935dad Merge topic 'adsp-platform-and-compilers'
87142bbd5f ADSP: Add dedicated platform module
e9eabb0dcd ADSP: Configure compiler in compiler module
88b38f531a ADSP: Support both VDSP++ and CCES for ADSP compilers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7123
2022-04-06 12:04:43 -04:00
Sergiu Deitsch
00c4f488f2 FindJNI: support Android NDK 2022-04-05 23:56:28 +02:00
Silvio
178cf34bdc FindMatlab: Add NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES option to matlab_add_mex 2022-04-05 08:27:09 -04:00
Sergiu Deitsch
171d45c039 FindJNI: added components and imported targets 2022-04-04 19:46:32 +02:00
Sergiu Deitsch
35e92ec619 FindJNI: improved description 2022-04-04 19:46:32 +02:00
Chris Wright
87142bbd5f ADSP: Add dedicated platform module 2022-04-04 17:05:09 +01:00
Chris Wright
e9eabb0dcd ADSP: Configure compiler in compiler module 2022-04-04 16:56:47 +01:00
Chris Wright
88b38f531a ADSP: Support both VDSP++ and CCES for ADSP compilers 2022-04-04 16:56:47 +01:00
Brad King
63d5c8a3a8 Merge topic 'quiet_pkg-config'
99f7d1973c FindGSL: Quiet pkg-config errors
655582e931 FindLAPACK: Quiet pkg-config errors
6dab35e25d FindBLAS: Quiet pkg-config errors
b2a7f73b55 FindGLUT: Quiet pkg-config errors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7128
2022-03-31 08:53:01 -04:00
Brad King
ad3c50e0b4 Merge topic 'GNUInstallDirs-revert-multiarch-prefixes'
624ec3692f GNUInstallDirs: Revert "Apply Debian multiarch LIBDIR to more prefixes"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7127
2022-03-31 08:50:25 -04:00
Brad King
99fc8f152c Merge topic 'GNUInstallDirs-revert-multiarch-prefixes' into release-3.23
624ec3692f GNUInstallDirs: Revert "Apply Debian multiarch LIBDIR to more prefixes"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7127
2022-03-31 08:50:24 -04:00
Brad King
2657454b59 Merge topic 'CMakeDependentOption-doc-improvement'
7a614977f9 CMakeDependentOption: improve documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Rui Oliveira <ruimail24@gmail.com>
Merge-request: !7124
2022-03-31 08:46:29 -04:00
Ben Boeckel
7a614977f9 CMakeDependentOption: improve documentation
This makes it far clearer that `<depends>` is a list up front instead of
burying the lede because a list is generally "trivially true" in CMake[1].
Also clarify that `<force>` is only available as a local variable and if
queried outside of the "scope" of the `cmake_dependent_option` call,
will get the stored user cache value.

[1] The exception being when the last entry ends in `-NOTFOUND`.

Suggested-by: Rui Oliveira
2022-03-30 16:05:37 -04:00
nega
99f7d1973c FindGSL: Quiet pkg-config errors
Issue: #23314
2022-03-30 16:01:59 -04:00
nega
655582e931 FindLAPACK: Quiet pkg-config errors
Issue: #23314
2022-03-30 16:01:56 -04:00
nega
6dab35e25d FindBLAS: Quiet pkg-config errors
Issue: #23314
2022-03-30 16:01:49 -04:00
nega
b2a7f73b55 FindGLUT: Quiet pkg-config errors
Issue: #23314
2022-03-30 15:59:31 -04:00
Brad King
624ec3692f GNUInstallDirs: Revert "Apply Debian multiarch LIBDIR to more prefixes"
Revert commit dd9584b352 (GNUInstallDirs: Apply Debian multiarch LIBDIR
to more prefixes, 2021-11-19, v3.23.0-rc1~323^2).  There are separate
problems with activating multiarch `LIBDIR` for each prefix it added:

* Prefix `/` is often used to stage an installation with `DESTDIR`
  for inclusion in a tarball package or similar.

* Prefix `/usr/local` is the default `CMAKE_INSTALL_PREFIX`, causing
  the multiarch `LIBDIR` to be cached after the first configuration,
  even if the prefix changes later.

Revert the change for now, except for the documentation update.
Further discussion will be needed to select a way to enable
multiarch `LIBDIR` for `/` and `/usr/local`.

Fixes: #23365
Issue: #19698
2022-03-30 11:51:01 -04:00
Brad King
1e23384580 Merge topic 'FindHDF5-library'
e4e309f165 FindHDF5: Add explicit library location instead of guessed library name.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !7105
2022-03-30 09:04:26 -04:00