Commit Graph

6766 Commits

Author SHA1 Message Date
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
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
Taylor Sasser
e23f0748d8 CPS: Import per-configuration attributes 2025-09-16 10:39:24 -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
Brad King
3b85cc1a8e Tests: Extend RunCMake.ParseImplicitLinkInfo for LFortran 0.55.0 2025-09-15 20:34:16 -04:00
Eduard Voronkin
899172109a Tests: Fix RunCMake.CMakePresetsBuild failure message order
The actual and expected content were switched.
2025-09-15 17:05:20 -04:00
Brad King
9a53a28596 Merge topic 'improve-diagnostic'
ca072e3734 cmListFileLexer: Test for broken UTF-32-(BE|LE) BOM
3b8ddf3f45 cmListFileLexer: Handle null character in the grammar
7040406f86 cmListFileLexer: Do not require null-terminated input
0a26c08004 cm/string_view: Prevent find access past string end
63328f01f8 Utilities/Scripts: Drop CommandArgument lexer/parser generation step

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11173
2025-09-15 11:42:12 -04:00
Brad King
2337bfc562 Merge topic 'cxxmodules-custom-import-std-metadata-file'
85e536b5eb gitlab-ci: test `CMAKE_CXX_STDLIB_MODULES_JSON` in CI
42621a232b Tests/CXXModules: add a label
2f101b2c8c Tests/CXXModules: support testing with custom stdlib json locations
6c178a4ae3 Tests/RunCMake: add newlines in CXXModules options
2b85541e39 cxximportstd: support setting the `import std` metadata location

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11175
2025-09-15 11:39:52 -04:00
Brad King
cd46d8ec84 Merge branch 'backport-vs2026' into vs2026 2025-09-15 11:33:57 -04:00
Brad King
3392b371e2 VS: Add Visual Studio 18 2026 generator
Closes: #27213
2025-09-15 11:31:02 -04:00
Malcolm Smith
1507491c25 FindPython: link modules against libpython on Android 2025-09-13 12:53:18 +01:00
Sergiu Deitsch
ca072e3734 cmListFileLexer: Test for broken UTF-32-(BE|LE) BOM 2025-09-12 18:28:55 +02:00
Sergiu Deitsch
3b8ddf3f45 cmListFileLexer: Handle null character in the grammar 2025-09-12 18:28:55 +02:00
Brad King
d5d02f80c0 Merge topic 'msvc-flags-fix-for-27177'
9851ddfc11 VS: Check all default suppressed MSBuild flags
7202539fd4 VS: Suppress MSBuild default flags not specified by project or user

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11165
2025-09-12 11:43:16 -04:00
Brad King
064df8a511 Merge topic 'wix-empty-components'
6e3f6e925d CPack/WiX: Allow multiple empty top-level components

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11172
2025-09-12 11:28:17 -04:00
Ben Boeckel
42621a232b Tests/CXXModules: add a label
So that CI can target the test where necessary.
2025-09-11 18:05:27 -04:00
Ben Boeckel
2f101b2c8c Tests/CXXModules: support testing with custom stdlib json locations 2025-09-11 18:03:05 -04:00
Ben Boeckel
6c178a4ae3 Tests/RunCMake: add newlines in CXXModules options
Better readability for upcoming changes.
2025-09-11 18:03:05 -04:00