Commit Graph
16030 Commits
Author SHA1 Message Date
Brad King 635b42c3ff Merge topic 'ibm-flang'
ee76398d23 IBMLLVMFlang: Add support for this compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12138
2026-06-04 10:09:27 -04:00
Brad King b11c54bb0c Merge topic 'discover-tests-googletest'
a324c2bb58 GoogleTest: Base on builtin command discover_tests
6b6e9fbc32 GoogleTest: Move test list parsing to separate file
1da072eacb discover_tests: Add TEST_LIST to CTest command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11815
2026-06-04 09:54:33 -04:00
Brad King 6e995093d9 Merge topic 'fix-build-tree-prefix-leak'
fd660330e0 find_*: Avoid searching prefix derived from CMake's own source tree

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12122
2026-06-04 09:51:29 -04:00
Kelvin Li ee76398d23 IBMLLVMFlang: Add support for this compiler
Add support for the `ibm-flang` compiler tool, a variant of LLVMFlang.

Closes: #27863
2026-06-03 18:35:46 -04:00
Daksh Mamodiya fd660330e0 find_*: Avoid searching prefix derived from CMake's own source tree
When `cmake` is running from its own build tree, `CMAKE_ROOT` is in
the source tree and should not be used to derive a search prefix.

Fixes: #27853
2026-06-03 10:11:21 -04:00
Daniel Pfeifer a324c2bb58 GoogleTest: Base on builtin command discover_tests 2026-06-02 21:19:28 +02:00
Daniel Pfeifer 6b6e9fbc32 GoogleTest: Move test list parsing to separate file 2026-06-02 21:05:05 +02:00
Brad King bd870ef98f Merge topic 'swift-sizeof-void-p'
a82e3e3aaf Swift: Verify setting sizeof_void_p
8682afd971 Swift: Extract pointer size from Swift compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12125
2026-06-02 09:27:23 -04:00
Brad King d9099418e1 Merge topic 'flang-ipo'
9573345dec LLVMFlang: Enable ThinLTO support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12123
2026-06-02 09:24:12 -04:00
Kelvin Li 9573345dec LLVMFlang: Enable ThinLTO support
Fixes: #27839
2026-06-01 15:28:01 -04:00
Marc Chevrier 1ca1095736 Linker: enhance pushpop-state detection
Fixes: #27822
2026-06-01 16:50:34 +02:00
Evan Wilde 8682afd971 Swift: Extract pointer size from Swift compiler
The target info in Swift 6.2 and newer supports emitting the pointer
size for a given target triple. We can use that to set the Swift data
pointer size, and the `CMAKE_SIZEOF_VOID_P`.

