12319 Commits

Author SHA1 Message Date
Brad King
05a5d351f4 Merge branch 'FindLAPACK-nvhpc' into release-3.23
Merge-request: !7452
2022-07-07 09:01:20 -04:00
Eisuke Kawashima
28d52a43fc FindLAPACK: Add '-fortranlibs' flag only with NVHPC/PGI compilers
Since commit 2c9e623e31 (Find{BLAS,LAPACK}: Add support for the NVHPC
LAPACK library, 2021-05-05, v3.21.0-rc1~192^2) we try the `-fortranlibs`
option as a dependency of the NVHPC LAPACK.  That flag is specific to
the NVHPC/PGI compilers, so use it conditionally with them.

Without this modification, CMake fails to find LAPACK if

- compiler ID is GNU
- `BLA_STATIC` is `ON`
- `BLA_VENDOR` is not defined or set to `All`

Fixes: #23705, #22878
2022-07-06 13:58:47 -04:00
Igor Molchanov
57da7a4925 LCC: link with -lgfortran instead of -llfortran since 1.26.03
Since LCC 1.26.03, compiler developers decided to rename
liblfortran to libgfortran (internal reference: mcstbug#131633),
and despite it's stated that "-llfortran will be automatically
treated as -lgfortran", it actually does not work (and there's
even no symlinks like liblfortran.* -> libgfortran.*); so we
have to explicitly choose which library we have to link in.

Fixes: #23646
2022-06-27 13:02:53 -04:00
Brad King
5022b42f8b ExternalProject: Fix regression in stamp creation for Xcode+iOS
The change to `_ep_add_mkdir_command` in commit 5fbac2bb24
(ExternalProject: Move inline scripts to separate files, 2022-01-22,
v3.23.0-rc1~101^2) did not account for the possibility that
`CMAKE_CFG_INTDIR` is `$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)`
instead of just the configuration name.  Pass the value into the helper
script on the command line so that the native buildsystem placeholders
are evaluated.

Fixes: #23645
2022-06-21 18:27:44 -04:00
Brad King
65f2e9263c Merge branch 'xcode-14' into release-3.23
Merge-request: !7350
2022-06-11 05:37:53 -04:00
Brad King
ab40020b17 Xcode: Suppress "Run Script" build phase warning during compiler id
warning: Run script build phase 'Run Script' will be run during every
    build because it does not specify any outputs.
2022-06-10 14:24:03 -04:00
Brad King
89e1113e0c Xcode: Use ad-hoc signing during compiler id on macOS
Xcode 14 no longer accepts an empty signing identity for macOS.
However, Xcode in general does not accept an ad-hoc signing
identity for iOS.  Switch based on the target platform.

