Commit Graph

12860 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Martin Duffy
e730008d7e instrumentation: Record build snippets regardless of hooks 2025-09-26 15:55:08 -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
Brad King
6e1de32c9d Merge topic 'pdb-postfix'
7a154bf4fd GenEx: Add POSTFIX option to $<TARGET_PDB_FILE_BASE_NAME>
5654207925 PDB: Always add the target per-config POSTFIX to .pdb names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11235
2025-09-26 09:26:49 -04:00
Craig Scott
b626843d71 fileAPI: Output all INTERFACE and IMPORTED targets
Fixes: #27248
2025-09-26 22:01:45 +10:00
Tyler Yankee
6929baca2f instrumentation: Fix trace event names
Amend commit 933176c2d1 (instrumentation: Rename install and custom
trace events, 2025-09-04) to remove the trailing colon for trace events
which have no name suffix.
2025-09-25 13:59:27 -04:00
Brad King
a0f4d45c52 Merge topic 'cpack-nsis-crc-check'
3c7fee0d99 CPack/NSIS: Allow setting CRCCheck

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11242
2025-09-25 09:15:12 -04:00
Brad King
3e9f777c37 Merge topic 'patch-CheckTypeSize-RESULT_VARIABLE'
1b9812f701 CheckTypeSize: Add check_type_size(RESULT_VARIABLE)
9a3ad6f663 CheckTypeSize: Move tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11185
2025-09-25 09:08:37 -04:00
Brad King
8a42714672 Merge topic 'ci-cuda-13.0'
b233e5bd05 ci: add job testing cuda13.0 with nvcc
87f60d81b9 ci: add cuda13.0 base image
72b8814f85 CUDA: Properly construct CUcontext in tests
f25982c422 CUDA: Update all tests to support NPPIF CUDA 13 deprecations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11211
2025-09-25 09:06:33 -04:00
Marc Chevrier
7a154bf4fd GenEx: Add POSTFIX option to $<TARGET_PDB_FILE_BASE_NAME>
Extend commit 0b055a8893 (GenEx: add POSTFIX option to
$<TARGET_FILE_BASE_NAME>, 2025-09-07) to cover PDB names too.
2025-09-25 11:02:44 +02:00
Marc Chevrier
5654207925 PDB: Always add the target per-config POSTFIX to .pdb names
Manage the POSTFIX target property in the same way as other artifacts
names.  Add policy CMP0202 for compatibility.

Fixes: #27206
2025-09-25 11:00:39 +02:00
Martin Duffy
2fdd1e787f instrumentation: Additional data in custom, install and link snippets
- Include `config` in all `install` and `custom` snippets
- Include `target` for `custom` snippets where applicable
- Document and test inclusion of `language` in `link` snippets

Issue: #27244
2025-09-24 16:39:09 -04:00
Daniel Pfeifer
3c7fee0d99 CPack/NSIS: Allow setting CRCCheck
Fixes: #27260
2025-09-24 19:30:27 +02:00
Brad King
60cdc353c1 Merge topic 'feat/cmake_language_TRACE'
cb07358256 cmake_language: add `TRACE` subcommand

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11229
2025-09-24 08:59:50 -04:00
Brad King
3d4c251770 Merge topic 'UseSWIG-POSTFIX-support'
2d4f3d6a6d UseSWIG: Add POSTFIX management

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11233
2025-09-24 08:57:59 -04:00
Brad King
4b9429662c Merge topic 'install-export-components'
a20e9569f1 install(PACKAGE_INFO): Record COMPONENT in global COMPONENTS list
5e7f21328c install(EXPORT_ANDROID_MK): Record COMPONENT in global COMPONENTS list
abfc07f91f install(EXPORT): Record COMPONENT in global COMPONENTS list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11226
2025-09-24 08:52:29 -04:00
Brad King
f1e883fbf2 Merge topic 'instrumentation-content-lifetime'
b8014633dc Experimental: Update the Instrumentation UUID
ba3c278da2 instrumentation: Don't remove content files older than an index
4683db44a1 instrumentation: Write index files to data/index/ subdirectory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11216
2025-09-24 08:50:42 -04:00
Brad King
26413a3e3d Merge topic 'file-GENERATE-CMP0189'
deb7b4b658 file(GENERATE): Record CMP0189 at each call site
9b862e7013 cmGeneratorTarget: Pass genex evaluation context to IsTransitiveProperty

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11234
2025-09-24 08:45:14 -04:00
Robert Maynard
72b8814f85 CUDA: Properly construct CUcontext in tests 2025-09-24 08:28:54 -04:00
Robert Maynard
f25982c422 CUDA: Update all tests to support NPPIF CUDA 13 deprecations 2025-09-24 08:28:33 -04:00
Peter Kokot
1b9812f701 CheckTypeSize: Add check_type_size(RESULT_VARIABLE)
Changes:
- Added new `RESULT_VARIABLE` keyword to enable customizing the name of
  the internal cache variable, which contains the boolean result of the
  check.
- The macro check_type_size() changed to function for easier arguments
  handling.
- Documentation synced and extended to better understand the
  check_type_size() command. Some typos fixed in the initial example.
- CheckTypeSize tests adjusted so also C++ is tested.
- Error messages slightly adjusted when checking the LANGUAGE argument.

