Commit Graph
76329 Commits
Author SHA1 Message Date
Brad King f68ea05f13 Merge branch 'release-4.4' 2026-06-25 07:22:32 -04:00
Brad King 8192c7dce1 Merge topic 'skip-toolchain-checks-more-variables'
170248fbcb CMakeDetermineCompilerABI: require more variables to skip checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12201
2026-06-25 07:22:31 -04:00
Brad King fba52b2b69 Merge topic 'skip-toolchain-checks-more-variables' into release-4.4
170248fbcb CMakeDetermineCompilerABI: require more variables to skip checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12201
2026-06-25 07:22:29 -04:00
Brad King 35c5170787 Merge branch 'release-4.4' 2026-06-25 07:19:52 -04:00
Brad King 53862a2744 Merge topic 'fortran-ptr-size'
e13c32153b Fortran: Detect pointer size on Intel archs with Oracle Studio 12.4 and below
11c897d487 Fortran: Detect pointer size on PowerPC archs with PGI
e88a4b9f2c Sunway: Detect sw_64 architecture more consistently

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12216
2026-06-25 07:19:52 -04:00
Brad King 9c7c431442 Merge topic 'fortran-ptr-size' into release-4.4
e13c32153b Fortran: Detect pointer size on Intel archs with Oracle Studio 12.4 and below
11c897d487 Fortran: Detect pointer size on PowerPC archs with PGI
e88a4b9f2c Sunway: Detect sw_64 architecture more consistently

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12216
2026-06-25 07:19:50 -04:00
Brad King 0c91f455e2 Merge branch 'release-4.4' 2026-06-25 07:17:57 -04:00
Brad King 9120771b28 Merge topic 'FindCUDAToolkit_support_win_arm64'
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
2026-06-25 07:17:56 -04:00
Brad King 5ba6ea30c7 Merge topic 'FindCUDAToolkit_support_win_arm64' into release-4.4
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
2026-06-25 07:17:54 -04:00
Kitware Robot 8dcfc03c14 CMake Nightly Date Stamp 2026-06-25 00:05:14 -04:00
Matthew Woehlke 5abaf65154 Check*: Restore toleration of ;-W... in CMAKE_REQUIRED_FLAGS
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: #27901
Fixes: #27893
2026-06-24 13:59:11 -04:00
Gleb Popov ad0dfd51ba Tests: Enable some Linux cases on FreeBSD 2026-06-24 18:51:49 +03:00
Gleb Popov 144021a43b file(GET_RUNTIME_DEPENDENCIES): Implement command for FreeBSD
Closes: #25305
2026-06-24 18:49:51 +03:00
Ben Boeckel 170248fbcb CMakeDetermineCompilerABI: require more variables to skip checks
These variables were missed in the addition of the feature.

Fixes: #27894
2026-06-24 11:38:50 -04:00
Brad King e13c32153b Fortran: Detect pointer size on Intel archs with Oracle Studio 12.4 and below
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.
2026-06-24 11:32:44 -04:00
Brad King 11c897d487 Fortran: Detect pointer size on PowerPC archs with PGI
The PGI compiler does not define __SIZEOF_POINTER__ so use the
__ppc64__ or __ppc__ CPU macros to select a pointer size instead.
2026-06-24 11:32:44 -04:00
Brad King e88a4b9f2c Sunway: Detect sw_64 architecture more consistently
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.
2026-06-24 11:32:44 -04:00
Daksh Mamodiya 503bdb9777 Makefile: Generate test_prep targets for CMAKE_TEST_BUILD_DEPENDS
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
2026-06-24 17:24:54 +02:00
NihilDigit 9a46155665 Tests: Cover ARM64 BCJ 7z extraction
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
2026-06-24 10:18:49 -04:00
Marc Chevrier faeeac60e8 Add SOURCE_GROUP properties for file set and source file
Fixes: #27627
2026-06-24 16:01:23 +02:00
Brad King 23c5b40924 Merge topic 'fastbuild-test-deps'
2d417b9371 FASTBuild: Generate test_prep/ targets for test build dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12183
2026-06-24 09:54:39 -04:00
Brad King 84e1dbc893 Merge topic 'fileapi-import-std-target-refs'
11c93dd6da fileapi: Test import std target references in codemodel

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12209
2026-06-24 09:52:25 -04:00
Brad King 741c67a43c Merge topic 'fileapi-toolchains-none'
a3b5591bbc fileapi: Omit NONE language entries from toolchains

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12206
2026-06-24 09:51:11 -04:00
Brad King 4073b18ab7 Merge topic 'source_group-FILE_SET-support'
6043014d1d source_group(): Add file set support
44fd6ec551 source_group: use cmArgumentParser

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12195
2026-06-24 09:49:49 -04:00
Brad King f98ff30970 Merge topic 'tests-split-runcmake-install'
e5e4616a56 Tests/RunCMake/install: split into variants

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12194
2026-06-24 09:36:28 -04:00
Mickaël Germain 092edb6860 GenEx: add $<LIST:FILTER> PREDICATE filter and REGEX keyword
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
2026-06-23 21:31:49 -07:00
Mickaël Germain d2ad140ef9 GenEx: add PREDICATE selector to $<LIST:TRANSFORM>
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
2026-06-23 21:31:20 -07:00
Kitware Robot c3b9bc2278 CMake Nightly Date Stamp 2026-06-24 00:05:31 -04:00
Mickaël Germain 6024f624b0 GenEx: factor TRANSFORM action descriptor lookup
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
2026-06-23 20:39:13 -07:00
Robert Maynard 0e9d7128cd CUDA: Add support for Clang on Windows ARM64 2026-06-23 16:43:15 -04:00
Robert Maynard 5f2b27562e FindCUDAToolkit: Add support for windows arm64 2026-06-23 16:43:04 -04:00
James Miro 89de655356 FindDoxygen: Add USES_TERMINAL option to doxygen_add_docs()
Forward it to `add_custom_target()` and `add_custom_command()`
so that doxygen has access to the terminal when possible.

