Commit Graph

38500 Commits

Author SHA1 Message Date
Brad King
bf4b9e92ea Merge topic 'emscripten-try_run'
a308ea38f3 Emscripten: Fix try_run to run the `.js` file and not the adjacent `.wasm`
ad91bc558a ci: Make node available to Emscripten tests
27cc5d58bf Tests/RunCMake/Emscripten: Add tests covering try_compile COPY_FILE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11451
2025-11-26 10:00:10 -05:00
Brad King
50e478ab0c Merge topic 'fileapi-order-deps-undefined-target'
0f1d773bd7 fileAPI: Silently ignore non-target order dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11447
2025-11-26 09:47:59 -05:00
Brad King
db953d999e Merge topic 'fix-19813'
2628c52e04 source_group: add genex support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11439
2025-11-26 09:39:32 -05:00
Kitware Robot
c204231bd2 CMake Nightly Date Stamp 2025-11-26 00:12:03 -05:00
Brad King
a308ea38f3 Emscripten: Fix try_run to run the .js file and not the adjacent .wasm
Since commit 96d9b94a98 (Emscripten: Add platform modules, 2025-05-16,
v4.2.0-rc1~607^2~3) we've considered the `.wasm` to be the `try_compile`
output because we need `COPY_FILE` to get it for extracting `INFO:`
strings during our inspection checks.  This breaks `try_run` because
`node`, used via `CMAKE_CROSSCOMPILING_EMULATOR`, expects the `.js`.
Revert to considering the `.js` to be the primary output file, but
switch to the `.wasm` in `COPY_FILE`'s implementation.

Fixes: #27421
2025-11-25 15:45:46 -05:00
Brad King
637a2baccf Merge topic 'cxx-atomic'
37171d9db0 Source: Improve detection of Linux architectures requiring explicit libatomic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11441
2025-11-25 11:00:52 -05:00
Brad King
32776b4cc6 Merge topic 'cxx-atomic' into release-4.2
37171d9db0 Source: Improve detection of Linux architectures requiring explicit libatomic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11441
2025-11-25 11:00:50 -05:00
Craig Scott
0f1d773bd7 fileAPI: Silently ignore non-target order dependencies
Non-target order dependencies should be caught as project errors.
Prior to f38f325e08 (fileAPI: Add direct dependencies to target
codemodel files, 2025-10-04), they were silently ignored, but that
change crashed on such cases. Restore the old behavior of silently
ignoring such project errors and prevent the crash.

Fixes: #27415
2025-11-25 20:35:03 +11:00
Kitware Robot
c65ee4d036 CMake Nightly Date Stamp 2025-11-25 00:06:30 -05:00
HannaWAR
2628c52e04 source_group: add genex support
Fixes: #19813
2025-11-24 21:08:46 +03:00
Brad King
37171d9db0 Source: Improve detection of Linux architectures requiring explicit libatomic
Extend commit fa3c4b6dbf (Source: Link libatomic when needed on any
Linux architecture, 2023-08-24, v3.27.5~9^2) to decide based on the
architecture targeted by the compiler, known since CMake 4.1.
Use `CMAKE_SYSTEM_PROCESSOR` only as a fallback for older versions.

Fixes: #27406
2025-11-24 11:29:15 -05:00
Kitware Robot
efed08ac1a CMake Nightly Date Stamp 2025-11-24 00:08:31 -05:00
Kitware Robot
33a4a3c43a CMake Nightly Date Stamp 2025-11-23 00:11:15 -05:00
Brad King
0fbb18d03b Merge topic 'fix-cps-export-definitions'
37b15eda3b CPS: Fix exporting definitions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11436
2025-11-22 18:53:00 -05:00
Brad King
976e8ef053 Merge topic 'fix-cps-export-definitions' into release-4.2
37b15eda3b CPS: Fix exporting definitions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11436
2025-11-22 18:52:58 -05:00
Kitware Robot
2007766f9f CMake Nightly Date Stamp 2025-11-22 00:06:48 -05:00
Matthew Woehlke
37b15eda3b CPS: Fix exporting definitions
Export compile definitions to CPS using the correct attribute name.

