Commit Graph
4086 Commits
Author SHA1 Message Date
Brad King b02ae60a76 cmake_host_system_information: Add query for the locale's charset
Issue: #27562
2026-02-11 11:56:05 -05:00
Vito Gamberini 70c1f0f43d Experimental: Remove import std experimental gate
Fixes: #27571
2026-02-07 09:03:43 -05:00
Brad King d979f3df74 Merge topic 'fileapi-interface-sources'
b8af7837b3 fileapi: Add interfaceSources to the target codemodel replies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11655
2026-02-06 10:37:20 -05:00
Martin Duffy 95dc40d8a8 Experimental: Remove Instrumentation experimental gating
Fixes: #27348
2026-02-05 14:05:42 -05:00
Brad King 37614c8f79 Merge topic 'cmd-version-json'
39a3915022 cmd: implement json version output
89fd18b48e nghttp2: provide common cm3p headers
31bb76eafd Utilities: add lost openssl dependency
26cdd956ac kwiml: provide common cm3p version header
4952dc9d4a Merge branch 'upstream-KWIML' into cmd-version-json
b41743ddcb KWIML 2025-08-05 (2eae04db)
25c05b0bac kwiml: Update script to get version header

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11630
2026-02-05 13:11:08 -05:00
Craig Scott b8af7837b3 fileapi: Add interfaceSources to the target codemodel replies
Fixes: #27489
2026-02-05 21:20:48 +09:00
Brad King 9e5d338dd9 Merge topic 'lang-link-flags'
98f9874703 cmake: Add per-language link flags for all target types
63858fc3e0 Tests: Factor out LINKER: reference file generation
399288871e cmLocalGenerator: Factor out link flag parsing
82913923cd try_compile: Reflow comments per `clang-format`
7b4b556e2d Help: Fix description of `CMAKE_*_LINKER_FLAGS` variables
29b1d0baa9 Help/try_compile: Remove extraneous `versionadded` policy note
5ecee0db7b cmLocalGenerator: De-duplicate static linker flags lookup
bc1847c70b cmLocalGenerator: De-duplicate target property link flags lookup
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11611
2026-02-03 11:22:36 -05:00
AJIOB 39a3915022 cmd: implement json version output 2026-02-03 09:34:23 +03:00
Tyler YankeeandBrad King 98f9874703 cmake: Add per-language link flags for all target types
Previously, `CMAKE_<LANG>_LINK_FLAGS` was an undocumented variable used
for linking executables only. Re-spell that variable mirroring the
existing spellings for shared and module libraries, and add policy
CMP0210 to preserve compatibility.

Then, repurpose `CMAKE_<LANG>_LINK_FLAGS` to provide a variable to be
used for per-language link flags for all target types, along with a
per-configuration variant. These are added to the `<LINK_FLAGS>` rule
placeholder in the generators.

Fixes: #21934
Relates: #25620

Co-authored-by: Brad King <brad.king@kitware.com>
2026-01-31 19:37:09 -05:00
Brad King 4efe6d3a18 Merge topic 'cps-modules'
3771471310 CPS: Support C++20 modules
b080922be6 cmake-cxxmodules: Note config limitations
e4cbf1c153 cmCxxModuleMetadata: Update PopulateTarget

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11633
2026-01-30 11:35:19 -05:00
Vito Gamberini 3771471310 CPS: Support C++20 modules
Modify the PackageInfo exporters and commands to support C++20 modules
via the collator-generated module manifest.

