Commit Graph

12840 Commits

Author SHA1 Message Date
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
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
Martin Duffy 4683db44a1 instrumentation: Write index files to data/index/ subdirectory 2025-09-19 11:29:03 -04:00
Brad King 2fdae375ec Merge topic 'fileapi-check-script'
bb704d0390 Tests: Refactor RunCMake.FileAPI check script to support more arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11215
2025-09-19 10:13:07 -04:00
Brad King d361bf365e Emscripten: Drop hard-coded -sMAIN_MODULE and -sSIDE_MODULE flags
These flags are only needed for builds involving shared libraries,
and can cause undesirable behavior when they are not needed.
They also have variants with values like `=2`.  For now, just require
projects to add the flags when needed so they have full control.
In the future we may be able to add an abstraction to control them,
and automatically enable them when linking to shared libraries
or creating them.

Fixes: #27232
Issue: #27240
2025-09-19 09:54:02 -04:00
Brad King 616ca13b6a Merge topic 'string-regex-quote'
798cc7010c Tests: Fix regex matching to handle paths with special characters
d94d79a909 string: Add REGEX QUOTE sub-command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11203
2025-09-19 09:32:03 -04:00
Brad King 7722ce1130 Merge topic 'vs-slnx'
e6aa7742b0 VS: Generate .slnx files for VS 2026
95c2034b32 Tests/RunCMake: Factor out sln-format check scripts
d32b78f139 cmGlobalVisualStudio7Generator: Factor out computation of path to .sln
0a17f4e996 cmVisualStudioSlnParser: Fix storage of some `.sln` parse results
54769660e1 cmake --build: Simplify MSBuild Configuration and Platform arguments
2edc497261 cmake --build: Remove unused code for VS .NET SDK style projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11205
2025-09-19 09:29:22 -04:00
Brad King 8580c6bd8d Tests: Teach RunCMake.Emscripten to tolerate emcc cache output
`emcc` may generate messages like `cache:INFO:` to stderr,
which we otherwise expect to be empty.
2025-09-19 09:21:33 -04:00
Brad King edaa6ed06a Tests: Teach RunCMake to ignore Xcode an IDERunDestination warning
On some Xcode versions, `xcodebuild` may warn:

    ... xcodebuild[...] IDERunDestination: ...

Teach RunCMake to drop such incidental lines before matching against
expected output.
2025-09-19 08:19:34 -04:00
Timo Röhling 798cc7010c Tests: Fix regex matching to handle paths with special characters
Use `string(REGEX QUOTE)` for `MATCHES` with constructed patterns.

Fixes: #27234
2025-09-18 13:27:01 -04:00
Timo Röhling d94d79a909 string: Add REGEX QUOTE sub-command
Add a command to generate a regular expression that matches an
input string literally by escaping special characters.

Fixes: #18580
2025-09-18 13:25:20 -04:00
Eduard Voronkin 23fd5703ad FASTBuild: add support for Unity builds 2025-09-18 09:40:55 -07:00
Brad King e6aa7742b0 VS: Generate .slnx files for VS 2026
Since the `Visual Studio 18 2026` generator is new, we can switch
to the `.slnx` file format without changing behavior for users of
VS 2022 and older.

Fixes: #25887
2025-09-18 12:00:01 -04:00
Brad King 95c2034b32 Tests/RunCMake: Factor out sln-format check scripts 2025-09-18 12:00:00 -04:00
Brad King bb704d0390 Tests: Refactor RunCMake.FileAPI check script to support more arguments 2025-09-18 10:00:51 -04:00
Brad King 503ab73ee4 Merge topic 'vs-sln'
6a77c80834 cmGlobalVisualStudioGenerator: Consolidate solution generation methods
6b1c101410 cmGlobalVisualStudioGenerator: Adopt more solution generation methods
772cf917c1 cmGlobalVisualStudio71Generator: Remove this now-unnecessary class
3882718872 VS: Decouple solution generation from `.sln` file format
d67e7d2726 VS: Factor out Visual Studio `Version` enumeration
76266f9df6 cmGlobalVisualStudioGenerator: Adopt some solution generation methods
d52eb1d083 cmGlobalVisualStudioGenerator: Remove unused folder support rules
50f87b4bf2 cmGlobalGenerator: Simplify collection of targets under a project()
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11196
2025-09-18 09:06:29 -04:00
Brad King 917f8b217e Merge topic 'fbuild_more_opts'
99839d1158 FASTBuild: expose more options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11180
2025-09-18 09:03:07 -04:00
Brad King 7ddd67bd41 Merge topic 'cmp0200-warning'
763aa084b0 CMP0200: Fix crash in configuration selection policy warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11164
2025-09-18 08:52:00 -04:00
Brad King edc4e31179 Merge topic 'tutorial-3.23'
058e7da541 Tutorial: Add redirect pages for removed steps
b2e3e3e30e Tutorial: Rewrite using conventions enabled by CMake 3.23

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11097
2025-09-18 08:46:04 -04:00
Brad King baf695bfb0 Merge topic 'install-object-names-build-short'
b2ebfd7709 shortobj: properly force long names when computing long names
1980e47192 Tests/IntermediateDirStrategy: test install paths when using SHORT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11201
2025-09-18 08:36:12 -04:00
Brad King f2b2bac85d Emscripten: Detect and identify linker invoked by the compiler driver 2025-09-17 20:03:48 -04:00
Brad King 9cbeb922dd Emscripten: Enable de-duplication of libraries for CMP0156 with LLD
LLD automatically resolves newly encountered symbols using object files
previously encountered.  Also, the Emscripten compiler driver invokes
the LLD linker with `--whole-archive ... --no-whole-archive` around all
the libraries.  Therefore we should not repeat any.

Issue: #27232
Suggested-by: Marc Chevrier <marc.chevrier@gmail.com>
2025-09-17 19:44:13 -04:00