Fixes: #27403
2025-11-21 15:32:41 -05:00
Brad King
fdc1de26c9 Merge topic 'build-dir-override-presets'
19296f507d cmake --build: Allow CLI build dir to override presets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11425
2025-11-21 09:52:11 -05:00
Brad King
aa39871396 Merge topic 'astgrep-has-prefix-suffix-simplifications'
366b25e62e ast-grep: simplify `cmHasLiteral{Suf,Pre}fix` with char literals
9945be27af Utilities/ast-grep: add rules for `cmHasLiteral{Suf,Pre}fix` with char needles
eab4c033ea ast-grep: simplify `cmHas{Suf,Pre}fix` with character needles
d9ee22f331 Utilities/ast-grep: add rules for `cmHas{Suf,Pre}fix` for character needles
aa477d8768 ast-grep: simplify `cmStrCat` calls with one-char strings
514cbbc76e ast-grep: combine string literal arguments in `cmStrCat`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11366
2025-11-21 08:27:11 -05:00
Kitware Robot
a1190b4a84 CMake Nightly Date Stamp 2025-11-21 00:05:31 -05:00
Ben Boeckel
366b25e62e ast-grep: simplify cmHasLiteral{Suf,Pre}fix with char literals 2025-11-20 12:14:14 -05:00
Ben Boeckel
eab4c033ea ast-grep: simplify cmHas{Suf,Pre}fix with character needles 2025-11-20 12:14:14 -05:00
Ben Boeckel
aa477d8768 ast-grep: simplify cmStrCat calls with one-char strings 2025-11-20 12:14:13 -05:00
Ben Boeckel
514cbbc76e ast-grep: combine string literal arguments in cmStrCat 2025-11-20 12:14:13 -05:00
Kitware Robot
b196a40b0d CMake Nightly Date Stamp 2025-11-20 00:07:55 -05:00
Brad King
a0c7f1d29c CMake 4.2.0 2025-11-19 08:57:10 -05:00
Brad King
bb0216e0a2 Merge topic 'cxx-module-metadata'
fa10dc6c22 Experimental/CXXModules: Implement EcoStd Module Metadata parser

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11422
2025-11-19 08:53:29 -05:00
Brad King
ad4a773d0c Merge topic 'vs-slnx'
06178da668 VS: Add include_external_msproject detection of `.wapproj` type
b9ce07b85b VS: Add SLNX project types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11428
2025-11-19 08:47:07 -05:00
Kitware Robot
a0081ac0cb CMake Nightly Date Stamp 2025-11-19 00:06:52 -05:00
Vito Gamberini
fa10dc6c22 Experimental/CXXModules: Implement EcoStd Module Metadata parser
Adds a parser and serializer for the EcoStd Module Metadata format

RFC: https://github.com/ecostd/rfcs/pull/3

This adapts the existing experimental support for import std; to use
the new parser. The CMAKE_CXX_STDLIB_MODULES_JSON is now the canonical
variable for controlling how CMake discovers the stdlib module metadata,
and is used directly by compiler detection.

Toolchains can still override the __CMAKE::CXX## targets if they wish,
either in conjunction with CMAKE_CXX_STDLIB_MODULE_JSON or not. It is
possible to disable automatic detection of
CMAKE_CXX_STDLIB_MODULE_JSON by setting it to the empty string.

When available, the CMAKE_CXX_STDLIB_MODULE_JSON will be used to create
all requested C++ stdlibs which do not already have targets.
2025-11-18 11:39:59 -05:00
Brad King
06178da668 VS: Add include_external_msproject detection of .wapproj type
It is a Windows Application Packaging Project.

Issue: #27392
2025-11-18 11:18:17 -05:00
Brad King
b9ce07b85b VS: Add SLNX project types
Extend commit e6aa7742b0 (VS: Generate .slnx files for VS 2026,
2025-09-17, v4.2.0-rc1~151^2) to add the `Type=` attribute on SLNX
`<Project>` elements.

