59 Commits
Author SHA1 Message Date
Vito Gamberini 21213ae1d9 DPClang: add compiler support
Fixes: #28157
2026-10-13 14:59:23 -04:00
Tyler Yankee 20c46448e1 FASTBuild: Fix chaining of library links through sonames
For a shared library with VERSION and SOVERSION, FASTBuild pointed both
the namelink and the soname link directly at the real file. Instead,
chain the namelink through the soname link, like the other generators
do.

Fixes: #28153
2026-10-12 09:58:10 -04:00
Vito Gamberini f69754ad63 SYCL: Initial language implementation
Add experimental support for SYCL under an experimental gate. The
IntelLLVM and Adaptivecpp compilers are recognized, as well as upstream
Clang with libsycl support.

Fixes: #27219, #27905
2026-10-07 11:43:31 -04:00
Brad King 85e050e594 Merge topic 'sstream-3'
509514e475 Source: migrate ostringstream usage to cmStrCat

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !12587
2026-10-02 10:26:27 -04:00
AJIOB 509514e475 Source: migrate ostringstream usage to cmStrCat 2026-10-01 11:41:51 +00:00
Brad King ac50697377 Merge topic 'fs-language-prop'
42fd1fa12d FILE_SET: Add support for LANGUAGE property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12579
2026-09-30 11:30:08 -04:00
Vito Gamberini 42fd1fa12d FILE_SET: Add support for LANGUAGE property
Fixes: #28127
2026-09-30 09:14:08 -04:00
AJIOB fa60523bf6 Source: fix ast-grep suggestions 2026-09-29 08:50:54 -04:00
AJIOB a0a17c9ce8 Source: fix almost all ast-grep suggestions 2026-09-29 08:50:54 -04:00
AJIOB 66cfa81885 Source: fix ast-grep warnings 2026-09-26 21:54:54 +00:00
Brad King 2975be1a6b Merge topic 'procmetrics-command-chain'
1528113bdf instrumentation: Prevent inherited process metrics in chained commands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12513
2026-09-23 13:40:51 -04:00
Brad King 6498b76d61 Merge topic 'reduce-realloc-clang-tidy-part3'
0aa1eaf506 Source: Reduce string allocations, part 4
1d2f0120be Source: Reduce string allocations, part 3
cb20c5bd89 Source: Reduce string allocations, part 2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12538
2026-09-23 13:30:55 -04:00
Martin Duffy 1528113bdf instrumentation: Prevent inherited process metrics in chained commands
Shells may exec the final chained command instead of forking it,
preserving resource usage accumulated from earlier children.

When processMetrics is enabled, append a shell builtin to generated
command chains and scripts for Ninja, Makefiles, and FASTBuild to prevent
this optimization while preserving command exit status.
2026-09-22 09:36:44 -04:00
AJIOB 1d2f0120be Source: Reduce string allocations, part 3 2026-09-22 11:37:41 +03:00
Tyler Yankee 721eb8a5a2 cmCommonTargetGenerator: Improve launcher shell conversion
Encapsulate the shell escaping logic in `cmCommonTargetGenerator` and
represent launchers via a vector of strings (as is done with custom
commands, execute process commands, etc.) to make them easier to work
with.

This facilitates work in a future commit which will reuse this pathway.

Issue: #27598, #27402
2026-09-21 13:45:54 -04:00
Chuck Atkins 6d6e58a15e WINDOWS_EXPORT_ALL_SYMBOLS: Fix support for Visual Studio with ClangCL
Thread `CMAKE_NM` to the generated `__create_def` commands.

