Commit Graph

73529 Commits

Author SHA1 Message Date
Brad King 5f54ad41e7 cmCTestScriptHandler: De-duplicate WaitForLine call 2025-12-19 07:52:29 -05:00
Brad King 6f5bbf9ee7 cmSystemTools: Remove unused timeout argument from WaitForLine
The only call sites just retries on timeout anyway.
2025-12-19 07:52:29 -05:00
Brad King 12be5c60ff Merge topic 'cpack-stgz-deref-symlinks'
ecbe5a8479 CPack/STGZ: Avoid replacing directory symlinks if possible

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11526
2025-12-18 10:37:58 -05:00
Brad King 513b23a371 Merge branch 'release-4.2' 2025-12-18 10:36:20 -05:00
Brad King 56973b4196 Merge branch 'release-4.1' 2025-12-18 10:36:15 -05:00
Brad King a9c13c4144 Merge branch 'release-4.1' into release-4.2 2025-12-18 10:35:53 -05:00
Brad King fd1c26e370 Merge branch 'release-4.2' 2025-12-18 10:35:14 -05:00
Brad King 732beb3960 Merge topic 'doc-4.1-vs-flags'
ea357236f4 Help: Add 4.1 release note about VS link flag suppression

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11525
2025-12-18 10:35:14 -05:00
Brad King cfa16434c0 Merge topic 'doc-4.1-vs-flags' into release-4.2
ea357236f4 Help: Add 4.1 release note about VS link flag suppression

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11525
2025-12-18 10:35:12 -05:00
Brad King 54810df231 Merge topic 'doc-4.1-vs-flags' into release-4.1
ea357236f4 Help: Add 4.1 release note about VS link flag suppression

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11525
2025-12-18 10:34:30 -05:00
Brad King 3ae02143d6 Merge branch 'release-4.2' 2025-12-18 10:30:20 -05:00
Brad King 756c0757b2 Merge topic 'vs-link-defaults'
46e59b5168 Merge branch 'backport-vs-link-defaults' into vs-link-defaults
b6defd96c9 VS: Restore subsystem link flag for DLLs
91b9db90e5 VS: Restore subsystem link flag for DLLs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Overchenko <aleksandr9809@gmail.com>
Merge-request: !11524
2025-12-18 10:30:20 -05:00
Brad King 625ce16244 Merge topic 'vs-link-defaults' into release-4.2
46e59b5168 Merge branch 'backport-vs-link-defaults' into vs-link-defaults
b6defd96c9 VS: Restore subsystem link flag for DLLs
91b9db90e5 VS: Restore subsystem link flag for DLLs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Overchenko <aleksandr9809@gmail.com>
Merge-request: !11524
2025-12-18 10:30:18 -05:00
Brad King ff98528f42 Merge topic 'backport-vs-link-defaults' into release-4.1
91b9db90e5 VS: Restore subsystem link flag for DLLs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11524
2025-12-18 10:29:21 -05:00
Brad King da84370cff Merge topic 'sbom-export-generators'
8ec5a595cd cmSbom: Add documentation for `install(SBOM)` and `export(SBOM)`
83671f2d87 cmSbom: Add `export(SBOM)` build generators and unit tests
f2027a886b cmSbom: Add `install(SBOM)` generator and unit tests
dcadde3662 CPS: Refactor ForbidGeneratorExpressions into cmGeneratorExpression
bcb6f689a4 cmExportInstallFileGenerator: Allow overriding of CheckInterfaceDirs
6d6c37c90d cmPackageInfoArguments: Extract common values
8c6676b2ea cmFindPackage: Fix PACKAGE_VERSION not being set when rebuilding

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11396
2025-12-18 10:13:32 -05:00
Brad King 7d443bba11 Merge topic 'cmake-build-entrypoint-refactor'
c71e3abbad cmake --build: Factor out a struct holding build parameters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11473
2025-12-18 10:09:40 -05:00
Brad King fa755dbfc0 Merge topic 'sunos-curses-macros'
de91859711 ccmake: Suppress curses macros on Solaris that conflict with C++ std APIs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11523
2025-12-18 10:06:40 -05:00
Brad King 3d0b2ec54d Merge topic 'file-ARCHIVE_CREATE-compression'
e347176424 file(ARCHIVE_CREATE): Add controls for zip and 7z compression method/level

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11522
2025-12-18 10:02:18 -05:00
Brad King 9e024ac92c Merge topic 'cpack-deb-compression-level'
07fe3f95ce CPack/DEB: Add CPACK_DEBIAN_COMPRESSION_LEVEL variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: imadcap <imad.ayad@capgemini.com>
Acked-by: Kevin Barre <kevin.barre@epitech.eu>
Acked-by: Alex Overchenko <aleksandr9809@gmail.com>
Merge-request: !11352
2025-12-18 09:58:13 -05:00
Kitware Robot 4afb749261 CMake Nightly Date Stamp 2025-12-18 00:07:50 -05:00
Brad King 46e59b5168 Merge branch 'backport-vs-link-defaults' into vs-link-defaults 2025-12-17 17:42:10 -05:00
Brad King b6defd96c9 VS: Restore subsystem link flag for DLLs
In commit 99d09ec45a (VS: Suppress MSBuild default link flags not
specified by project or user, 2025-06-17, v4.1.0-rc1~6^2) we removed our
default `-subsystem:...` link flag from `SHARED` and `MODULE` libraries
in Visual Studio generators for consistency with command-line generators.
However, unlike other flag suppressions for #27004, this change did not
just suppress MSBuild defaults, but actually changed flags the generator
was previously adding itself.