Fixes: #27392
2025-11-18 11:10:22 -05:00
Brad King
5961f5f3bc CMake 4.1.3 2025-11-18 09:55:48 -05:00
Kitware Robot
ba1996eb15 CMake Nightly Date Stamp 2025-11-18 00:08:20 -05:00
William Allen
19296f507d cmake --build: Allow CLI build dir to override presets
`cmake --build <dir>` and `cmake --build --preset <preset>` are currently
mutually exclusive options.  This commit allows `<dir>` to override the
build directory specified in a preset.  This change allows the requirement
for each build preset to have a configure preset to be dropped in a future
commit.

Closes: #27384
2025-11-17 15:10:38 -05:00
Brad King
9c091c7d17 CMake 4.2.0-rc4 2025-11-17 10:32:25 -05:00
Kitware Robot
fb87a6bbb0 CMake Nightly Date Stamp 2025-11-17 00:06:13 -05:00
Kitware Robot
271f358f1f CMake Nightly Date Stamp 2025-11-16 00:09:00 -05:00
Brad King
6087f56da9 Merge topic 'GenEx-STRING'
fd7e305097 GenEx: Add $<STRING> generator expression
7564cbae12 GenEx: add new expressions for string comparisons
dab5e6ebb1 introduce cm::CMakeString class as helper for string() command
34c0c7754f cmString: add methods append and insert
ab60f1a010 Extend usage for cm::string_view for more flexibility

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11382
2025-11-15 09:10:50 -05:00
Brad King
f741e53dfe Merge topic 'vs-cuda-forward-host-compiler-flags'
c185998420 VS/CUDA: Forward unknown flags to the host compiler when possible

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Patrik Huber <patrikhuber@gmail.com>
Merge-request: !11417
2025-11-15 09:08:44 -05:00
Brad King
42d94ff876 Merge topic 'file-GET_RUNTIME_DEPENDENCIES-matching'
bf3f69834d file(GET_RUNTIME_DEPENDENCIES): Normalize paths before matching

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11351
2025-11-15 09:03:56 -05:00
Brad King
4e85f9078d Merge topic 'vs-slnx'
70ed720232 VS: Add SLNX default startup project

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11420
2025-11-15 09:01:50 -05:00
Brad King
38e86c8ea4 Merge topic 'vs-slnx' into release-4.2
70ed720232 VS: Add SLNX default startup project

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11420
2025-11-15 09:01:48 -05:00
Brad King
b4c8e00f9f Merge topic 'fbuild_fix_pch'
878d154322 FASTBuild: fix multi-language PCHs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11404
2025-11-15 08:59:05 -05:00
Brad King
9e38d74019 Merge topic 'fbuild_fix_pch' into release-4.2
878d154322 FASTBuild: fix multi-language PCHs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11404
2025-11-15 08:59:03 -05:00
Kitware Robot
dea6b14379 CMake Nightly Date Stamp 2025-11-15 00:07:41 -05:00
Brad King
70ed720232 VS: Add SLNX default startup project
At the time of commit e6aa7742b0 (VS: Generate .slnx files for VS 2026,
2025-09-17, v4.2.0-rc1~151^2), the VS 18 Insiders edition did not offer
support for specifying a default startup project in `.slnx` files.
This has since been added, so use it.

Fixes: #27387
2025-11-14 11:03:57 -05:00
Marc Chevrier
fd7e305097 GenEx: Add $<STRING> generator expression
Fixes: #27188
2025-11-14 16:44:29 +01:00
Marc Chevrier
7564cbae12 GenEx: add new expressions for string comparisons 2025-11-14 16:44:29 +01:00
Marc Chevrier
dab5e6ebb1 introduce cm::CMakeString class as helper for string() command
This class will be used, as helper for:
* string() command
* future $<STRING> generator expression
2025-11-14 16:44:29 +01:00