Commit Graph
39732 Commits
Author SHA1 Message Date
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
Kitware Robot 6e2614aae3 CMake Nightly Date Stamp 2026-06-23 00:05:17 -04:00
Brad King dfd1cf8d87 Merge topic 'import-std-refactor'
42d2d63235 c++modules: Copy props from BMI consumers more correctly
6d3e9d8220 c++modules: single import std target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !12193
2026-06-22 18:21:02 -04:00
Brad King 71765609dc Merge topic 'instrumentation-interrupt'
b5c03bdef4 Source: Restore compilation on FreeBSD

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12196
2026-06-22 12:19:40 -04:00
Kitware Robot ee0198b4b2 CMake Nightly Date Stamp 2026-06-22 00:05:26 -04:00
Kitware Robot 088aef1e68 CMake Nightly Date Stamp 2026-06-21 00:05:24 -04:00
Kitware Robot c23eb2171a CMake Nightly Date Stamp 2026-06-20 00:05:43 -04:00
Brad King b5c03bdef4 Source: Restore compilation on FreeBSD
Since commit bda67b82e7 (instrumentation: Write cmakeBuild snippet when
build is interrupted, 2026-06-15) compilation on FreeBSD fails with:

    error: use of undeclared identifier 'isascii'

Follow our pattern from `cmTimestamp.cxx` to make `isascii` available.
2026-06-19 11:26:17 -04:00
Brad King e6e3d728e9 Merge topic 'instrumentation-interrupt'
bda67b82e7 instrumentation: Write cmakeBuild snippet when build is interrupted
b801e7c78d instrumentation: Bump data version to 1.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !12154
2026-06-19 10:02:06 -04:00
Vito Gamberini 42d2d63235 c++modules: Copy props from BMI consumers more correctly
Fixes: #27891
2026-06-19 09:23:38 -04:00
Kitware Robot 10c06c127c CMake Nightly Date Stamp 2026-06-19 00:05:26 -04:00
Vito Gamberini 6d3e9d8220 c++modules: single import std target 2026-06-18 15:20:54 -04:00
Brad King 258f92379f Merge topic 'xcode-deterministic-product-file-reference-uuids'
2cc75c6072 Xcode: Use deterministic object ids for product file references

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12185
2026-06-18 11:20:18 -04:00
Brad King 2f27812939 Merge topic 'ninja-BUILDING_INTRINSIC_MODULES'
0e142193ac Ninja: Honor Fortran_BUILDING_INTRINSIC_MODULES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12186
2026-06-18 11:17:28 -04:00
Brad King 9b4a48e48d Merge topic 'pvs-fixes'
e2f4b9bedc pvs-studio: (V522) Prevent possible null-pointer dereference in RemoveRPathELF
77b874baa8 pvs-studio: (V1086) Fix buffer writes
a77b7aa836 pvs-studio: (V557) Harden array boundary checks
7217af55da pvs-studio: (V555) Clarify size_type comparison

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !12077
2026-06-18 11:16:07 -04:00
Brad King 0060cb72e8 Merge topic 'function-argnc'
82c9d33e96 function: Set variable ARGNC
d14d0b0b23 function: Change arguments documentation to a definition list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12173
2026-06-18 11:14:48 -04:00
Brad King edb85664e2 Merge topic 'file-archive-create-patterns-exclude'
9800bd2098 file(ARCHIVE_CREATE): Add PATTERNS_EXCLUDE option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12179
2026-06-18 11:13:03 -04:00
Brad King fcc9b7779b Merge topic 'spdx_license'
b533f229b8 cmSbom: Generate SPDX data denoting project licenses

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12133
2026-06-18 11:11:29 -04:00
Daksh Mamodiya bda67b82e7 instrumentation: Write cmakeBuild snippet when build is interrupted
The overall `cmakeBuild` snippet is written only after the native build
tool returns, so interrupting `cmake --build` with Ctrl+C terminated CMake
before it was recorded and lost the build's delineation.