Closes: #27994
2026-08-05 10:58:20 -04:00
Matthew Woehlke a5a9ec9113 TargetTypes: Extract target-related types to dedicated header
Move some target related enumeration types from `cmStateTypes.h` to a
new header, as these really aren't "state" types. Also, make
`TargetType` a strongly-typed enumeration.
2026-07-01 14:44:11 -04:00
Marc Chevrier c06d409f12 FILE_SET: add SKIP_PRECOMPILE_HEADERS property support 2026-06-01 18:39:23 +02:00
Marc Chevrier 7d892786d8 FILE_SET: manage unity build exclusions based on file set type
This complements commit 5f7a7aa263 (FILE_SET: add SKIP_UNITY_BUILD_INCLUSION property support, 2026-05-11)
2026-05-21 15:23:43 +02:00
Marc Chevrier 5f7a7aa263 FILE_SET: add SKIP_UNITY_BUILD_INCLUSION property support 2026-05-14 10:55:35 -04:00
Eduard Voronkin 126cc046f7 FASTBuild: honor source unity exclusions
Fixes: #27805
2026-05-10 11:47:03 -07:00
Brad King 885b588502 Merge topic 'SKIP_LINTING-FileSet-property'
f18ba89862 FILE_SET: add SKIP_LINTING property support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12004
2026-05-05 10:54:37 -04:00
Eduard Voronkin 05ac9db640 FASTBuild: use UnityInputExcludedFiles for unity skips
Prefer it over `UnityInputIsolatedFiles` to enable caching for the
files.

Fixes: #27784
2026-05-04 11:00:38 -04:00
Marc Chevrier f18ba89862 FILE_SET: add SKIP_LINTING property support 2026-05-04 10:16:06 +02:00
Marc Chevrier 5c5b68f44e FILE_SET: Add support for the SOURCES type
Fixes: #27550
2026-03-31 09:49:59 +02:00
Eduard Voronkin f9f2a72569 FASTBuild: fix incorrect obj lib propagation
Fixes: #27698
2026-03-23 15:56:24 -04:00
Eduard Voronkin 30ce1cfdcb FASTBuild: fix clang-cl build with manifests
Fixes: #27691
2026-03-16 11:52:50 -04:00
Brad King 477dd9a061 Merge topic 'fbuild_unity_subdirs'
3f43795df9 FASTBuild: Allow files in different subdirs to be in the same unity bucket

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Eduard Voronkin <edward.voronkin@gmail.com>
Merge-request: !11679
2026-02-12 11:04:34 -05:00
Andrew Maher 3f43795df9 FASTBuild: Allow files in different subdirs to be in the same unity bucket
The FASTBuild generator puts source files from different subdirectories
into different `FastbuildObjectListNode` instances. This ensures that
files with the same name will not write to the same object file. A unity
bucket can only contain files from a single `FastbuildObjectListNode`
instance, so a side effect of this logic is that unity buckets can only
contain files in the same subdirectory. This change fixes the problem by
skipping the subdirectory check logic for files with unity enabled.

Fixes: #27457
2026-02-11 14:38:22 -05:00
Brad King 8d251cc54a Merge topic 'fastbuild-imported-objlib'
67dc1dff7c FASTBuild: fix imported object libs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11670
2026-02-10 11:32:08 -05:00
Eduard Voronkin 67dc1dff7c FASTBuild: fix imported object libs
Fixes: #27507
2026-02-10 09:22:09 -05:00
Eduard Voronkin b9f2b6c40b FASTBuild: specify VS proj deps
Fixes: #27479
2026-01-17 15:40:19 -08:00
Brad King 291e536a55 Merge topic 'use-more-cmStrCat'
fe173b68f0 Source: Use cmStrCat in place of string addition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !11486
2025-12-10 09:34:48 -05:00
AJIOB fe173b68f0 Source: Use cmStrCat in place of string addition 2025-12-09 11:06:59 -05:00
Brad King 67ed00a1ca Merge topic 'fastbuild-pdb-quoting'
6f1fe8853d FASTBuild: Fix default MSVC compiler PDB paths
dff020e679 FASTBuild: Add internal helper for intermediate directory creation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Eduard Voronkin <edward.voronkin@gmail.com>
Merge-request: !11483
2025-12-08 10:15:56 -05:00
Brad King 6f1fe8853d FASTBuild: Fix default MSVC compiler PDB paths
When we pass a PDB output directory to the compiler in a path that
requires quoting, the trailing backslash must be escaped to be parsed
correctly by the compiler, e.g., `cl /Fd"path\with space\\"`.  However,
`fbuild` does not parse this correctly when extracting `/Fd`.  Work
around that bug by using a trailing forward slash in quotes instead.
2025-12-05 18:02:30 -05:00
Brad King dff020e679 FASTBuild: Add internal helper for intermediate directory creation 2025-12-05 15:10:09 -05:00
Ben Boeckel aa477d8768 ast-grep: simplify cmStrCat calls with one-char strings 2025-11-20 12:14:13 -05:00
Eduard Voronkin 878d154322 FASTBuild: fix multi-language PCHs
Fixes: #27371
2025-11-13 10:00:33 -05:00
Brad King f49b0e6759 IWYU: Update for Debian 13 CI job
`include-what-you-use` diagnostics, in practice, are specific to
the environment's compiler and standard library.  Update includes
to satisfy IWYU for our CI job under Debian 13.  Some patterns:

