Commit Graph

72510 Commits

Author SHA1 Message Date
Brad King 65e043ce93 Merge topic 'instrumentation-after-file-api'
f6714b8949 instrumentation: Trigger PostGenerate hook after FileApi replies are written

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11261
2025-09-30 10:07:10 -04:00
Brad King ec0cf06316 Merge topic 'instrumentation-always-record-build'
e730008d7e instrumentation: Record build snippets regardless of hooks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11255
2025-09-30 10:05:02 -04:00
Brad King 85fb53f07a Merge topic 'test-gnu-as'
ab8b26b513 Tests: Fix regex matching path to GNU assembler tool

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11263
2025-09-30 10:03:38 -04:00
Tyler Yankee f029bd04bf instrumentation: Write trace file incrementally
Periodically clearing the output stream buffer saves on memory usage
for large traces.
2025-09-30 10:00:39 -04:00
Tyler Yankee 0882a37f73 instrumentation: Load snippets individually for trace
Only loading the necessary timing data and deferring the dump of all
snippet data into the trace file saves on memory for large traces.
2025-09-30 10:00:37 -04:00
Brad King 813e817105 Merge branch 'release-4.1' 2025-09-30 09:59:09 -04:00
Brad King 7d551a5d6b Merge topic 'genex-transitive-link-libraries'
e0bbe79cea CMP0189: Restore support for linking `$<TARGET_PROPERTY:tgt,LINK_LIBRARIES>`
cb69f750bf cmGeneratorTarget: Factor out helper to detect LINK_LIBRARIES evaluation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11262
2025-09-30 09:59:09 -04:00
Brad King aec52661a3 Merge topic 'genex-transitive-link-libraries' into release-4.1
e0bbe79cea CMP0189: Restore support for linking `$<TARGET_PROPERTY:tgt,LINK_LIBRARIES>`
cb69f750bf cmGeneratorTarget: Factor out helper to detect LINK_LIBRARIES evaluation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11262
2025-09-30 09:59:07 -04:00
Brad King c6934e0928 Merge topic 'vs-sdk-style-platform-override'
4ebedf246d VS: Fix SLNs for DOTNET_SDK targets with VS_GLOBAL_PlatformTarget

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Steven Boswell <ulatekh@yahoo.com>
Merge-request: !11247
2025-09-30 09:57:09 -04:00
Brad King d6e6facc51 Merge topic 'vs-sln'
4747b64fff VS: Restore include_external_msproject type detection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11266
2025-09-30 09:45:02 -04:00
Brad King 6b5877a176 libarchive: Backport "parse_date: handle dates in 2038 and beyond"
Backport libarchive commit `2d987e725f` (parse_date: handle dates in
2038 and beyond if time_t is big enough, 2025-09-26).

Add a cmake-specific test case.

Fixes: #27263
2025-09-30 09:36:08 -04:00
Kitware Robot 424f0570f1 CMake Nightly Date Stamp 2025-09-30 00:04:56 -04:00
Craig Scott 2f653056af presets: Detect abnormal termination of workflow step commands
If the command for a step (cmake, ctest, or cpack) terminates abnormally,
libuv sets the exit code to 0 and reports the process termination signal
in a separate struct member. That carries through to the structure we use
to track the process and ultimately give back to the workflow step loop.
Don't rely on the exit code alone to test for failure, also check for spawning
errors and abnormal termination too.

Fixes: #27273
2025-09-30 13:04:48 +10:00
AJIOB 83bbde5449 MSVC: Define _WINDLL consistently for shared libraries
Visual Studio defines this automatically for `.dll` targets.
For consistency, define it when compiling for the MSVC ABI
with other generators.  Add policy CMP0203 for compatibility.