Fixes: #25359
2026-06-23 16:26:12 -04:00
kkkzbh 11c93dd6da fileapi: Test import std target references in codemodel
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
2026-06-24 03:02:18 +08:00
Robert Maynard afb9e1eab8 FindCUDAToolkit: Detect target processor even when not cross-compiling 2026-06-23 14:31:18 -04:00
Martin Duffy 2d417b9371 FASTBuild: Generate test_prep/ targets for test build dependencies
Issue: #27879
2026-06-23 12:20:49 -04:00
NihilDigit 8f94e20abc liblzma: Enable ARM64 BCJ filters in bundled build
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.
2026-06-24 00:02:43 +08:00
Brad King cd5a8dfa8e Merge topic 'genex-list-transform-apply'
0f6e8ded1d GenEx: add $<LIST:TRANSFORM,...,APPLY,body> action
c0a0b7fdd9 GenEx: add bound-operand binding mechanism and $<_0>
caa51f5689 GenEx: factor TRANSFORM selector parsing and selection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12203
2026-06-23 10:17:50 -04:00
Brad King c615883926 Merge topic 'target-init'
01a80f7401 cmTarget: Move initialization to implementation class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12198
2026-06-23 10:01:01 -04:00
Brad King dd0bd1534b Merge branch 'release-4.4' 2026-06-23 09:55:46 -04:00
Brad King a733b2c1ce Merge topic 'fix-opengl-legacy' into release-4.4
69956c6f63 FindOpenGL: Fix OpenGL and GLX result variables with legacy GL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12205
2026-06-23 09:55:23 -04:00
Brad King 7e4d73a178 Merge topic 'fix-opengl-legacy'
69956c6f63 FindOpenGL: Fix OpenGL and GLX result variables with legacy GL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12205
2026-06-23 09:53:18 -04:00
Brad King 699cad2b6c Merge topic 'update-kwsys'
c029b4a098 Merge branch 'upstream-KWSys' into update-kwsys
fd4084d93e KWSys 2026-06-23 (aa992d52)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12208
2026-06-23 09:50:10 -04:00
Brad King c029b4a098 Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2026-06-23 (aa992d52)
2026-06-23 09:34:28 -04:00
KWSys Upstream fd4084d93e KWSys 2026-06-23 (aa992d52)
Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit aa992d526eaefcfa955f35e631bc026de9e6103f (master).

Upstream Shortlog
-----------------

Sean McBride (1):
      e180697f SystemTools: Add Strnucmp() API, similar to POSIX strncasecmp()
2026-06-23 09:34:28 -04:00
Marc Chevrier 6043014d1d source_group(): Add file set support 2026-06-23 14:55:26 +02:00
Tyler Yankee a3b5591bbc fileapi: Omit NONE language entries from toolchains
Fixes: #27885
2026-06-23 08:42:00 -04:00
Marc Chevrier 44fd6ec551 source_group: use cmArgumentParser
To facilite any future evolutions, use cmArgumentParser to
parse method arguments.
2026-06-23 13:45:39 +02:00
Kitware Robot 6e2614aae3 CMake Nightly Date Stamp 2026-06-23 00:05:17 -04:00
Ben Boeckel e5e4616a56 Tests/RunCMake/install: split into variants
To keep individual test times down.

Also rename some tests to be shorter named to avoid path length issues
on Windows.
2026-06-22 21:19:24 -04:00
Carlo Bramini 69956c6f63 FindOpenGL: Fix OpenGL and GLX result variables with legacy GL
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
2026-06-22 20:05:04 -04:00