When instrumentation is active, install a scoped, async-signal-safe handler
(POSIX SIGINT; Windows CTRL_C/CTRL_BREAK) that just flags the interrupt. The
existing write then runs during unwind, records the interrupting signal in a
new `interruptSignal` field, skips the post-build index hook, and re-raises so
the exit status still reflects the signal.

The handler lives in its own translation unit, keeping the platform-divergent
signal code out of the main instrumentation implementation.

Issue: #27859
2026-06-18 15:38:43 +02:00
Kitware Robot 2f42f6f2b1 CMake Nightly Date Stamp 2026-06-18 00:05:31 -04:00
Daksh Mamodiya b801e7c78d instrumentation: Bump data version to 1.2
Raise the maximum supported data version and the version CMake writes in
its snippet files from 1.1 to 1.2.
2026-06-17 18:24:25 +02:00
Brad King d9c35d02bb CMake 4.4.0-rc2 2026-06-17 11:09:19 -04:00
Michael Kruse 0e142193ac Ninja: Honor Fortran_BUILDING_INTRINSIC_MODULES
In commit b65930a7a7 (Fortran: Add Fortran_BUILDING_INTRINSIC_MODULES
for building intrinsics, 2025-01-09, v4.0.0-rc1~223^2) we only
implemented the property for the Makefile generators.  Implement it
for the Ninja generators too.

Fixes: #26803
2026-06-17 10:47:10 -04:00
Martin Duffy e2f4b9bedc pvs-studio: (V522) Prevent possible null-pointer dereference in RemoveRPathELF 2026-06-17 10:13:12 -04:00
Martin Duffy 77b874baa8 pvs-studio: (V1086) Fix buffer writes
Replace space-filling memset calls with bounded character initialization that
preserves null termination for the curses help text buffers.
2026-06-17 10:13:03 -04:00
lapfelix 2cc75c6072 Xcode: Use deterministic object ids for product file references
Follow-up commit 1fa2ec1bbd (Xcode: Use deterministic object ids for
targets, 2024-04-04, v3.30.0-rc1~263^2).  Each target's product
PBXFileReference (the libfoo.a / foo entries under the Products group)
was created with a random object id on every regeneration.  When a
CMake-generated Xcode project is embedded in another Xcode project, that
parent keeps the product reference's id in its remoteGlobalIDString; a
random id means the reference no longer resolves and the link falls back
to a bare `-l` flag (e.g. `ld: library 'foo' not found`).

Derive the product PBXFileReference id from the target name and the
build-tree-relative product path, the same hashing path already used for
the target object id.  The id is now stable across regenerations and
independent of the absolute build tree location.
2026-06-17 09:59:31 -04:00
Brad King 21769c177b Merge topic 'if-diagnostic'
597c573d7d if: Add `DIAGNOSTIC <category>` condition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12181
2026-06-17 08:54:50 -04:00
Brad King d20e909f3d Merge topic 'if-diagnostic' into release-4.4
597c573d7d if: Add `DIAGNOSTIC <category>` condition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12181
2026-06-17 08:54:47 -04:00
Brad King 6b902b1cd9 Merge topic 'fix-cps-requires-crash'
01f8d249bf CPS: Fix crash when package `requires` isn't an object

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12182
2026-06-17 08:49:13 -04:00
Brad King 7450dc05ae Merge topic 'fix-cps-requires-crash' into release-4.4
01f8d249bf CPS: Fix crash when package `requires` isn't an object

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12182
2026-06-17 08:49:09 -04:00
Kitware Robot 365c7d6af8 CMake Nightly Date Stamp 2026-06-17 00:05:57 -04:00
Martin Duffy a77b7aa836 pvs-studio: (V557) Harden array boundary checks
Tighten array boundary checks to prevent possible overrun.
2026-06-16 17:16:32 -04:00
Martin Duffy 7217af55da pvs-studio: (V555) Clarify size_type comparison
The expression 'r - l > 0' implies a sign to r and l that does not exist.
2026-06-16 17:16:32 -04:00
Matthew Woehlke 597c573d7d if: Add DIAGNOSTIC <category> condition
Add an existence check to the `if` command for diagnostic categories,
mirroring the check for policies. Aside from being desirable for
consistency's sake, this will make it easier for users to write logic to
manipulate diagnostics from newer versions of CMake that don't exist
today.
2026-06-16 15:14:13 -04:00
Matthew Woehlke 01f8d249bf CPS: Fix crash when package requires isn't an object
Check whether a package `requires` is actually an object before trying
to iterate over it.
2026-06-16 15:03:05 -04:00
Brad King 906c000f0c Merge topic 'ctest_propagate_site_buildname'
433721b7a7 ctest: Pass CTEST_SITE/CTEST_BUILD_NAME to configure step

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12176
2026-06-16 10:26:48 -04:00
Brad King 35128a5186 Merge topic 'ctest_propagate_site_buildname' into release-4.4
433721b7a7 ctest: Pass CTEST_SITE/CTEST_BUILD_NAME to configure step

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12176
2026-06-16 10:26:46 -04:00
Brad King 6e71816f9e Merge topic 'extract-tar-resource-leak-path'
c31361d089 file(ARCHIVE_EXTRACT): Fix resource leaks on error paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12174
2026-06-16 10:21:52 -04:00
Brad King b9a8b78822 Merge topic 'extract-tar-resource-leak-path' into release-4.4
c31361d089 file(ARCHIVE_EXTRACT): Fix resource leaks on error paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12174
2026-06-16 10:21:50 -04:00
Daksh Mamodiya 9800bd2098 file(ARCHIVE_CREATE): Add PATTERNS_EXCLUDE option
Exclude files and directories matching the given patterns while creating
an archive, using libarchive's matcher for parity with file(ARCHIVE_EXTRACT).