Fixes: #27253
2025-09-29 18:26:44 -04:00
AJIOB 206fcbb392 Tests/RunCMake/FileAPI: Fix whitespace in codemodel-v2 expectation data 2025-09-29 18:08:04 -04:00
Eduard Voronkin 05360d19e9 FASTBuild: fix use-after-move
Since order of parameters' evaluation
is unspecified in C++, it might happen that
we move `val` before we call `substt()`.
2025-09-29 14:48:46 -07:00
Brad King 4747b64fff VS: Restore include_external_msproject type detection
Refactoring in commit 3882718872 (VS: Decouple solution generation from
`.sln` file format, 2025-09-15) accidentally left out automatic
detection of the external project type id from its file extension.
2025-09-29 16:47:46 -04:00
Eduard Voronkin c4369b81aa FASTBuild: fix paths' comparison on Windows
On Windows we might have different slashes,
so ` if (binDir == converted)` will not work
even for semantically equivalent directories.
2025-09-29 13:13:57 -07:00
Brad King a562072eb1 ci: Add valgrind to Fedora base image
Make it available for a `ctest_memcheck` step in CI, or for a test
case of `ctest` itself.
2025-09-29 15:53:34 -04:00
Jelle 4ebedf246d VS: Fix SLNs for DOTNET_SDK targets with VS_GLOBAL_PlatformTarget
By default, .NET SDK-style projects build for "Any CPU", so we generate
solution files accordingly.  Although CMake does not model per-target
architectures, some projects set the `VS_GLOBAL_PlatformTarget` property
on `DOTNET_SDK` targets in order to compile for a specific architecture.
Fix generated solution files to account for the architecture override.

Issue: #23513
2025-09-29 12:25:01 -04:00
Ben Boeckel da4a1ec2ff gitlab-ci: add support for running gcov-based coverage 2025-09-29 11:11:07 -04:00
Ben Boeckel 61aed5e5f2 CTestCustom: ignore coverage results from coverage tests 2025-09-29 11:11:07 -04:00
Ben Boeckel 7191d72acd Tests/EnforceConfig: clear the CMAKE_BUILD_TYPE environment variable
Some tests want to test the config-less build type (at least
`Tests/RunCMake/add_custom_command@WorkingDirectory`).
2025-09-29 11:11:06 -04:00
Brad King ab8b26b513 Tests: Fix regex matching path to GNU assembler tool
The tool may be named `$target-as` instead of just `as`.
2025-09-29 10:54:50 -04:00
Brad King e0bbe79cea CMP0189: Restore support for linking $<TARGET_PROPERTY:tgt,LINK_LIBRARIES>
In general we disallow references to transitive target properties, such
as `COMPILE_DEFINITIONS`, in `[INTERFACE_]LINK_LIBRARIES` properties,
because the latter establish the transitivity itself.  Prior to CMP0189,
the `[INTERFACE_]LINK_LIBRARIES` properties were not themselves transitive
in `$<TARGET_PROPERTY>` expressions, so existing projects have code like

    target_link_libraries(foo PRIVATE "$<TARGET_PROPERTY:tgt,LINK_LIBRARIES>")

Policy CMP0189's NEW behavior, introduced by commit b3da9c6d60 (GenEx:
Evaluate LINK_LIBRARIES target properties transitively, 2025-02-24,
v4.1.0-rc1~731^2), makes `$<TARGET_PROPERTY:tgt,LINK_LIBRARIES>`
transitive, causing the above to be rejected.  Since evaluation of a
target's link libraries can already encounter and handle other targets'
link libraries, allow it in this case.

