0e9d7128cd CUDA: Add support for Clang on Windows ARM64
5f2b27562e FindCUDAToolkit: Add support for windows arm64
afb9e1eab8 FindCUDAToolkit: Detect target processor even when not cross-compiling
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12210
0e9d7128cd CUDA: Add support for Clang on Windows ARM64
5f2b27562e FindCUDAToolkit: Add support for windows arm64
afb9e1eab8 FindCUDAToolkit: Detect target processor even when not cross-compiling
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12210
The `CMAKE_REQUIRED_FLAGS` variable, used by the various entry points to
`cmake_check_source_{compiles,runs}`, specifies that flags shall not be
separated by semicolons. This is because the way in which it is passed
to the child `cmake` process means that, when considered as a list (with
semicolon separated items), only the first item is actually used as
compile flags, with any additional items actually seen as arguments to
the child `cmake` process. While this usage is unsupported, if invoked
accidentally, flags starting with `-W` were silently ignored by CMake.
However, CMake 4.4 newly complains about unrecognized warning
categories, which means that uses which were silently broken now result
in a hard error.
In the longer term, it would be helpful to introduce a policy to repair
improper use of semicolons in `CMAKE_REQUIRED_FLAGS` in order to do what
the user probably meant. However, for various reasons, we do not want to
introduce a policy to CMake 4.4 at this time, and anyway, the policy
won't help users that haven't enabled it. Therefore, alter the 'check
source' functions to detect arguments being passed to `cmake` rather
than the compiler, and remove any such that start with `-W`. This
removes any arguments that newly cause errors starting with CMake 4.4,
while not otherwise altering behavior in case any users were abusing
this implementation quirk.
Strictly speaking, this means that users can no longer abuse this quirk
to alter CMake's diagnostics. However, the only case in which this
should be observable is if the user is already abusing the quirk to
inject their own CMake logic into the CMake-provided test projects.
Since this was never supported, anyone doing that can keep the pieces.
Issue: #27901Fixes: #27893
Revise commit eb8cb2c6c2 (Fortran: Detect pointer size on Intel archs
with PGI, 2014-04-10, v3.0.0-rc4~4^2) to consider more variants of the
architecture macros.
Revise commit cfbf0480ff (Sunway: Add sw_64 support, 2025-08-05,
v4.2.0-rc1~373^2) to use the same set of preprocessor definitions for
all languages, and to order them consistently w.r.t. other archs.
Extend the test_prep/<test> and test_prep/all build targets, generated
from add_test(BUILD_DEPENDS) when CMAKE_TEST_BUILD_DEPENDS is enabled, to
the Makefile generators. Previously only the Ninja and FASTBuild
generators provided them.
Resolve each test's dependencies in a shared layer so all command-line
generators consume one result. cmTestGenerator now filters target
dependencies to build-system targets and records, for each file
dependency, the single target that produces it as a primary
custom-command output (cmGlobalGenerator::FindOutputOwningTarget). The
Makefile generators emit phony rules in CMakeFiles/Makefile2 depending on
<target>.dir/all, with top-level forwarding rules. Sharing the
resolution also stops Ninja and FASTBuild from emitting a dead test_prep
edge for a non-buildable (e.g. INTERFACE) BUILD_DEPENDS target.
On the Makefile generators a file dependency that no single target
produces, and a test whose name contains ':', cannot be expressed as a
recursive-make rule and are reported with a warning and skipped.
Fixes: #27879
Add a small 7z fixture whose filter chain is ARM64 BCJ followed by
LZMA2. This exercises extraction through CMake's bundled libarchive
and liblzma path.
The fixture was generated with 7-Zip 25.01 (arm64). The payload is a
16-byte AArch64 instruction sequence:
1f2003d500000094000000141f2003d5
The payload mtime was set to 2026-06-21T00:00:00Z and then archived
with:
7z a -m0=ARM64 -m1=LZMA2 -mb0:1 -mtm=on -mtc=off -mta=off \
7zip-arm64-bcj.7z payload.bin
The resulting 7zip-arm64-bcj.7z has SHA256:
3DE9111E71C6AA3CBD604460040EBBE6F57E8B00D1D5C5343AC07D435AA2A8D2
Let $<LIST:FILTER> select elements by an arbitrary condition: PREDICATE keeps or
drops each element according to a <body> evaluated with $<_0> bound,
complementing the existing regular-expression form. Also accept an explicit
REGEX keyword before the pattern so the regex and predicate forms read
symmetrically; the bare pattern keeps working.
Issue: #27892
Add a PREDICATE selector to $<LIST:TRANSFORM> that chooses which elements to
transform by evaluating a <body> per element (with $<_0> bound) and acting on
those for which it yields "1". This selects by computed condition instead of
the fixed AT/FOR/REGEX positions, so any generator expression -- including
target queries -- can decide where an action applies. It works with both the
canned actions and APPLY.
Issue: #27892
Resolve each canned $<LIST:TRANSFORM> action to its cmList action and argument
count through a single table rather than an inline chain, so the PREDICATE
selector added next can reuse the same action metadata instead of duplicating
it.
Issue: #27892
Add a regression test for the File API codemodel graph produced for an
import std target. The test verifies that emitted target references,
including those to the CMake-provided stdlib target, resolve to targets
present in the codemodel.
Closes: #27890
CMake's bundled libarchive can request the ARM64 BCJ filter when
extracting 7-Zip archives that use the ARM64 method. The bundled
liblzma build already carries the ARM64 simple filter implementation,
but CMake's reduced build configuration did not enable it or compile
its source file.
Enable the ARM64 encoder and decoder declarations and include
liblzma/simple/arm64.c in the bundled liblzma build.
In commit 32a5f11e50 (FindOpenGL: respect legacy preference for OpenGL
and GLX libraries, 2025-10-31, v4.3.0-rc1~544^2) the result variables
were spelled incorrectly. Also re-order logic to preserve the CMP0072
warning text naming the GLVND libraries.
Fixes: #27299