Commit Graph

12277 Commits

Author SHA1 Message Date
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
Brad King
941605e427 Merge topic 'AppleClang-cxx20-cxx23-flags' into release-3.23
683e4e9cab AppleClang: Add C++20 and C++23 flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7063
2022-03-15 12:46:32 -04:00
Brad King
c4117d9116 ExternalProject: Document that LIST_SEPARATOR works for CMAKE_ARGS too
Since `CMAKE_ARGS` is used to construct the default `CONFIGURE_COMMAND`
for CMake-based external projects, the `LIST_SEPARATOR` option works for
it too.
2022-03-11 11:15:53 -05:00
Brad King
7523a1da6e Merge branch 'AppleClang-cxx20-cxx23-flags' into release-3.22
Merge-request: !7063
2022-03-11 10:33:16 -05:00
Ken Matsui
683e4e9cab AppleClang: Add C++20 and C++23 flags
Follow up commit 886e27062b (Clang/MSVC: C++20 final flag, C++23
support, 2021-05-29, v3.20.4~7^2) with support for AppleClang.
2022-03-11 10:00:21 -05:00
Brad King
ed663af8a2 Merge topic 'cuda-arch-off' into release-3.23
7024596a26 Tests: Fix testing CMAKE_CUDA_ARCHITECTURES=OFF with Clang
2a79b647fa CUDA: Restore support for CMAKE_CUDA_ARCHITECTURES=OFF

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7058
2022-03-10 09:08:04 -05:00
Brad King
e3b9338e97 Merge topic 'irsl-oneapi-linux' into release-3.23
3e84a06b3a IRSL: Add paths for Intel oneAPI compilers on Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7057
2022-03-10 06:43:10 -05:00
Attila Krasznahorkay
3e84a06b3a IRSL: Add paths for Intel oneAPI compilers on Linux
They are stored in a slightly different place with oneAPI than they
used to be in PSXE.

A similar change was made for Windows by commit 956160bb9a (IRSL: Fix
search for Windows redist files with Intel Classic compiler, 2021-09-23,
v3.22.0-rc1~88^2), which left a comment about the locations relative to
the Classic and oneAPI compilers.

Fixes: #23310
2022-03-09 12:53:37 -05:00
Robert Maynard
2a79b647fa CUDA: Restore support for CMAKE_CUDA_ARCHITECTURES=OFF
Fixes: #23309
2022-03-09 12:30:12 -05:00
Brad King
0402d35168 Merge topic 'binutils-llvm-mt' into release-3.23
73d0d4e4b5 BinUtils: Avoid llvm-mt because it is missing 'mt' features we use

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7054
2022-03-09 12:10:14 -05:00
Brad King
3f737ba2ec Merge branch 'binutils-llvm-mt' into release-3.22
Merge-request: !7054
2022-03-08 11:55:16 -05:00
Brad King
73d0d4e4b5 BinUtils: Avoid llvm-mt because it is missing 'mt' features we use
Since commit cf82300a63 (BinUtils: Clarify search logic and make it more
consistent, 2021-05-27, v3.21.0-rc1~119^2~2) we correctly prefer the
more-specific name `llvm-mt` over `mt` when using Clang.  However, the
`llvm-mt` tool does not yet support all the flags we need in the
implementation of `vs_link_{exe,dll}`.  Prefer plain `mt` for now.

Fixes: #23305
2022-03-08 11:48:30 -05:00
Kenneth Soerensen
bd3e23a605 IAR: Fix detection of modern C++ version
The change in commit cc4da8d13a (IAR/CXX: Fix compatibility with CMP0057
OLD, 2022-01-29, v3.23.0-rc1~46^2) broke the detection of C++ version
because the `IN_LIST` operator cannot work directly on a list but
requires a variable.
2022-03-08 09:34:48 -05:00
Brad King
1d9b545390 Merge topic 'FindMatlab-minver' into release-3.23
bb2c7b7dc0 FindMatlab: Fix logic error when minimum version is not found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7047
2022-03-08 08:22:09 -05:00
Michael Hirsch
bb2c7b7dc0 FindMatlab: Fix logic error when minimum version is not found
Fix logic added by commit 7fdd5128b1 (FindMatlab: Fix version selection
if a version is given, 2021-07-02, v3.22.0-rc1~66^2).  Ensure that
`_list_index` is always initialized to -1, akin to `list(FIND)` not
finding a match.

Issue: #22377
2022-03-07 10:12:43 -05:00
Brad King
71a8b4e63d Merge topic 'binutils-llvm-ar-clang-macos' into release-3.23
29ea94e17c BinUtils: Avoid llvm-ar on Apple platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7039
2022-03-04 08:52:05 -05:00
Brad King
7edc09b4f6 Merge branch 'binutils-llvm-ar-clang-macos' into release-3.22
Merge-request: !7039
2022-03-03 12:58:00 -05:00
Brad King
29ea94e17c BinUtils: Avoid llvm-ar on Apple platforms
Since commit cf82300a63 (BinUtils: Clarify search logic and make it more
consistent, 2021-05-27, v3.21.0-rc1~119^2~2) we correctly prefer the
more-specific name `llvm-ar` over `ar` when using Clang.  However, on
Apple platforms, `llvm-ar` does not generate a symbol table that the
Apple linker accepts.  Fall back to `ar` on Apple platforms.