For the linker subsystem flag, consistency across generators should
perhaps achieved by adding the flag in other generators instead of
removing it from Visual Studio generators.  Restore the previous
behavior pending further investigation.

Issue: #27466
Fixes: #27464
2025-12-17 17:41:36 -05:00
Brad King 91b9db90e5 VS: Restore subsystem link flag for DLLs
In commit 99d09ec45a (VS: Suppress MSBuild default link flags not
specified by project or user, 2025-06-17, v4.1.0-rc1~6^2) we removed our
default `-subsystem:...` link flag from `SHARED` and `MODULE` libraries
in Visual Studio generators for consistency with command-line generators.
However, unlike other flag suppressions for #27004, this change did not
just suppress MSBuild defaults, but actually changed flags the generator
was previously adding itself.

For the linker subsystem flag, consistency across generators should
perhaps achieved by adding the flag in other generators instead of
removing it from Visual Studio generators.  Restore the previous
behavior pending further investigation.

Issue: #27466
Fixes: #27464
2025-12-17 17:41:17 -05:00
Brad King ecbe5a8479 CPack/STGZ: Avoid replacing directory symlinks if possible
When installing into a prefix with existing directory symlinks, tell
`tar` not to replace them with real directories from the package.

Fixes: #21119
2025-12-17 17:33:23 -05:00
Brad King ea357236f4 Help: Add 4.1 release note about VS link flag suppression
Document link flags suppressed by commit 99d09ec45a (VS: Suppress
MSBuild default link flags not specified by project or user, 2025-06-17,
v4.1.0-rc1~6^2).  Leave out `-subsystem` because that's being reverted
by another commit.

Issue: #27004
Issue: #27464
2025-12-17 16:58:30 -05:00
AJIOB e347176424 file(ARCHIVE_CREATE): Add controls for zip and 7z compression method/level
Fixes: #27463
2025-12-17 14:38:30 -05:00
Taylor Sasser 8ec5a595cd cmSbom: Add documentation for install(SBOM) and export(SBOM) 2025-12-17 14:35:12 -05:00
Taylor Sasser 83671f2d87 cmSbom: Add export(SBOM) build generators and unit tests 2025-12-17 14:35:12 -05:00
Taylor Sasser f2027a886b cmSbom: Add install(SBOM) generator and unit tests 2025-12-17 14:33:34 -05:00
Kevin Barre 07fe3f95ce CPack/DEB: Add CPACK_DEBIAN_COMPRESSION_LEVEL variable
Add a new variable `CPACK_DEBIAN_COMPRESSION_LEVEL` to control the compression
level used when generating Debian packages. This complements the existing
`CPACK_DEBIAN_COMPRESSION_TYPE` variable and allows finer control over the
compression performance vs. size trade-off. Supported values correspond to
the compression level accepted by the underlying compressor (e.g. gzip, xz,
zstd, etc.).
2025-12-17 14:27:10 -05:00
Brad King 70dcdffb1f Merge topic 'instrumentation-test-cleanup'
0b06a4cbbe instrumentation: Cleanup for RunCMake tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11518
2025-12-17 14:13:01 -05:00
Brad King 292f6fc360 Merge topic 'cpack-7z-zip-algorithms'
3db6cce657 cpack: 7z & zip supports compression algorithms
1e4b829279 cpack: restore broken archive compression methods

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11513
2025-12-17 14:11:52 -05:00
Brad King c4a14e9b08 Merge topic 'file-LOCK-truncation'
8ada1bcf8c file(LOCK): Avoid truncating existing files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11514
2025-12-17 13:56:20 -05:00
Leslie P. Polzer 8ada1bcf8c file(LOCK): Avoid truncating existing files
Previously the command opened the lock file using fopen with "w" mode,
which truncates the file to zero length. This is unsafe because:

1. If the lock file path is a symlink, the target file gets truncated
2. Race conditions between path resolution and file opening can be
   exploited to truncate arbitrary files