Fixes: #27877.
2026-06-16 15:33:06 +02:00
Kitware Robot 6f7584e5e1 CMake Nightly Date Stamp 2026-06-16 00:08:02 -04:00
Daniel Tierney b533f229b8 cmSbom: Generate SPDX data denoting project licenses 2026-06-15 14:40:26 -04:00
Arha Gatram 82c9d33e96 function: Set variable ARGNC 2026-06-15 10:54:48 -07:00
Daksh Mamodiya c31361d089 file(ARCHIVE_EXTRACT): Fix resource leaks on error paths
extract_tar() allocates archive_read, archive_write_disk, and
archive_match handles, but several early-return error paths did not free
them. Most notably, a PATTERNS entry matching nothing leaked all three
handles on every call, which accumulates inside a long-running
configure.

Scope the three handles with std::unique_ptr custom deleters so every
return path releases them automatically.  std::unique_ptr does not
invoke the deleter for a null pointer, and the libarchive *_free
functions are themselves no-ops on null, so no explicit guarding is
required.  archive_read_free()/archive_write_free() implicitly close the
handle if needed, matching the previous behavior.

Fixes: #27872
2026-06-15 11:47:24 -04:00
Zack Galbreath 433721b7a7 ctest: Pass CTEST_SITE/CTEST_BUILD_NAME to configure step
When performing the configure step in dashboard client mode, propagate
`CTEST_SITE` and `CTEST_BUILD_NAME` as the `SITE` and `BUILDNAME`
respective cache variables.

This causes the values recorded in `DartConfiguration.tcl` to match those
specified by the user, allowing subsequent ctest calls to reuse them
automatically.
2026-06-15 10:56:11 -04:00
Brad King 63d2c144f2 Merge topic 'export-diagnostic-context'
a557231285 Exports: Capture context for diagnostics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12166
2026-06-15 10:35:30 -04:00
Brad King 57cdfc193d Merge topic 'export-diagnostic-context' into release-4.4
a557231285 Exports: Capture context for diagnostics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12166
2026-06-15 10:35:28 -04:00
Brad King ec22dd0de3 Merge topic 'ctest_configure_preset_binarydir'
3b6247a148 ctest: Honor preset binaryDir for initial configuration

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12167
2026-06-15 10:23:55 -04:00
Kitware Robot 58feae0b09 CMake Nightly Date Stamp 2026-06-15 00:05:17 -04:00