Closes: #27202
2025-09-24 00:14:19 +02:00
Peter Kokot
9a3ad6f663 CheckTypeSize: Move tests 2025-09-24 00:13:48 +02:00
Brad King
deb7b4b658 file(GENERATE): Record CMP0189 at each call site
Policy CMP0189, introduced by commit b3da9c6d60 (GenEx: Evaluate
LINK_LIBRARIES target properties transitively, 2025-02-24,
v4.1.0-rc1~731^2), takes effect at generation time, and so uses the
policy value as of the end of each directory.  However, some projects
may rely on `file(GENERATE)` with the policy's OLD behavior in order
to extract targets' *direct* dependencies from `LINK_LIBRARIES`.
Pending a first-class solution to that problem, make it easier for
projects to port to the policy's NEW behavior in general while
retaining the OLD behavior in an isolated context.

Fixes: #27220
2025-09-23 11:30:22 -04:00
Martin Duffy
b8014633dc Experimental: Update the Instrumentation UUID
Update experimental UUID for instrumentation after commit 4683db44a1
(instrumentation: Write index files to data/index/ subdirectory, 2025-09-19)
updated the location of index files.
2025-09-23 10:59:54 -04:00
F. Pichot
a20e9569f1 install(PACKAGE_INFO): Record COMPONENT in global COMPONENTS list
Fixes: #27249
2025-09-23 10:23:37 -04:00
F. Pichot
5e7f21328c install(EXPORT_ANDROID_MK): Record COMPONENT in global COMPONENTS list
Issue: #27249
2025-09-23 10:20:21 -04:00
F. Pichot
abfc07f91f install(EXPORT): Record COMPONENT in global COMPONENTS list
Issue: #27249
2025-09-23 10:19:13 -04:00
Marc Chevrier
2d4f3d6a6d UseSWIG: Add POSTFIX management
Fixes: #27185
2025-09-23 16:01:59 +02:00
Brad King
42c1ca69e9 Merge topic 'GenEx-TARGET_FILE_BASE_NAME-POSTFIX'
0b055a8893 GenEx: add POSTFIX option to $<TARGET_FILE_BASE_NAME>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11159
2025-09-23 09:09:48 -04:00
Brad King
3730fce039 Merge topic 'fortran-scan-include-loop'
1473370df7 Fortran: Tolerate #include loops in dependency scanner

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11214
2025-09-23 09:00:49 -04:00
Alex Turbov
cb07358256 cmake_language: add TRACE subcommand
Closes 27235.
2025-09-23 03:02:03 +04:00
Marc Chevrier
0b055a8893 GenEx: add POSTFIX option to $<TARGET_FILE_BASE_NAME>
Fixes: #27189
2025-09-23 00:19:53 +02:00
Brad King
331921e7c9 Merge topic 'ci-xcode-26'
965a12cb8a ci: update macOS jobs to use Xcode 26.0
edaa6ed06a Tests: Teach RunCMake to ignore Xcode an IDERunDestination warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11209
2025-09-21 18:56:49 -04:00
Brad King
72fcfe5b36 Merge topic 'ci-xcode-26' into release-4.1
965a12cb8a ci: update macOS jobs to use Xcode 26.0
edaa6ed06a Tests: Teach RunCMake to ignore Xcode an IDERunDestination warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11209
2025-09-21 18:56:48 -04:00
Brad King
596383a4fe Merge topic 'sequential-bom'
54161c70d5 cmListFileLexer: Do not require files to be seekable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11162
2025-09-21 18:49:18 -04:00
Brad King
a5ee4344e1 Merge topic 'cmp0200-improvements'
a900e5ec9f CMP0200: "Fix" updated test for policy warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11218
2025-09-21 18:47:25 -04:00
Brad King
6b9bd675c9 Merge topic 'emscripten-platform'
d361bf365e Emscripten: Drop hard-coded -sMAIN_MODULE and -sSIDE_MODULE flags
707f14d434 Emscripten: Restore support for indirect use of emsdk toolchain file
8580c6bd8d Tests: Teach RunCMake.Emscripten to tolerate emcc cache output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11206
2025-09-21 18:27:44 -04:00
Jakub Benda
1473370df7 Fortran: Tolerate #include loops in dependency scanner
The function `cmFortranParser_FilePush` was always processing the
provided (included) file, even though it may have been processed before.
This lead to infinite recursion in cases where the include guards were
not properly interpreted, e.g. `# if !defined` instead of `#ifndef`.
This commit introduces a cache of paths to already processed files.
These files are now ignored in `cmFortranParser_FilePush` (treated as
non-existing).

Fixes: #27238
2025-09-20 13:14:48 +02:00
Matthew Woehlke
a900e5ec9f CMP0200: "Fix" updated test for policy warning
Commit 763aa084b0 (CMP0200: Fix crash in configuration selection policy
warning, 2025-09-10) fixed a bug in the CMP0200 policy warning and also
improved the test to exercise the problematic code, but did not properly
update the expected output. Add the second warning to the expected
output.
2025-09-19 15:57:00 -04:00
Sergiu Deitsch
54161c70d5 cmListFileLexer: Do not require files to be seekable
Read the BOM sequentially and store the read bytes for later use if
these do not correspond to a BOM. This allows FIFO to be used as input,
e.g., for piping input or Bash process substitution.
2025-09-19 18:02:06 +02:00
Martin Duffy
ba3c278da2 instrumentation: Don't remove content files older than an index
Prevent callbacks from referencing deleted content files by holding onto them
if any index files exist that may contain a reference.
2025-09-19 11:29:16 -04:00