Commit Graph
75390 Commits
Author SHA1 Message Date
Martin Duffy 3748deda58 pvs-studio: Add .pvsconfig exclusion file 2026-04-29 18:22:33 -04:00
Brad King 2f2b0f04de ci: Update CMake version to 4.3.2 2026-04-29 14:34:05 -04:00
Brad King f15a0ea5d4 Merge topic 'fix_potential_use_of_freed_stack_memory'
1304fb4027 PkgC: Make sure we don't use deleted stack objects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Vito Gamberini <vito.gamberini@kitware.com>
Merge-request: !11965
2026-04-29 10:30:39 -04:00
Brad King 33d4082c8b Merge topic 'swift-module-name-hyphen'
933c59ffde Swift: Replace hyphens with underscores in default module name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11986
2026-04-29 10:28:34 -04:00
Brad King 9bc3f3b5c8 Merge topic 'swift-emit-module-path-fix'
899f1496f8 Swift/Ninja: Fix emit-module-path clobbering on separate emit-module edge

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11984
2026-04-29 10:27:22 -04:00
Brad King ca3e513eb5 Merge topic 'swift-package-name'
118ab41984 Swift: Build with a package name by default
94faee3099 Swift: Add option to pass package name to swiftc invocation
635f71737c Swift: Factor out Swift-specific target flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11981
2026-04-29 10:26:01 -04:00
Brad King 7d3d5df5e7 Merge topic 'findcudatoolkit-sanitizer-api'
35747cb5e0 FindCUDAToolkit: Add sanitizer support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11968
2026-04-29 10:23:32 -04:00
Kitware Robot bd40a31c51 CMake Nightly Date Stamp 2026-04-29 00:05:34 -04:00
Evan Wilde 118ab41984 Swift: Build with a package name by default
Add policy CMP0216 to enable use of the `PROJECT_NAME` as the default
package name for Swift.

Issue: #26886
2026-04-28 15:30:44 -04:00
Evan Wilde 94faee3099 Swift: Add option to pass package name to swiftc invocation
Add a `Swift_PACKAGE_NAME` target property to specify the package name.

Fixes: #26886
2026-04-28 15:24:05 -04:00
Brad King 652a9b3573 Merge topic 'ctest_build_preset_option'
348ff1938b ctest_build: add PRESET option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11983
2026-04-28 15:02:16 -04:00
Brad King bed0738570 Merge topic 'pellesc-c-std'
da33d606e6 PellesC: Add support for C language standards
8e76e3c827 Tests/CompileFeatures: Add support for testing without CXX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11982
2026-04-28 15:00:02 -04:00
Brad King f801525b6a Merge topic 'libarchive-huffman-uninit'
86dfdbee1f libarchive: Backport "Fix use of uninitialized values from Huffman table"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11977
2026-04-28 14:57:26 -04:00
Brad King 7dcc8a1414 Merge topic 'math-min-by-minus-one'
57444e1d3f math: Avoid FPE on INT_MIN by -1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11979
2026-04-28 14:56:03 -04:00
Kyle Edwards 35747cb5e0 FindCUDAToolkit: Add sanitizer support 2026-04-28 10:13:20 -04:00
Kitware Robot 2786d4e6a3 CMake Nightly Date Stamp 2026-04-28 00:05:25 -04:00
Roman Lavrov 933c59ffde Swift: Replace hyphens with underscores in default module name
GetSwiftModuleName() returns the target name verbatim when
Swift_MODULE_NAME is not set, but hyphens are not valid in Swift
module identifiers.  Replace them with underscores so that targets
like swift-syntax get module name swift_syntax automatically.

Issue: #27748
2026-04-27 19:21:29 -04:00
Roman Lavrov 899f1496f8 Swift/Ninja: Fix emit-module-path clobbering on separate emit-module edge
Since commit b6367f723b (Swift/Ninja: Emit modules separately from
compilation, 2026-04-10) the compile edge still appends
-emit-module -emit-module-path when emitModuleSeparately is active,
duplicating the emit-module edge.  For targets with directory-style
module paths (CMP0195=NEW), this causes a file/directory conflict
that fails the build.