Fixes: #23269
2022-03-03 12:54:10 -05:00
Brad King
5c1f5357b0 VS: Fix CUDA compiler id with CMAKE_CUDA_ARCHITECTURES={all,all-major}
Skip the architecture verification check for these values on Visual
Studio.  It cannot be implemented correctly until future work delays the
check to the main compiler test step.

Issue: #23164, #23161
2022-03-02 15:49:14 -05:00
Brad King
04a7200c75 Merge topic 'cuda-arch-all' into release-3.23
2796d6eeca CUDA: Fix CMAKE_CUDA_ARCHITECTURES=all/all-major with NVCC 11.5+
e450d55552 Help: Update CUDA_ARCHITECTURES docs for generic all/all-major support
fe64c49e72 CUDA: Simplify CMAKE_CUDA_ARCHITECTURES special value logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7026
2022-03-02 07:52:17 -05:00
Brad King
2796d6eeca CUDA: Fix CMAKE_CUDA_ARCHITECTURES=all/all-major with NVCC 11.5+
Changes in commit 8f64df0a7c (CUDA: Generic all and all-major support,
2021-12-19, v3.23.0-rc1~23^2) broke our architecture verification checks
when using `-arch={all,all-major}` with NVCC 11.5+.  If we test the
compiler with `-arch={all,all-major}`, we have no expected list of
architectures, so skip the check.

Fixes: #23278
2022-03-01 12:16:40 -05:00
Brad King
893ba6c5c3 Merge topic 'FindThreads-revert-libc-pthread-flag' into release-3.23
c6da90bd39 FindThreads: Revert "Honor THREADS_PREFER_PTHREAD_FLAG when ... in libc"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7025
2022-03-01 08:37:58 -05:00
Brad King
fe64c49e72 CUDA: Simplify CMAKE_CUDA_ARCHITECTURES special value logic
Refactor the logic checking `CMAKE_CUDA_ARCHITECTURES` special values.
Switch on the value first, and then make other decisions for each case.
This makes room for other special values to be added later.
2022-02-28 21:30:23 -05:00
Brad King
7a16688f02 Merge branch 'FindThreads-revert-libc-pthread-flag' into release-3.22
Merge-request: !7025
2022-02-28 13:09:19 -05:00
Brad King
02b04f1ca8 Merge branch 'FindThreads-revert-libc-pthread-flag' into release-3.21
Merge-request: !7025
2022-02-28 13:09:00 -05:00
Brad King
c6da90bd39 FindThreads: Revert "Honor THREADS_PREFER_PTHREAD_FLAG when ... in libc"
Revert commit 5efb6fb516 (FindThreads: Honor THREADS_PREFER_PTHREAD_FLAG
when pthread is found in libc, 2021-11-03, v3.21.5~4^2).  The check for
the `-pthread` flag can pass on compilers like XL, that interprets it as
`-p -t hread` and returns zero.  Prior to that commit, we did not use
the check in the `CMAKE_HAVE_LIBC_PTHREAD` code path.  Now we do, it
succeeds, and we incorrectly add the `-pthread` flag for XL.

This change was backported to the 3.21 and 3.22 release series long
after they initially came out.  Since there may be more cases where we
now add `-pthread` incorrectly, it is simplest to revert the change in
all release series pending further investigation.

Fixes: #23270
2022-02-28 12:53:15 -05:00
Fred Baksik
005c7dc9e7 GHS: Store full path of Integrity OS directory
Fixes build project error because the OS directory was a relative
path from the binary directory.

Fixes issue during project regeneration where the `-os_dir` project option
was missing because GHS_OS_DIR was not properly stored in the cache
file.

This error was introduced by commit aa59eaac4f (GHS: Allow setting GHS
variables from toolchain file, 2021-11-15, v3.23.0-rc1~337^2).
2022-02-23 11:33:35 -05:00
Brad King
65e4d29e35 CheckTypeSize: Modernize and clarify documentation
Spell out the list of result variables as a definition list rather
than in prose.

Fixes: #23247
2022-02-18 11:33:06 -05:00
Brad King
809cb5b76a Merge topic 'FindGLUT-link-dirs' into release-3.23
44f7238d5d FindGLUT: Use link directories for libs from pkg-config

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6985
2022-02-16 09:42:53 -05:00
Axel Huebl
449f343498 FindHDF5: Tolerate failure during compiler interrogation
Check that the file that is accessed via `file(STRINGS...)` truly
exists.