Fixes #27548
2026-01-29 13:26:35 -05:00
Marc Chevrier 209d86c5fe GenEx FILE_SET_PROPERTY 2026-01-28 16:57:35 +01:00
Brad King 810e5d3a7a Merge topic 'FILE_SET-properties'
4113364c49 FILE_SET: properties management

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Reviewed-by: Vito Gamberini <vito.gamberini@kitware.com>
Merge-request: !11631
2026-01-28 10:55:47 -05:00
Marc Chevrier 4113364c49 FILE_SET: properties management
Fixes: #27307
2026-01-27 18:15:26 +01:00
Brad King 43925617e2 Merge branch 'release-4.2' 2026-01-27 11:32:56 -05:00
Brad King 53ae242d55 CMake 4.2.3 2026-01-27 11:03:47 -05:00
Brad King b5eded8279 Merge branch 'release-4.1' 2026-01-27 10:40:17 -05:00
Brad King 10a91404d0 Merge branch 'release-4.1' into release-4.2 2026-01-27 10:39:51 -05:00
Brad King cc05acf0a1 CMake 4.1.5 2026-01-27 10:11:40 -05:00
Brad King f0f9db844c Merge branch 'release-4.0' 2026-01-27 10:03:26 -05:00
Brad King 9ad49bd944 Merge branch 'release-4.1' into release-4.2 2026-01-27 10:03:10 -05:00
Brad King 74f60bafcf Merge branch 'release-4.0' into release-4.1 2026-01-27 10:03:01 -05:00
Brad King fe1fed2f4a CMake 4.0.6 2026-01-27 09:24:22 -05:00
Brad King 6d8fd22a03 Merge branch 'release-3.31' 2026-01-26 14:22:33 -05:00
Brad King 3b78e2ab25 Merge branch 'release-4.1' into release-4.2 2026-01-26 14:21:53 -05:00
Brad King 859f7ef869 Merge branch 'release-4.0' into release-4.1 2026-01-26 14:21:28 -05:00
Brad King eb7c1516e1 Merge branch 'release-3.31' into release-4.0 2026-01-26 14:21:11 -05:00
Brad King cd51ca47cb CMake 3.31.11 2026-01-26 13:45:51 -05:00
Brad King b6a60d9ebe Merge topic 'FindRuby-components'
c5e7cb691c FindRuby: Add support for interpreter and development components
dc8e05c4d2 FindRuby: Simplify finding the Ruby library - Ruby already knows!
b192f706aa FindRuby: Remove broken, untested and unmaintained cross-compiling support
ee75b3e7b4 FindRuby: Clean up variables read from Ruby
ba37066185 FindRuby: Versions are strings not paths.
b2bd6b221c FindRuby: Enclose Ruby executable in quotes
752d5cace6 FindRuby: Fix incorrect code and versions
deb67fa837 FindRuby: Remove duplicate word
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Osyotr <zhenchik35026@gmail.com>
Merge-request: !11544
2026-01-24 07:58:49 -05:00
Charlie Savage c5e7cb691c FindRuby: Add support for interpreter and development components 2026-01-23 10:35:43 -05:00
Kyle Edwards a4d9a20c49 Merge topic 'bin2c'
3dd49d857a ci: Enable bin2c large file test on some builds
3a893806bb cmake -E: Add bin2c mode
8cca26e562 cm::optional: Suppress GCC -Wmaybe-uninitialized false positive

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !11536
2026-01-23 10:05:58 -05:00
Kyle Edwards 3a893806bb cmake -E: Add bin2c mode
Run Tests/RunCMake/cmake-E-bin2c/generate_files.sh to regenerate the
following files:

- Tests/RunCMake/cmake-E-bin2c/long.c.txt
- Tests/RunCMake/cmake-E-bin2c/long_signed.c.txt
- Tests/RunCMake/cmake-E-bin2c/long_decimal.c.txt
- Tests/RunCMake/cmake-E-bin2c/long_signed_decimal.c.txt
- Tests/RunCMake/cmake-E-bin2c/hashes.cmake

Run it with --very-long to regenerate the following additional files:

