Commit Graph
15948 Commits
Author SHA1 Message Date
Brad King 05b446c2ed Merge topic 'pellesc-default-flags'
12e6c14e69 PellesC: Add default -Ze flag to support compilation against Windows APIs
9db2cf5429 PellesC: Add default compilation and link flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12000
2026-05-05 10:48:32 -04:00
Brad KingandSerguei E. Leontiev 12e6c14e69 PellesC: Add default -Ze flag to support compilation against Windows APIs
The Pelles C compiler requires MS extensions to support `__declspec`
and other constructs needed to use Windows APIs.  Unfortunately the
flag also disables standard definitions, so restore them.

Issue: #21536
Co-authored-by: Serguei E. Leontiev <leo@sai.msu.ru>
2026-05-04 10:47:08 -04:00
Brad King 3758f44d6e Merge topic 'arma-cleanup'
3f8daf0f1c FindArmadillo: Remove unnecessary setting of ARMADILLO_LIBRARY to empty

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12001
2026-05-04 10:27:52 -04:00
Brad King 7a5f1af235 Merge topic 'exe-result'
40ef8fd781 ProcessorCount: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11998
2026-05-04 10:25:11 -04:00
Brad King 871c7bcec2 Merge topic 'ctest-llvm-cov'
a7780d1b9c ctest: Add a `CoverageTool` setting to enable integration with `llvm-cov`
870d7d7cbe ctest: Introduce CTestDirectory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11891
2026-05-04 10:21:12 -04:00
Ryan Curtin 3f8daf0f1c FindArmadillo: Remove unnecessary setting of ARMADILLO_LIBRARY to empty
This is not a typical pattern for find modules, and it breaks subsequent
calls to `find_package(Armadillo)`.

See also commit 38c6dd7b19 (FindArmadillo: Add support for non-wrapper
case, 2020-03-02, v3.18.0-rc1~594^2) and commit 6745af99c8 (FindArmadillo:
Fix wrapper linking with MSVC, 2025-02-05, v4.0.0-rc1~53^2).
2026-05-01 14:24:27 -04:00
scivision 40ef8fd781 ProcessorCount: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL
Fixes: #27780
Issue: #27782
2026-05-01 11:36:31 -04:00
Serguei E. Leontiev 9db2cf5429 PellesC: Add default compilation and link flags
Specify debug symbols and optimization flags for each configuration.

Issue: #21536
2026-05-01 11:28:49 -04:00
Joseph Snyder a7780d1b9c ctest: Add a CoverageTool setting to enable integration with llvm-cov
Add a `CTEST_TEST_COVERAGE_TOOL` variable to tell CTest to integrate
with `llvm-cov` source-based code coverage by setting the
`LLVM_PROFILE_FILE` environment variable for each test.

Issue: #26932
2026-04-30 14:22:26 -04:00
Kyle Edwards a83b2de6ce FindCUDAToolkit: Fix search for sanitizer in cross-compilation
In a cross-compilation environment, `CUDAToolkit_LIBRARY_ROOT` will
be relative to the nvcc executable, rather than the cudart library,
due to `version.json` being relative to nvcc. However,
`CUDAToolkit_LIBRARY_SEARCH_DIRS` will be set correctly, so use
`EXTRA_PATH_SUFFIXES` to search relative to each entry in the list.
2026-04-30 09:55:41 -04:00
Brad King ca3e513eb5 Merge topic 'swift-package-name'
118ab41984 Swift: Build with a package name by default
94faee3099 Swift: Add option to pass package name to swiftc invocation
635f71737c Swift: Factor out Swift-specific target flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11981
2026-04-29 10:26:01 -04:00
Brad King 7d3d5df5e7 Merge topic 'findcudatoolkit-sanitizer-api'
35747cb5e0 FindCUDAToolkit: Add sanitizer support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11968
2026-04-29 10:23:32 -04:00
Evan Wilde 94faee3099 Swift: Add option to pass package name to swiftc invocation
Add a `Swift_PACKAGE_NAME` target property to specify the package name.

Fixes: #26886
2026-04-28 15:24:05 -04:00
Kyle Edwards 35747cb5e0 FindCUDAToolkit: Add sanitizer support 2026-04-28 10:13:20 -04:00
Brad King da33d606e6 PellesC: Add support for C language standards
Issue: #21536
Inspired-by: Serguei E. Leontiev <leo@sai.msu.ru>
2026-04-27 13:48:49 -04:00
Brad King 0f33d76bb5 Merge topic 'findcudatoolkit-fix-library-root'
2a56da6447 FindCUDAToolkit: Fix issue with CUDAToolkit_LIBRARY_ROOT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !11971
2026-04-27 09:45:49 -04:00
Brad King f62c35a036 Merge topic 'intel-classic-frontend-variant'
983942443e Intel: Set CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT on classic compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11972
2026-04-27 09:40:47 -04:00
Roman Lavrov b6367f723b Swift/Ninja: Emit modules separately from compilation
Add policy CMP0215 to emit `.swiftmodule` from a dedicated `-emit-module`
build edge for importable Swift targets in the Ninja generator.
Downstream targets can begin compiling as soon as the module interface
is ready, overlapping with upstream object compilation and linking.