This is not the case in some EMSCRIPTEN/WebASM builds where we want to
overwrite the HDF5 find logic manually. The missing check here prevents
that one can overwrite the search logic in exotic environments.
2022-02-15 10:44:29 -05:00
Silvio Traversaro
44f7238d5d FindGLUT: Use link directories for libs from pkg-config
Since commit f90d15458a (FindGLUT: Use pkg-config to find flags if
available, 2021-06-11, v3.22.0-rc1~469^2), the `GLUT_LIBRARIES` may come
from `pkg-config`, in which case they may be `-l` flags instead of
absolute paths.  Propagate `GLUT_LIBRARY_DIRS` to GLUT::GLUT too.

Fixes: #23229
2022-02-15 10:35:11 -05:00
Brad King
db5b4f40c3 Merge topic 'FindMatlab-mcr911' into release-3.23
b8d885ed0d FindMatlab: Fix version detection for MCR >= 9.10

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6976
2022-02-15 09:50:08 -05:00
Tom M
b8d885ed0d FindMatlab: Fix version detection for MCR >= 9.10
Recent MCR versions have the following `VersionInfo.xml`:

    <version>9.11.0.1837725</version>

Fix parsing of multiple digits in the version components
so that we do not mistake this for version `9.1`.
2022-02-14 10:23:33 -05:00
Brad King
59da8629cc Merge topic 'FortranCInterface-macos-arch' into release-3.23
58af150a74 FortranCInterface: Fix mangling detection for x86_64 on arm64 macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6974
2022-02-14 09:59:45 -05:00
Brad King
2adea60f45 Merge topic 'GoogleTest-discovery-fix-escaping' into release-3.23
61929f936f GoogleTest: Fix escaping in test names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6965
2022-02-14 09:58:00 -05:00
Brad King
58af150a74 FortranCInterface: Fix mangling detection for x86_64 on arm64 macOS
Fixes: #23218
2022-02-11 11:56:58 -05:00
Evgeniy Shcherbina
61929f936f GoogleTest: Fix escaping in test names
Due to add_command() being a macro it introduced excessive and
nonobvious escaping in different parts of the script. Because of
one of such places the resulting script would have an erroneous
${TEST_LIST} if the user data (in test parameters) had a semicolon.

To eliminate this non-obvious escaping, add_command() was converted
to function. Updated the escaping accordingly.

Fixes: #23059
2022-02-11 09:03:40 -05:00
Brad King
5b480172c3 Merge topic 'clang-cross-compile-windows-pdb' into release-3.23
641cb1093b Windows/Clang: Support PDB when cross-compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !6959
2022-02-10 09:09:09 -05:00
Brad King
1a30d3ade5 Merge branch 'backport-IntelLLVM-depfile-flags' into release-3.22
Merge-request: !6964
2022-02-09 10:09:51 -05:00
Brad King
1e947fcb83 Merge branch 'backport-IntelLLVM-depfile-flags' into IntelLLVM-depfile-flags 2022-02-09 10:08:52 -05:00
William R. Dieter
a8b6bf9a38 IntelLLVM: Add dependencies on system header files on Windows
In commit a90d2a9eed (IntelLLVM: Add support for Intel LLVM-based
compilers, 2020-11-02, v3.20.0-rc1~89^2~20) the IntelLLVM depfile
generation flags were taken from `Platform/Windows-Intel-C`.  Those
flags were added by commit a624a3e1b3 (Ninja: Use deps=gcc for Intel
Compiler on Windows, 2019-01-30, v3.14.0-rc1~30^2), which forgot to
account for commit 6d74e7870b (Ninja: Add dependencies on
system-provided header files, 2016-03-15, v3.6.0-rc1~265^2).

The `-QMD` option generates Makefile dependencies.  The `-QMMD` option
generates Makefile dependencies, but excludes system header files.
Part of the BuildDepends test includes a header, cmake_pch.hxx, that
includes a second header, zot_pch.hxx.  The test builds a pch file for
cmake_pch.hxx, touches zot_pch.hxx, then verifes that cmake_pch.hxx.pch
is regenerated based on the dependencies.

The cmake_pch.hxx contains `#pragma system_header` before it includes
zot_pch.hxx.  `#pragma system_header` indicates that the portion of the
file following the pragma is to be treated as a system header.

When `-QMMD` is used to generate dependencies, the `#include` of
zot_pch.hxx is ignored because it `-QMMD` says to ignore system headers.

Using `-QMD` instead uses all headers when generating dependencies
and causes this test to pass.  The Clang configuration in
Platform/Windows-Clang.cmake also uses the `-MD` option for generating
pre-compiled headers, instead of `-MMD`.

Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
2022-02-09 10:07:51 -05:00
Brad King
94f1bbdd54 Intel: Add dependencies on system header files on Windows
In commit a624a3e1b3 (Ninja: Use deps=gcc for Intel Compiler on Windows,
2019-01-30, v3.14.0-rc1~30^2) we forgot to account for commit 6d74e7870b
(Ninja: Add dependencies on system-provided header files, 2016-03-15,
v3.6.0-rc1~265^2).
2022-02-09 10:07:51 -05:00
Deniz Bahadir
641cb1093b Windows/Clang: Support PDB when cross-compiling 2022-02-09 00:38:09 +01:00