- Tests/RunCMake/cmake-E-bin2c/very_long_params.cmake
2026-01-22 14:33:17 -05:00
Marc Chevrier e2a38a3990 GenEx SOURCE_PROPERTY
This feature is required for the support of the future feature of
pattern rules (see #27383).

But it is also a valuable addition in the context of custom command and target.
2026-01-21 16:03:30 +01:00
Paulius Velesko 47c3e55d4a HIP: Add support for SPIR-V platform
Add `spirv` as a known value for `CMAKE_HIP_PLATFORM`.
Default `CMAKE_HIP_ARCHITECTURES` to `OFF` for `spirv`.

Fixes: #27410
2026-01-20 13:18:18 -05:00
Brad King 3044be73a9 Merge branch 'release-4.2' 2026-01-20 10:42:30 -05:00
Brad King 3356d93e66 CMake 4.2.2 2026-01-20 09:46:37 -05:00
Brad King 59c3422974 Merge topic 'pvs-analyze'
ef12ef1bd6 pvs-studio: Add support for linting with PVS-Studio
8f722e0fac cmList: Expose container reserve
5d1f269658 cmcmd: Allow passing object file to co_compile commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Overchenko <aleksandr9809@gmail.com>
Merge-request: !11323
2026-01-19 09:30:58 -05:00
Brad King ec4af051eb Merge topic 'doc-file-sys-commands'
d8c6bbe693 Help: Improve formatting for `cmake_host_system_information`
307c2240ad Help: Improve command formatting atop `file` page

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11603
2026-01-19 09:29:28 -05:00
Brad King 18c98682f5 Merge topic 'verify-private-header-sets'
b61637f90f File sets: Add verification of private file sets
61df2e15a2 Help: Verification target also sets CXX_SCAN_FOR_MODULES to false
909b54023a File sets: Specify verify file set target names in one place
20219414c3 File sets: Always verify interface files sets of executable targets
c7a1d5ee58 Tests: Rename VerifyHeaderSets tests to VerifyInterfaceHeaderSets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11565
2026-01-19 09:27:59 -05:00
Martin Duffy ef12ef1bd6 pvs-studio: Add support for linting with PVS-Studio 2026-01-16 11:25:59 -05:00
Leslie P. Polzer 03f19aa4ea cmSystemTools: Fix path traversal vulnerability in archive extraction
Add security flags to libarchive extraction to prevent path traversal
(Zip Slip) and absolute path attacks:

- ARCHIVE_EXTRACT_SECURE_NODOTDOT: Block ".." path components
- ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS: Block absolute paths
- ARCHIVE_EXTRACT_SECURE_SYMLINKS: Block symlinks escaping extract dir

This hardens both `cmake -E tar` and `file(ARCHIVE_EXTRACT)` against
malicious archives that attempt to write files outside the intended
extraction directory.
2026-01-16 08:54:07 -05:00
Craig Scott b61637f90f File sets: Add verification of private file sets
Add support for PRIVATE header sets, analogous to the existing
INTERFACE header sets support. A key difference between the two is
the way they handle build and usage requirements. INTERFACE
header sets rely on the original target's INTERFACE, whereas PRIVATE
header sets copy across various properties from the original target.

Generated files need special handling for PRIVATE header sets.
Add a dependency on the original target to the verification target to
ensure such generated files will exist.

Fixes: #23448
2026-01-16 18:10:17 +11:00
Craig Scott 20219414c3 File sets: Always verify interface files sets of executable targets
When VERIFY_INTERFACE_FILE_SETS is set to true on an executable
target, verification of that target's interface file sets was only being
performed if the target's ENABLE_EXPORTS property was set to true.
We now always verify the interface file sets of executable targets,
subject to the new CMP0209 policy. This allows interface file sets to
be verified even for executable targets that do not export symbols.
Interface file sets containing headers that are fully inlined is an
example use case for this scenario. Unit test executables may link
to the executable under test, possibly with $<COMPILE_ONLY:...>.

Issue: #23448 #27046
2026-01-16 18:10:14 +11:00
Tyler Yankee d8c6bbe693 Help: Improve formatting for cmake_host_system_information
Use the signature directive to improve formatting of links to each
sub-command, especially `QUERY WINDOWS_REGISTRY`.
2026-01-15 20:30:17 -05:00
Brad King 8194b8ff5c Utilities/Release: Update docker specs for linux-aarch64 to centos 8 vault
Update the centos base image from centos 7 to centos 8.  The latter is
available in `vault.centos.org` repositories, so we can rebuild in the
future.  The resulting binaries require GLIBC 2.28.

While at it, update to OpenSSL 3.6.0.
2026-01-13 11:38:30 -05:00
Brad King 08e1d1001a Merge topic 'fix-cmp0199'
35d5a4fd6d GenEx: Partially restore pre-CMP0199 behavior of $<CONFIG>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Matthew Woehlke <matthew.woehlke@kitware.com>
Merge-request: !11581
2026-01-13 11:05:11 -05:00
Brad King dc652e91c6 Merge topic 'E_sum-stdin'
394ab1fcfb cmake -E *sum: Add ability to read from stdin

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11590
2026-01-13 10:52:24 -05:00
Kyle Edwards 394ab1fcfb cmake -E *sum: Add ability to read from stdin 2026-01-12 13:58:53 -05:00
Kyle Edwards 2d2036c9e9 FindCUDAToolkit: Add CUDA::bin2c target 2026-01-12 12:02:07 -05:00
Matthew Woehlke 35d5a4fd6d GenEx: Partially restore pre-CMP0199 behavior of $<CONFIG>
Modify the implementation of policy CMP0199 to only remove the oddball
configuration map matching of `$<CONFIG>` in `NEW` mode, restoring the
old behavior of matching BOTH the consumer's configuration and the
selected configuration of the imported target. It turns out that users
are more dependent on the former than the latter, and while matching
more than one thing is still dodgy, we will likely need to introduce a
new generator expression to match the selected configuration of the
imported target.

Meanwhile, `$<CONFIG>` on targets imported from CPS still only matches
the selected configuration of the imported target, which is the behavior
specified by CPS. However, this can only happen for `$<CONFIG>`
expressions that were generated internally during import.

Update documentation and test cases accordingly.

Fixes: #27487
Fixes: #27495
2026-01-12 10:58:08 -05:00