Fixes: #27265
2025-09-29 10:51:01 -04:00
Martin Duffy f6714b8949 instrumentation: Trigger PostGenerate hook after FileApi replies are written
Fixes: #27268
2025-09-29 09:43:53 -04:00
Brad King cca334aa26 Merge topic 'update-libarchive'
ff95dc7f44 libarchive: Set build options the way we need for CMake
3f00851b3e libarchive: Add missing cm3p prefixes on includes
4e5c2aadb1 libarchive: Rename cm_get_date wrapper to cm_parse_date
cf04a5cf27 Merge branch 'upstream-LibArchive' into update-libarchive
bb6def24fe LibArchive 2025-06-01 (9525f90c)
b2c42d8207 libarchive: Update script to get 3.8.1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11258
2025-09-29 09:27:58 -04:00
Brad King 093cb74cd1 Merge topic 'tutorial-markup'
fcc2800f64 Tutorial: text not correctly rendered

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11256
2025-09-29 09:26:01 -04:00
Brad King c3b65c19ba Merge topic 'gtest-discover-tests-cleanup'
d86da0af70 GoogleTest: cleanup file generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11254
2025-09-29 09:24:43 -04:00
Brad King 5291c17310 Merge topic 'instrumentation-load-null'
11f67d416a instrumentation: Use null when CPU load is unknown

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11248
2025-09-29 09:23:03 -04:00
Brad King e49de5d5d6 Merge topic 'fileapi-interface-and-imported-targets'
b626843d71 fileAPI: Output all INTERFACE and IMPORTED targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11232
2025-09-29 09:21:45 -04:00
Kitware Robot b630fdb0b2 CMake Nightly Date Stamp 2025-09-29 00:07:50 -04:00
Darryl Pogue e97fdf7d9a Xcode: Support new Icon Composer .icon resources
These are a new type of resource folder (treated as a file) similar to
xcassets, supported in Xcode 26 to provide application icons.
2025-09-28 01:45:56 -07:00
Kitware Robot 05a3f4a30d CMake Nightly Date Stamp 2025-09-28 00:04:54 -04:00
Kitware Robot a17bf203df CMake Nightly Date Stamp 2025-09-27 00:04:32 -04:00
Brad King cb69f750bf cmGeneratorTarget: Factor out helper to detect LINK_LIBRARIES evaluation 2025-09-26 17:41:41 -04:00
Brad King ff95dc7f44 libarchive: Set build options the way we need for CMake 2025-09-26 16:42:58 -04:00
Brad King 3f00851b3e libarchive: Add missing cm3p prefixes on includes
Issue: #20666
2025-09-26 16:40:31 -04:00
Brad King 4e5c2aadb1 libarchive: Rename cm_get_date wrapper to cm_parse_date
libarchive 3.8.0 renamed `__archive_get_date` to `archive_parse_date`.
2025-09-26 16:40:12 -04:00
Brad King cf04a5cf27 Merge branch 'upstream-LibArchive' into update-libarchive
* upstream-LibArchive:
  LibArchive 2025-06-01 (9525f90c)
2025-09-26 16:21:21 -04:00
LibArchive Upstream bb6def24fe LibArchive 2025-06-01 (9525f90c)
Code extracted from:

    https://github.com/libarchive/libarchive.git

at commit 9525f90ca4bd14c7b335e2f8c84a4607b0af6bdf (v3.8.1).
2025-09-26 16:18:56 -04:00
Brad King b2c42d8207 libarchive: Update script to get 3.8.1 2025-09-26 16:18:46 -04:00
Martin Duffy e730008d7e instrumentation: Record build snippets regardless of hooks 2025-09-26 15:55:08 -04:00
Tyler Yankee a31e781fe8 instrumentation: Use end time for snippet file names 2025-09-26 11:44:00 -04:00
Adrien Ollier fcc2800f64 Tutorial: text not correctly rendered
There are some restrictions on backquotes markup.
One of them is it must be separated from
surrounding text by non-word characters.
2025-09-26 17:42:59 +02:00
Tyler Yankee 11f67d416a instrumentation: Use null when CPU load is unknown 2025-09-26 10:16:32 -04:00
Daniel Pfeifer d86da0af70 GoogleTest: cleanup file generation
For single config generators, don't write a file at configure time
as it will be rewritten at generation time.

For multi config generators, use `$<CONFIG>` in the output instead
of looping over `CMAKE_CONFIGURATION_TYPES`.
2025-09-26 16:03:30 +02:00
Brad King 441b1ebe75 Merge topic 'patch-found-variables'
0fedf1592c Find*: Update *_FOUND variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11220
2025-09-26 09:58:27 -04:00
Brad King bd80d21c0c Merge topic 'instrumentation-trace-names'
6929baca2f instrumentation: Fix trace event names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11250
2025-09-26 09:37:06 -04:00
Brad King 48957f9e16 Merge topic 'instrumentation-more-snippet-data'
2fdd1e787f instrumentation: Additional data in custom, install and link snippets
3db07b0189 cmInstallScriptHandler: Refactor to store config and path for each command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11241
2025-09-26 09:34:20 -04:00