An attacker can exploit this by creating a symlink at a predictable
lock file location pointing to a critical file (e.g., source files,
configuration, or system files). When cmake runs file(LOCK), it
follows the symlink and destroys the target file's contents.

Fix by changing the file mode from "w" (write/truncate) to "a"
(append). This creates the file if it doesn't exist but preserves
existing content, preventing data destruction attacks.
2025-12-17 13:49:41 -05:00
Brad King 9efc8d8d4b Merge topic 'preset-doc-version'
70b95bd580 Help/presets: Add changelog

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Overchenko <aleksandr9809@gmail.com>
Merge-request: !11510
2025-12-17 13:36:41 -05:00
Brad King 2faa0ae303 Merge topic 'string-json-improvements'
1eb5ea3a64 Help(string(JSON)): Clarify that some modes can have zero members/indices
06e6f1e69f string(JSON): Add STRING_ENCODE mode
15973ff247 string(JSON): Add GET_RAW mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11516
2025-12-17 13:34:20 -05:00
Brad King e41a8e0f26 Merge topic 'ci-sign-macos'
0420c3a1ad ci: Extend packaging pipeline to sign macOS binaries automatically
0db6455354 Utilities/Release: Teach macOS signing script to find credentials in CI env
700a44612d Utilities/Release: Teach macOS signing script to find identity automatically
1a87ceae63 Utilities/Release: Teach macOS signing script to use custom keychain
cc198e5f52 Utilities/Release: Drop deprecated codesign flag from macOS signing script
b513b8e180 Utilities/Release: Enforce macOS signing script arguments later
61b40cf569 Utilities/Release: Clarify macOS signing script options
3c20441554 Utilities/Release: Comment macOS signing script steps

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11520
2025-12-17 13:32:05 -05:00
Brad King 57d7b25c20 Merge topic 'ci-linkcheck'
8853eb3675 ci: Do not linkcheck www.freedesktop.org URLs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11515
2025-12-17 13:30:31 -05:00
Brad King f5ddf7d8da Merge topic 'test-RunCPack'
3b8f32c60a Tests: Add RunCMake.CPack_{DEB,RPM} cases using RunCPack infrastructure
76249af81e Tests: Comment where RunCPack keeps sample projects for `RunCMake.CPack_*`
422d624764 Tests: Add option to enable CPack RPM generator tests explicitly
73aa35427b Tests: Add option to enable CPack DEB generator tests explicitly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11512
2025-12-17 13:28:13 -05:00
William Allen c71e3abbad cmake --build: Factor out a struct holding build parameters
This commit extracts the set of parameters required to build a CMake
project into a dedicated class.  While this class is currently just a
wrapper for the data, the goal is to eventually implement a validate()
method which verifies that a given configuration contains the minimum
set of information required to execute a build, and that any optional
options are compatible with one another.
2025-12-17 10:56:18 -05:00
Brad King de91859711 ccmake: Suppress curses macros on Solaris that conflict with C++ std APIs
Also revert previous workarounds from

* commit 3b7be02480 (ccmake: Fix compilation with ncurses on Solaris,
                     2018-03-20, v3.12.0-rc1~335^2), and
* commit 572e5146f8 (define hacks and such for the dec compiler,
                     2001-11-20, v2.4.0~6229)
2025-12-17 10:55:10 -05:00
Kitware Robot ce1282e2f7 CMake Nightly Date Stamp 2025-12-17 00:07:29 -05:00
Brad King 0420c3a1ad ci: Extend packaging pipeline to sign macOS binaries automatically
Add signing and notarization on macOS in a dedicated job that runs with
access to a code signing certificate and notarization credentials.
2025-12-16 17:55:13 -05:00
Brad King 0db6455354 Utilities/Release: Teach macOS signing script to find credentials in CI env 2025-12-16 17:53:42 -05:00
Brad King 700a44612d Utilities/Release: Teach macOS signing script to find identity automatically 2025-12-16 17:53:42 -05:00
Brad King 1a87ceae63 Utilities/Release: Teach macOS signing script to use custom keychain 2025-12-16 17:53:42 -05:00
Brad King cc198e5f52 Utilities/Release: Drop deprecated codesign flag from macOS signing script
The `--deep` flag is deprecated by `codesign`.  We explicitly
sign frameworks and plugins, so it is unnecessary anyway.
2025-12-16 17:53:42 -05:00
Brad King b513b8e180 Utilities/Release: Enforce macOS signing script arguments later
Make room for alternative sources of information.
2025-12-16 17:53:42 -05:00
Brad King 61b40cf569 Utilities/Release: Clarify macOS signing script options 2025-12-16 17:53:42 -05:00
Brad King 3c20441554 Utilities/Release: Comment macOS signing script steps 2025-12-16 17:53:42 -05:00