* Types named in virtual `override` signatures no longer require
  includes since the overridden signature already names them.

* A function argument's type needs to be included even if its constructor
  is called only by implicit conversion.  For example, constructing a
  `std::function` from a lambda now requires `<functional>`.

* Some prior mysterious `<type_traits>` inclusions are no longer required.
2025-11-12 14:54:16 -05:00
Brad King 519d69c92c Merge topic 'typos-1.39.0' into release-4.2
1405dc49e8 pre-commit: version bump `typos` and `sphinx-lint` hooks + fix found typos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11380
2025-11-04 11:24:30 -05:00
Alex Turbov 1405dc49e8 pre-commit: version bump typos and sphinx-lint hooks + fix found typos 2025-11-03 10:18:16 -05:00
Eduard Voronkin 2a5855f034 FASTBuild: fix superfluous directory creation
Fixes: #27356
2025-11-03 09:39:16 -05:00
Eduard Voronkin 4135175337 FASTBuild: support CUDA language
Fixes: #27318
2025-10-25 08:58:38 -04:00
Martin Duffy 97adbc91fa instrumentation: Move target data into content files
Create a single place to store target data to prevent duplication.
This moves `targetType` and `targetLabels` out of the snippet files
and into a target map in the `cmakeContent` file referenced by each
snippet.

Fixes: #27244
2025-10-02 09:28:20 -04:00
Eduard Voronkin a63c1b4a84 FASTBuild: fix excessive std::to_string
`cmStrCat` uses `cmAlphaNum` internally
which does conversion from integer to string
2025-09-21 17:29:53 -07:00
Eduard Voronkin 64296789d3 FASTBuild: don't write empty dependencies
We were writing "-deps" alias in the generated file
even if we didn't have any dependencies, which is excessive
and makes FASTBuild do more work then necessary.
2025-09-19 09:34:47 -07:00
Eduard Voronkin 23fd5703ad FASTBuild: add support for Unity builds 2025-09-18 09:40:55 -07:00
Eduard Voronkin 914a9eea94 FASTBuild: optimize generated file size
Two optimizations here:
1. Remove non-mandatory aliases (I only used them for debugging).
2. Make objects lists' name shorter

Both of those improvements contribute to the decrease of the FASTBuild DB file, since they are getting serialized.
2025-09-16 09:33:54 -07:00
Eduard Voronkin 4387c965a6 FASTBuild: optimize generated file
List of changes:
1. Remove unneeded aliases
2. Don't write VS Solution on Apple
3. Use external script to perform clean
4. Fix small bug when empty environment was
resulting in invalid file.
It greatly reduces the size of .fdb file and
makes FASTBuild run much faster in different cases.
2025-09-14 20:26:11 -07:00