Fixes: #26649
2026-05-29 15:15:43 -07:00
Brad King cd807309bf Merge topic 'findcudatoolkit-target-for-cufilt'
507b641639 FindCUDAToolkit: Add cufilt target for CUDA 11.4 and above

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !12115
2026-05-29 09:34:58 -04:00
Arha Gatram 507b641639 FindCUDAToolkit: Add cufilt target for CUDA 11.4 and above
Fixes: #26705
2026-05-28 10:03:34 -04:00
Brad King 1f701b8736 Merge topic 'fetchcontent-typo'
38f30ac2b4 FetchContent: Correct the documentation for `FetchContent_MakeAvailable`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12106
2026-05-28 09:48:13 -04:00
Brad King 645ca80972 Merge topic 'rust-make'
1102abd224 ci: Enable Rust tests in Fedora + Unix Makefiles configuration
03ac6b9c2b Rust: Update experimental UUID
8154a4bc5c Rust: Add support for compiling Rust with Makefile generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12105
2026-05-27 11:45:23 -04:00
Brad King 6df20d108e Merge topic 'FindVulkan-volk'
1f0da22595 FindVulkan: Remove incorrect description of volk library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12099
2026-05-26 17:53:42 -04:00
NBT22 1f0da22595 FindVulkan: Remove incorrect description of volk library
The description added by commit 4376b15bae (FindVulkan: Update
documentation, 2025-04-22, v4.1.0-rc1~301^2) refers to a different
`volk` project.
2026-05-26 16:28:34 -04:00
Brad King db63557d6a Merge topic 'skip-compiler-check-support'
11adb3b7ae Linker/Windows-MSVC: check for a non-empty linker version
32c12e6901 Modules/CMakeLANGCompiler.cmake.in: quote linker version and frontend variant
31946711d3 CMakeDetermineCompilerSupport: support skipping compiler feature checks
71d908010f Modules/DetermineCompiler: support skipping compiler checks
e267321f93 Modules/DetermineCompiler: avoid the cache for ABI compilations
94f4c64461 Tests/RunCMake/ToolchainSkipsChecks: add tests for skipping compiler checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11917
2026-05-26 16:12:35 -04:00
Chengfeng Xie 38f30ac2b4 FetchContent: Correct the documentation for FetchContent_MakeAvailable
The intended input variable is `FETCHCONTENT_SOURCE_DIR_<uppercaseName>` rather than `<lowercaseName>_SOURCE_DIR`, which is an output-only variable. This matches the actual implementation of `FetchContent_MakeAvailable` and the documentation for `cmake_language`.
2026-05-26 12:17:08 +08:00
Baudouin Feildel 8154a4bc5c Rust: Add support for compiling Rust with Makefile generator 2026-05-25 22:18:25 +02:00
Brad King 442f2f49ac Merge topic 'Windows-LLD-linker-enhance-portability'
7e42230e01 LLD linker: enhance portability

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !12096
2026-05-22 11:06:40 -04:00
Brad King cade4a196a Merge topic 'ci-orangec'
7524813c18 ci: Add OrangeC 7.10 nightly CI job
8c91584b5e ci: Drop OrangeC patch version from job names
87dc852a5e FindOpenMP: Fix (non-)detection with OrangeC 7.10
a57302eb79 Tests/TestDriver: Fix typo in function name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12097
2026-05-22 10:35:57 -04:00
Ben Boeckel 11adb3b7ae Linker/Windows-MSVC: check for a non-empty linker version 2026-05-21 20:48:45 -04:00
Ben Boeckel 32c12e6901 Modules/CMakeLANGCompiler.cmake.in: quote linker version and frontend variant
This avoids them being unset when they are empty values.
2026-05-21 20:48:45 -04:00
Ben Boeckel 31946711d3 CMakeDetermineCompilerSupport: support skipping compiler feature checks 2026-05-21 20:48:45 -04:00
Ben Boeckel 71d908010f Modules/DetermineCompiler: support skipping compiler checks
Also only set F90 support detection if not set by the toolchain. As
the F90 check can now be false-positive detected with any variable
settings causing a success, only set it if not already defined.
2026-05-21 20:48:45 -04:00
Brad King 87dc852a5e FindOpenMP: Fix (non-)detection with OrangeC 7.10
The compiler does not support OpenMP.  Do not try any flags.
It does not fail on unknown flags.
2026-05-21 10:41:13 -04:00
Brad King f4c33c7762 Merge topic 'better-policy-diagnostics'
763cfbcac8 Diagnostics: "Fix" policy warnings in modules
a7415d243a Diagnostics: Simplify issuing policy warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12079
2026-05-21 09:47:07 -04:00
Marc Chevrier 7e42230e01 LLD linker: enhance portability
To ensure that the correct linker is selected (host or device link),
use the generic driver (i.e. lld) rather than a specific linker (like lld-link).

Fixes: #27826
2026-05-21 15:25:49 +02:00
Matthew Woehlke 763cfbcac8 Diagnostics: "Fix" policy warnings in modules
Introduce a mechanism (via the private and undocumented `ISSUE_WARNING`
option to the `cmake_policy` command) to allow built-in modules to issue
policy warnings. Update modules to use this.

This allows modules to issue policy warnings with the `CMD_POLICY`
diagnostic type, which is consistent with internally issued diagnostics.
This also tends to simplify the logic for issuing such warnings in much
the way the helpers introduced in the previous commit did for the C++
code.
2026-05-20 15:32:57 -04:00
Brad King 0e3c395205 PellesC: Fix architecture detection when enabling both C and ASM_POASM
We detect the architecture once and store it in `_PellesC_ARCH`.
Do not unset it after the first language is enabled.

This fixes commit bc51518821 (PellesC: Compile for architecture matching
LIB environment variable, 2026-05-07) by removing lines left from an
earlier draft of the change.