When CMP0215 is NEW and CMP0157 is NEW, separate module emission is
enabled by default.  The `Swift_SEPARATE_MODULE_EMISSION` target
property (initialized by the `CMAKE_Swift_SEPARATE_MODULE_EMISSION`
variable) can override this per target.

The compile edge still passes `-emit-module` so that swiftc continues
to produce `.swiftdoc`; only the `.swiftmodule` output moves to the new
edge.

Also fix swiftmodule dependency edges in cmNinjaNormalTargetGenerator
to use IsLanguageUsed instead of GetLinkerLanguage, so C/C++ targets
whose linker language propagated to Swift do not produce spurious
implicit dependencies.

Closes: #27748
2026-04-24 15:58:18 -04:00
Kyle Edwards 2a56da6447 FindCUDAToolkit: Fix issue with CUDAToolkit_LIBRARY_ROOT
This directory is accidentally set to the target directory in some
environments, so strip the target portion.
2026-04-24 13:28:26 -04:00
Brad King 983942443e Intel: Set CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT on classic compiler
We already set it for IntelLLVM compilers.
2026-04-24 11:28:56 -04:00
Brad King 811bf8fb89 Merge topic 'LINKER_TYPE-wild'
e96c5ba13d Add the support of the wild linker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11966
2026-04-24 09:16:32 -04:00
Marc Chevrier e96c5ba13d Add the support of the wild linker
Fixes: #27755
2026-04-23 16:21:30 +02:00
Brad KingandSerguei E. Leontiev 1be31e5b61 PellesC: Add support for Windows DLL module definition files
Issue: #21536
Co-authored-by: Serguei E. Leontiev <leo@sai.msu.ru>
2026-04-23 09:33:32 -04:00
Brad KingandSerguei E. Leontiev a95fae2d36 PellesC: Add support for ASM_POASM language assembler
The Pelles C compiler does not support ASM, and the `poasm` assembler
uses a distinct syntax.  Add a dedicated language as we do for similar
cases from other vendors.  Leave documentation commented out for now
because the PellesC toolchain support in general is not yet documented.

Fixes: #27758
Issue: #21536
Co-authored-by: Serguei E. Leontiev <leo@sai.msu.ru>
2026-04-22 14:42:00 -04:00
Brad King efc3e90d0d PellesC: Move C-specific compile command to C-specific code path 2026-04-22 14:35:09 -04:00
Marc Chevrier 985dba8084 FindPython: Add support of Stable ABI for Free-Threaded python
Add the support of PEP803.

Fixes: #27736
2026-04-21 23:13:00 +02:00
Brad King 5916ef9297 Merge topic 'gtest-property-list-values'
83baea27a1 GoogleTest: Remove the LIST_SEPARATOR option
3748ca9fc7 GoogleTest: generate single discovery script
3fbf8e23fd GoogleTest: Remove `add_command` function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11911
2026-04-21 08:45:23 -04:00
Daniel Pfeifer 83baea27a1 GoogleTest: Remove the LIST_SEPARATOR option 2026-04-20 22:19:52 +02:00
Daniel Pfeifer 3748ca9fc7 GoogleTest: generate single discovery script
Generate a script that contains a `gtest_discover_tests_impl` call
and use that script for both discovery modes: Either execute it via
`-P` for the POST_BUILD mode, or include it in the test script for
the PRE_TEST mode.
2026-04-20 22:19:51 +02:00
Daniel Pfeifer 3fbf8e23fd GoogleTest: Remove add_command function 2026-04-20 22:07:07 +02:00
Brad King fec53c68cd PellesC: Add support for Windows Resources
The PellesC toolchain provides a `porc` tool to compile them.

Note that `polib` fails to archive resource files (`.res`):

    POLIB: fatal error: An internal error occurred

Turn off the static library part of the VSResource test.