Guard -emit-module -emit-module-path on both the compile and
emit-module edges so they are not appended when the flags already
contain -emit-module-path (e.g. from the target's compile options).

Discovered building swift-syntax on Windows where the directory-style
path was overwritten by the flat path from the compile edge.

Issue: #27748
2026-04-27 18:57:47 -04:00
Zack Galbreath 348ff1938b ctest_build: add PRESET option
Allow users to specify a build preset when using CTest dashboard scripts.

Issue: #27630
2026-04-27 17:15:11 -04:00
Brad King da33d606e6 PellesC: Add support for C language standards
Issue: #21536
Inspired-by: Serguei E. Leontiev <leo@sai.msu.ru>
2026-04-27 13:48:49 -04:00
Evan Wilde 635f71737c Swift: Factor out Swift-specific target flags
Swift started the trend of piling language-specific target flags in
`cmLocalGenerator::AddLanguageFlags`. Other languages have added their
own under language-specific `Add<Lang>TargetFlags`.
I'm refactoring where Swift piles on its language-specific target flags
to match the pattern other languages are using.
2026-04-27 10:45:14 -07:00
Robert Maynard 1304fb4027 PkgC: Make sure we don't use deleted stack objects
The cmPkgConfigEnv* of cmPkgConfigResult would point
to a deleted stack copy.

This can causes issues when cmPkgConfigResult::Libs()
is called and we have to fall back to querying the
env.
2026-04-27 13:35:57 -04:00
Brad King de52c08ba2 Merge branch 'release-4.3' 2026-04-27 11:27:44 -04:00
Brad King edddc6bcd0 Merge branch 'release-4.2' 2026-04-27 11:27:38 -04:00
Brad King 26e52f3c36 Merge branch 'release-4.2' into release-4.3 2026-04-27 11:27:13 -04:00
Brad King 5da0abc312 Merge branch 'release-4.3' 2026-04-27 11:23:41 -04:00
Brad King 7a1e3d2800 Merge topic 'doc-CPACK_COMMAND_SYNC'
69ff535b54 Help: Document CPACK_COMMAND_SYNC variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11976
2026-04-27 11:23:41 -04:00
Brad King 45c71430d7 Merge topic 'doc-CPACK_COMMAND_SYNC' into release-4.3
69ff535b54 Help: Document CPACK_COMMAND_SYNC variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11976
2026-04-27 11:23:38 -04:00
Brad King 8e76e3c827 Tests/CompileFeatures: Add support for testing without CXX 2026-04-27 11:13:06 -04:00
Brad King d4b9d7ff32 Merge topic 'doc-CPACK_COMMAND_SYNC' into release-4.2
69ff535b54 Help: Document CPACK_COMMAND_SYNC variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11976
2026-04-27 11:06:29 -04:00
Andrey Filipenkov 69ff535b54 Help: Document CPACK_COMMAND_SYNC variable
It was added by commit ef739edd20 (CPack/DragNDrop: Prevent hdiutil
"resource is busy" failures, 2025-08-15, v4.2.0-rc1~315^2).
2026-04-27 10:52:55 -04:00
Brad King 6cdb1fa58c Merge topic 'diagnostic-preset-order'
135fd16e29 Diagnostics: Fix order in which presets are applied

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11975
2026-04-27 09:52:24 -04:00
Brad King eda0b0d062 Merge topic 'fuzz-readme-typos'
bf5512260b Tests/Fuzzing: Update link to local repro

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11978
2026-04-27 09:51:13 -04:00
Brad King 89443e99d6 Merge topic 'vs-deploy-utility-fix'
6c0b499dab VS: Honor `VS_SOLUTION_DEPLOY` on targets created by add_custom_target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11970
2026-04-27 09:49:27 -04:00
Brad King 26199e3606 Merge topic 'inst-test-regex'
703eaf5ca2 Tests/instrumentation: Simplify some conditionals

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11974
2026-04-27 09:48:05 -04:00
Brad King 0f33d76bb5 Merge topic 'findcudatoolkit-fix-library-root'
2a56da6447 FindCUDAToolkit: Fix issue with CUDAToolkit_LIBRARY_ROOT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !11971
2026-04-27 09:45:49 -04:00
Brad King 0dd28b69fa Merge topic 'test-compile-features'
b3138fce0f Tests/CompileFeatures: Cover <LANG>_STANDARD properties

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11973
2026-04-27 09:43:33 -04:00
Brad King f62c35a036 Merge topic 'intel-classic-frontend-variant'
983942443e Intel: Set CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT on classic compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11972
2026-04-27 09:40:47 -04:00
Brad King e0890d455d Merge topic 'sbom-use-partial-json'
72661612f4 SBOM: Use new string(JSON ... PARTIAL_EQUALS) for unit tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11967
2026-04-27 09:38:57 -04:00
Brad King 1eb5ae8111 Merge topic 'bootstrap-dead-code'
92fc9f0c3c bootstrap: remove dead code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11969
2026-04-27 09:36:32 -04:00
Brad King 0786be2b70 Merge topic 'swift-ninja-module-edges'
b6367f723b Swift/Ninja: Emit modules separately from compilation
0f20ba5b68 Ninja: Swift: Extract helpers and reorder module flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11902
2026-04-27 09:27:12 -04:00
Tyler Yankee 57444e1d3f math: Avoid FPE on INT_MIN by -1 2026-04-27 09:22:26 -04:00
Kitware Robot e35a445d6d CMake Nightly Date Stamp 2026-04-27 00:05:49 -04:00
Tyler Yankee 86dfdbee1f libarchive: Backport "Fix use of uninitialized values from Huffman table"
Backport libarchive commit `1f5454575f` (cab reader: Fix use of
uninitialized values from Huffman, 2026-04-23).

Add a fuzzing test case to expose this to dynamic analysis tools.
2026-04-26 18:25:06 -04:00
Tyler Yankee bf5512260b Tests/Fuzzing: Update link to local repro
The page has been moved.
2026-04-26 18:03:00 -04:00
Kitware Robot f1535b9d73 CMake Nightly Date Stamp 2026-04-26 00:05:06 -04:00
Kitware Robot 32c6789651 CMake Nightly Date Stamp 2026-04-25 00:05:12 -04:00
Roman Lavrov b6367f723b Swift/Ninja: Emit modules separately from compilation
Add policy CMP0215 to emit `.swiftmodule` from a dedicated `-emit-module`
build edge for importable Swift targets in the Ninja generator.
Downstream targets can begin compiling as soon as the module interface
is ready, overlapping with upstream object compilation and linking.

When CMP0215 is NEW and CMP0157 is NEW, separate module emission is
enabled by default.  The `Swift_SEPARATE_MODULE_EMISSION` target
property (initialized by the `CMAKE_Swift_SEPARATE_MODULE_EMISSION`
variable) can override this per target.

The compile edge still passes `-emit-module` so that swiftc continues
to produce `.swiftdoc`; only the `.swiftmodule` output moves to the new
edge.

Also fix swiftmodule dependency edges in cmNinjaNormalTargetGenerator
to use IsLanguageUsed instead of GetLinkerLanguage, so C/C++ targets
whose linker language propagated to Swift do not produce spurious
implicit dependencies.

Closes: #27748
2026-04-24 15:58:18 -04:00
Matthew Woehlke 135fd16e29 Diagnostics: Fix order in which presets are applied
Rewrite the function that updates the diagnostic state from presets to
apply all modifications concurrently. Previously, we applied all
warnings, then all errors, which (because changes are recursive) could
result in an enabled error for a parent diagnostic overriding a disabled
warning for a child diagnostic.
2026-04-24 15:52:18 -04:00
Tyler Yankee 703eaf5ca2 Tests/instrumentation: Simplify some conditionals 2026-04-24 14:24:54 -04:00