Issue: #21536
Reported-by: Serguei E. Leontiev <leo@sai.msu.ru>
2026-05-19 10:12:36 -04:00
Brad King 485b155cb9 Merge topic 'swift-pdb'
404f6bac3c Swift: support PDB emission with Swift

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12064
2026-05-19 09:04:41 -04:00
Ben Boeckel e267321f93 Modules/DetermineCompiler: avoid the cache for ABI compilations 2026-05-18 23:49:43 -04:00
Brad King ea31fd8986 Merge topic 'write-basic-package-version-file-compatibility'
9bd3346655 CMakePackageConfigHelpers: add more version compatibility modes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11994
2026-05-16 09:44:24 -04:00
Brad King 6f3c85f7a9 Merge topic 'flang-windows'
95abfcbe51 LLVMFlang: Add support for MSVC_RUNTIME_CHECKS abstraction on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12072
2026-05-16 09:36:32 -04:00
Saleem Abdulrasool 404f6bac3c Swift: support PDB emission with Swift
Swift supports CodeView/PDB for Windows (with active development ongoing
to make it the default). It is currently usable but does not have the
same fidelity as DWARF, but can be sufficient for many use cases. The
user is able to control this via flags. Wire up the necessary support to
allow `TARGET_PDB_FILE` to be used with Swift/Swift-only targets.
2026-05-16 09:05:46 -04:00
Brad King 95abfcbe51 LLVMFlang: Add support for MSVC_RUNTIME_CHECKS abstraction on Windows
Extend commit 2b2344b412 (MSVC: Add abstraction for runtime checks,
2025-01-22, v4.0.0-rc1~92^2) to cover LLVMFlang.  This is necessary
to configure with CMP0184's NEW behavior.
2026-05-15 17:30:47 -04:00
Brad King f53ee8be4b LLVMFlang: Fix flags for shared libraries on AIX
On most platforms we create shared libraries with `-shared` by default,
but on AIX we add `-Wl,-bnoipath` before the default is applied.
Explicitly specify `-shared` for LLVMFlang instead.

Also add compilation flags for position-independent code.

Fixes: #27818
2026-05-15 15:06:58 -04:00
Daniele E. Domenichelli 9bd3346655 CMakePackageConfigHelpers: add more version compatibility modes
Add `SamePatchVersion`, `SameFullVersion`, and `SemanticVersion`
support.

Document `ExactVersion` as deprecated in favor of the clearer
`SamePatchVersion`/`SameFullVersion` names.

Closes: #18060
2026-05-15 13:51:11 -04:00
Brad King 57df832e53 Merge topic 'backport-findcudatoolkit-nvml-static-dl' into release-4.1
e535411d78 FindCUDAToolkit: Link CUDA::nvml_static against DL libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12066
2026-05-15 11:07:20 -04:00
Kyle Edwards e535411d78 FindCUDAToolkit: Link CUDA::nvml_static against DL libraries 2026-05-15 10:53:15 -04:00
Brad King e0b79bddd0 Merge topic 'ctest-llvm-cov'
e0ac166e7b ctest: Parse Clang Source code coverage files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12049
2026-05-15 10:16:00 -04:00
Brad King f369fc8f56 Merge topic 'pellesc-windows-libs'
b91c1fc3a9 PellesC: Pass common Windows SDK libraries to linker by default

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12061
2026-05-15 10:11:28 -04:00
Brad King 686f278097 Merge topic 'pellesc-c-std'
713f4b76ee PellesC: Add C standard levels for Pelles C versions 9 through 12
1f5c9a31f4 PellesC: Remove UTF-8 BOM from test .asm files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12059
2026-05-15 10:09:53 -04:00
Brad King 5b68160cab Merge topic 'emscripten-shared-libs'
0182611a56 Emscripten: Restore linking shared libraries with `-shared` flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12058
2026-05-15 10:03:38 -04:00
Brad KingandSerguei E. Leontiev b91c1fc3a9 PellesC: Pass common Windows SDK libraries to linker by default
We already do this for MSVC and MinGW.  The linker ignores them
if no symbols are needed.

Issue: #21536
Co-authored-by: Serguei E. Leontiev <leo@sai.msu.ru>
2026-05-14 11:34:36 -04:00
Brad KingandSerguei E. Leontiev 713f4b76ee PellesC: Add C standard levels for Pelles C versions 9 through 12
Full C23 support was not added until version 12.

Issue: #21536
Co-authored-by: Serguei E. Leontiev <leo@sai.msu.ru>
2026-05-14 10:37:46 -04:00
Brad King 0182611a56 Emscripten: Restore linking shared libraries with -shared flag
Prior to CMake 4.2.0, projects using the EMSDK's toolchain file while
also enabling `TARGET_SUPPORTS_SHARED_LIBS` would link shared libraries
using our default `-shared` flag plus whatever `-sSIDE_MODULE` flag
the project added, if any.  CMake 4.2.0 introduced builtin Emscripten
support, but since commit d361bf365e (Emscripten: Drop hard-coded
-sMAIN_MODULE and -sSIDE_MODULE flags, 2025-09-18, v4.2.0-rc1~146^2)
we still leave it to projects to add Emscripten-specific flags needed
to link shared libraries.

Restore the pre-4.2 behavior of adding the `-shared` flag.  In
particular, this is needed for upcoming Emscripten support for real
shared libraries.

Issue: #27240
2026-05-14 09:24:49 -04:00
Kyle Edwards cdacf44fe8 Merge topic 'findcudatoolkit-nvml-static-dl'
af0828cbbf FindCUDAToolkit: Link CUDA::nvml_static against DL libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !12055
2026-05-14 09:02:48 -04:00