Fixes: #23609
2022-06-10 14:22:40 -04:00
Alex Turbov
066ff258db CPack/NuGet: Restore component packaging on Windows
The change from `\` to `/` in commit dade75509f (CPack/NuGet: Fix nuspec
file generation for UNIX-style OS, 2020-12-21, v3.20.0-rc1~243^2) does
not work on Windows.  Use `cmake_path` to form a path to an image
directory with preinstalled files.

Fixes: #22489
2022-05-18 11:12:02 -04:00
Brad King
23a52561c7 Clang: Use -imsvc flag without space to support Clang tools
Since commit bb61c2d024 (Clang: use -imsvc for system include dirs when
running on Windows, 2020-09-16, v3.19.0-rc1~162^2) we use the `-imsvc`
flag followed by the include directory as a separate argument.  Some
versions of `clang-tidy` do not support the flag unless the include
directory is attached to it, so use that form instead.

A similar fix was made by commit 3a8b6653dc (MSVC: Use -external:I flag
without space to support Clang tools, 2022-01-11, v3.22.2~8^2).

Fixes: #23517
2022-05-17 11:09:15 -04:00
Brad King
e05a476700 Merge topic 'FortranCInterface-gcc12' into release-3.23
cb616d43d6 FortranCInterface: Fix failure with gfortran 12 and Clang

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7266
2022-05-17 08:47:30 -04:00
Brad King
cb616d43d6 FortranCInterface: Fix failure with gfortran 12 and Clang
The C flags added by commit 6a0ce19ce1 (FortranCInterface: Fix
compatibility with GCC gfortran 12 LTO, 2022-01-19, v3.22.2~5^2)
should only be added for the GNU C compiler.

Fixes: #23500
Issue: #23123
2022-05-16 11:18:00 -04:00
Brad King
165208c784 Merge topic 'FindPkgConfig-LIBRARY_PATH' into release-3.23
11c8da94d4 FindPkgConfig: Fix preservation of ENV{PKG_CONFIG_ALLOW_SYSTEM_LIBS}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7258
2022-05-13 08:42:48 -04:00
Brad King
11c8da94d4 FindPkgConfig: Fix preservation of ENV{PKG_CONFIG_ALLOW_SYSTEM_LIBS}
Fix the ENV save/restore added by commit 36979f5b43 (FindPkgConfig:
Tolerate PKG_CONFIG_SYSTEM_LIBRARY_PATH in environment, 2021-07-13,
v3.22.0-rc1~407^2) to unset the variable if it was originally not set.

While at it, clarify the value to which we temporarily set it. The
`pkg-config` and `pkgconf` tools only check that the variable is set,
and do not care about the value.  Set it to a more true-looking value.

Issue: #22148
2022-05-12 13:18:24 -04:00
Michael Hirsch
ca2877c039 FindPython: add support for Python 3.12 2022-05-12 10:55:11 -04:00
friendlyanon
a82163839a CMakePackageConfigHelpers: Fix note about version files supporting ranges
In commit 55c3b6a77e (CMakePackageConfigHelpers: Relax restrictions on
version range, 2019-05-30, v3.20.0-rc1~295^2~1) the documentation for
write_basic_package_version_file documented the support of version
ranges by the generated version files, however the note wrongly
specifies a COMPATIBILITY_MODE argument, instead of COMPATIBILITY.
2022-05-11 14:00:38 -04:00
Brad King
cc207014cf Merge topic 'Java-version-handling' into release-3.23
93e18a4eb6 FindJava, FindJNI: ensure correct handling of versions on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7241
2022-05-06 08:57:24 -04:00
Marc Chevrier
93e18a4eb6 FindJava, FindJNI: ensure correct handling of versions on Windows
* versions are sorted in correct order
* EXACT keyword is taken into account

Fixes: #23479
2022-05-05 11:14:52 +02:00
Marc Chevrier
fff8d5b212 FindPython: fix typo error
Fixes: #23476
2022-05-03 10:46:13 +02:00
Brad King
f90fb73651 FindBoost: Add support for Boost 1.79
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_79_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.79.0 source tree.
They are the same as 1.78's dependencies, so just update
the version check for warning about newer versions.

Fixes: #23452
2022-04-26 11:23:16 -04:00
Brad King
ddefed68e5 Merge topic 'CheckCompilerFlags-revert-linker-warnings' into release-3.23
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:56 -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
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
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
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
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
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
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
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
2dffc7c8fd Merge topic 'cpack-ifw-4.3' into release-3.23
343ed1f913 CPack/IFW: Add support for QtIFW 4.3

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7114
2022-03-28 10:51:41 -04:00
Mehdi Chinoune
ef2fa9b03b GetPrerequisties: pass "-a" only to grep. 2022-03-25 09:07:44 -04:00
Craig Scott
343ed1f913 CPack/IFW: Add support for QtIFW 4.3 2022-03-25 22:05:24 +11:00
Brad King
73939fb3cb Merge topic 'productbuild-rootVolumeOnly' into release-3.23
2a8df7e7db productbuild: Don't write rootVolumeOnly attribute if writing domains
95eb8cbcfc CPack: Avoid space / tab mix in productbuild distribution.xml template
28fdc3a536 productbuild: Simplify internal CPACK_PRODUCTBUILD_DOMAINS usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7092
2022-03-22 08:51:01 -04:00
Brad King
21fa99320f Merge topic 'cpack-nsis-fix-uninstall-quoting' into release-3.23
5d2ceaada8 CPack/NSIS: Add support for unquoted (legacy) uninstaller strings
b795c96727 CPack/NSIS: Fix uninstall command when run from installer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7096
2022-03-22 08:45:03 -04:00
Marc Jeanmougin
5d2ceaada8 CPack/NSIS: Add support for unquoted (legacy) uninstaller strings 2022-03-21 14:53:44 -04:00
Marc Jeanmougin
b795c96727 CPack/NSIS: Fix uninstall command when run from installer
The quoting introduced by commit eb3b3bacdc (CPack/NSIS: Fix uninstall
on Windows using "Apps & Features", 2021-09-13, v3.22.0-rc1~136^2)
created two errors in the uninstaller call: double quoting of the
uninstaller executable, and quotes added to the `_?=` argument which
does not support them.  Simplify the command.
2022-03-21 14:53:31 -04:00
Robert Maynard
3e7113e644 FindCUDAToolkit: Add missing cufftw_static target
Fixes #23347
2022-03-21 09:40:17 -04:00
Craig Scott
2a8df7e7db productbuild: Don't write rootVolumeOnly attribute if writing domains
The rootVolumeOnly attribute is deprecated. Apple docs say to use
domains instead.

Fixes: #23343
2022-03-21 15:43:46 +11:00
Craig Scott
95eb8cbcfc CPack: Avoid space / tab mix in productbuild distribution.xml template 2022-03-21 14:31:09 +11:00
Michael Hirsch
6032213456 FindMatlab: Add R2022a => 9.12 version 2022-03-18 07:22:42 -04:00
Brad King
528a426c8e Merge topic 'FindPython-pypy-specify-versions' into release-3.23
2834cea155 FindPython: fix various problems using pypy interpreters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7081
2022-03-18 07:18:04 -04:00
Marc Chevrier
2834cea155 FindPython: fix various problems using pypy interpreters
* add more possible directories for include file search
* enhance version detection from library and include files
* search for file pypy_decl.h when PyPy.h is not defined
2022-03-17 14:53:40 +01:00
Kai Pastor
fcc0119af0 FindPostgreSQL: Update known versions in documentation 2022-03-17 09:41:57 -04:00
Brad King
b2ba662ca6 Merge topic 'doc-list-semicolons' into release-3.23
8abd714176 Help: Clarify that ENVIRONMENT test properties take ;-separated lists
02cf404ace Help: Add advice for dealing with semicolons in lists
c4117d9116 ExternalProject: Document that LIST_SEPARATOR works for CMAKE_ARGS too

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !7066
2022-03-16 11:14:58 -04:00
Brad King
1925a5ccc2 Merge topic 'binutils-llvm-ar-apple' into release-3.23
fee36b7a78 BinUtils: Restore llvm-ar fallback on Apple platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7077
2022-03-16 11:09:44 -04:00
Brad King
2db936e59a Merge branch 'binutils-llvm-ar-apple' into release-3.22
Merge-request: !7077
2022-03-16 10:51:03 -04:00
Brad King
fee36b7a78 BinUtils: Restore llvm-ar fallback on Apple platforms
Since commit 29ea94e17c (BinUtils: Avoid llvm-ar on Apple platforms,
2022-03-03, v3.21.6~1^2) we do not consider `llvm-ar` at all on Apple
platforms.  However, there are existing cross-compiling use cases in
which the toolchain has `llvm-ar` but not `ar`.  Prior to the
re-ordering in commit cf82300a63 (BinUtils: Clarify search logic and
make it more consistent, 2021-05-27, v3.21.0-rc1~119^2~2), we preferred
`ar` and then `llvm-ar`.  Restore the original order for Apple.

Fixes: #23320
2022-03-16 10:46:11 -04:00