Issue: #21536
Inspired-by: Serguei E. Leontiev <leo@sai.msu.ru>
2026-04-20 11:58:39 -04:00
Brad King 775dc91c48 Merge topic 'iar-treat-warings-as-errors'
ff75907e9a IAR: Implement COMPILE_WARNING_AS_ERROR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11924
2026-04-14 10:00:12 -04:00
Brad King 0afca0c1e0 Merge topic 'CPACK_RPM_SPEC_MORE_DEFINE-list2string'
30aa150c25 CPack/RPM: `CPACK_RPM_SPEC_MORE_DEFINE` could be a list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11899
2026-04-14 09:53:55 -04:00
Brad King 9fc0edced9 Merge topic 'treat-arm64-as-matching-arm64e-for-sysroots'
d68bed8397 Apple: Treat arm64 as matching arm64e when resolving arch sysroots

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11903
2026-04-13 10:53:03 -04:00
Brad King 41534f1571 Merge topic 'haiku-rescan'
9a342eb39b Haiku: Add support for RESCAN

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11919
2026-04-13 10:50:00 -04:00
Brad King 3bed3edd45 Merge topic 'Modules-use-NO_CACHE'
80abf737cc Modules: use `find_*(NO_CACHE)`
2c75267803 Modules/CMakeTest*Compiler: use `try_compile(NO_CACHE)`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11914
2026-04-13 10:48:10 -04:00
Ben Boeckel 80abf737cc Modules: use find_*(NO_CACHE)
Avoid manual cache management logic.
2026-04-12 08:02:28 -04:00
Andrey Starodubtsev ff75907e9a IAR: Implement COMPILE_WARNING_AS_ERROR 2026-04-12 14:57:42 +03:00
Alex Turbov 30aa150c25 CPack/RPM: CPACK_RPM_SPEC_MORE_DEFINE could be a list
Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
2026-04-12 05:54:58 +04:00
Trung Nguyen 9a342eb39b Haiku: Add support for RESCAN
Haiku also uses the GNU toolchain and therefore should support this
feature.
2026-04-11 06:04:50 +10:00
Tor Arne Vestbø d68bed8397 Apple: Treat arm64 as matching arm64e when resolving arch sysroots
Xcode 26.4's iPhoneOS SDK advertises arm64e (not arm64) in
libSystem.tbd. After stripping the platform suffix, the arch list
contains arm64e, which doesn't match when CMAKE_OSX_ARCHITECTURES
includes arm64. As a result, arm64 falls through to the simulator
SDK, silently breaking iOS device builds.

Since arm64e is a superset of arm64 (all arm64e devices run arm64
binaries), we now fall back to checking for arm64e when arm64 is
not found in an SDK's architecture list.
2026-04-10 14:45:48 -04:00
Ben Boeckel 2c75267803 Modules/CMakeTest*Compiler: use try_compile(NO_CACHE)
Instead of manually doing the cache dance manually, just skip the cache
in the first place.
2026-04-08 16:19:25 -04:00
Brad King b7a5f2732d PellesC: Add minimal support for this C compiler
Add bare minimum functionality to compile C code and link on Windows.
Explicitly label tests that are expected to work with `CFLAGS=-Ze`.

Leave out documentation for now because this is not usable in general.

Issue: #21536
Inspired-by: Serguei E. Leontiev <leo@sai.msu.ru>
2026-04-07 09:43:24 -04:00
Brad King c1e429eef2 CompilerId: Simplify C standard version detection
Consolidate conditions recognizing C90.
2026-04-07 09:43:24 -04:00
Brad King cae7b0461d Merge topic 'nvhpc-cpp26'
1e9150439c NVHPC: Record C23 and C++26 support
ee9f90005b NVHPC: Add detection of C++ 26 mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11881
2026-04-01 13:56:12 -04:00
scivision 1e9150439c NVHPC: Record C23 and C++26 support
NVHPC 26.3 documents support for `-std=c++26` [1].
The `-std=gnu*` flags were also added.

[1] https://docs.nvidia.com/hpc-sdk/archive/26.3/release-notes/index.html
2026-03-31 14:19:53 -04:00
Brad King ee9f90005b NVHPC: Add detection of C++ 26 mode
This compiler uses GCC's standard library, and so limits `__cplusplus`
to that of the GCC toolchain.  However, it defines feature macros that
we can use to distinguish this mode.
2026-03-31 14:19:32 -04:00
Brad King 2f6450402f Merge topic 'android-ndk-arm64'
39b998edee Android: Add future linux-arm64 `CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11879
2026-03-31 09:12:27 -04:00
Brad King 87d2ffc738 Merge topic 'gtest-alias'
741233a02b GoogleTest: Allow alias target in test discovery

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11876
2026-03-31 09:10:55 -04:00
Colin Cross 39b998edee Android: Add future linux-arm64 CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG
Future NDK versions may support linux `aarch64` hosts.  Teach CMake to
set `CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG` to `linux-arm64` on them.
2026-03-30 17:02:12 -04:00