Commit Graph

13023 Commits

Author SHA1 Message Date
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
Brad King 28bab611c6 Tests: Add RunCMake.Emscripten case for a shared library 2025-09-17 19:43:36 -04:00
Brad King d3e9c7bf8a Tests: Clarify RunCMake.Emscripten case names 2025-09-17 19:41:16 -04:00
Ben Boeckel 1980e47192 Tests/IntermediateDirStrategy: test install paths when using SHORT
See: #27233
2025-09-17 14:23:15 -04:00
Eduard Voronkin 99839d1158 FASTBuild: expose more options
Expose more options for compiler configuration as well as adding unit test
2025-09-17 10:49:27 -07:00
Vito Gamberini b2e3e3e30e Tutorial: Rewrite using conventions enabled by CMake 3.23
This is a full re-write of the CMake Tutorial for CMake 3.23, both
the functionality it provides, as well as the modern workflows that
developers use when interfacing with CMake.

Issue: #22663, #23086, #23799, #26053, #26105, #26153, #26914
2025-09-17 11:57:23 -04:00
Joerg Bornemann 763aa084b0 CMP0200: Fix crash in configuration selection policy warning
The recently introduced CMP0200 warnings could lead to a crash when
encountering targets with empty configuration values. Avoid calling
substr on an empty `string_view`.

Fixes: #27204
2025-09-17 10:30:12 -04:00
Brad King 508cabc812 Merge topic 'cps-import-interface'
e23f0748d8 CPS: Import per-configuration attributes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11140
2025-09-17 10:09:06 -04:00
Brad King 1b77de4c1b Merge topic 'instrumentation-postbuild-error'
e5db41147a Tests/instrumentation: Improve error message when postBuild check fails

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11195
2025-09-17 10:07:21 -04:00
Brad King b62e751369 Merge topic 'patch-FindGit-version'
fe72a5dba2 FindGit: Add Git_VERSION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11191
2025-09-17 10:04:31 -04:00
Taylor Sasser e23f0748d8 CPS: Import per-configuration attributes 2025-09-16 10:39:24 -04:00
Brad King a66c325ec1 Merge topic 'patch-FindImageMagick-version'
032e829b23 FindImageMagick: Add ImageMagick_VERSION

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11187
2025-09-16 09:50:27 -04:00
Brad King 592297dbea Merge topic 'fix_typo_in_tests'
899172109a Tests: Fix RunCMake.CMakePresetsBuild failure message order

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11181
2025-09-16 09:48:44 -04:00
Martin Duffy e5db41147a Tests/instrumentation: Improve error message when postBuild check fails 2025-09-16 09:45:37 -04:00
Brad King e180663555 Tests/RunCMake: Move VS Solution cases from VS10Project to VSSolution 2025-09-16 09:40:58 -04:00
Brad King c4fe74ba3d Merge topic 'python-android-link'
1507491c25 FindPython: link modules against libpython on Android

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11153
2025-09-16 09:16:35 -04:00
Brad King c325904eb1 Merge topic 'vs2026'
47c784ba8a Help: Add release note for Visual Studio 18 2026 generator
cd46d8ec84 Merge branch 'backport-vs2026' into vs2026
3392b371e2 VS: Add Visual Studio 18 2026 generator
7f0883ac04 VS: Remove unused generator code
6f0d245083 VS: Fix `/dynamicdeopt` flag table entry order for v145 toolset
398ce8af72 VS: Remove `/guard:cf` from v145 link flag table
5c9085d876 VS: Remove `/MERGE` from v145 link flag table
fe5c78310c VS: Map the link `/debug` flag for v145 toolset
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11168
2025-09-16 09:00:10 -04:00
Brad King 1bdf6d2db6 Merge topic 'lfortran-0.55'
3b85cc1a8e Tests: Extend RunCMake.ParseImplicitLinkInfo for LFortran 0.55.0
7e8f76dad2 LFortran: Update flags renamed by version 0.55

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11184
2025-09-16 08:50:44 -04:00