Commit Graph

15925 Commits

Author SHA1 Message Date
Brad King
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
Daniel Pfeifer
741233a02b GoogleTest: Allow alias target in test discovery
Fixes: #24427
Fixes: #24428
2026-03-30 15:27:07 -04:00
Brad King
ed48feeae8 clang-cl: Add support for C++ modules
Since commit 4a4986d28a (cxxmodules: support command templates for BMI
compilation, 2026-03-25, v4.3.1~2^2~1) we can express module interface
unit compilation to either object files or BMI-only in a way that works
with `clang-scan-deps` and `clang-cl` together.

Fixes: #25731
2026-03-27 15:39:33 -04:00
Brad King
7c2bd4f534 Clang-CXX: Flatten C++ module scanning conditions to reduce nesting 2026-03-27 15:39:33 -04:00
Brad King
0e47cd8c7b Merge topic 'bmi-only-command-template'
7ebb5687ab cmGeneratorTarget: use typename for `flag`
4a4986d28a cxxmodules: support command templates for BMI compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11871
2026-03-27 07:36:26 -04:00
Ben Boeckel
4a4986d28a cxxmodules: support command templates for BMI compilation
Some compilers (Clang) warn when using their BMI-only flag with `-c`.
Support a complete template for BMI compilation rather than an
additional flag to support such toolchains.

Fixes: #27600
2026-03-26 13:20:19 -04:00
Serguei E. Leontiev
d60a5f278a OrangeC: Add C/C++ standards as of 7.0 2026-03-25 17:01:34 -04:00
Serguei E. Leontiev
402d72b6c0 OrangeC: Add support for compiling Windows Resources
OrangeC 7.0 and above come with a resource compiler, ORC.
2026-03-25 17:01:34 -04:00
Brad King
8125a2f192 Merge topic 'orangec-makefiles'
4e28855735 OrangeC: Improve compiler information module formatting
7df028c1f2 OrangeC: Drop redundant nologo flag
1657e9d9f1 OrangeC: Fix shared library creation in Makefile generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11867
2026-03-25 12:00:55 -04:00
Brad King
4e28855735 OrangeC: Improve compiler information module formatting 2026-03-24 15:24:22 -04:00
Brad King
7df028c1f2 OrangeC: Drop redundant nologo flag 2026-03-24 15:24:21 -04:00
Brad King
1657e9d9f1 OrangeC: Fix shared library creation in Makefile generators
Replace the Ninja-specific placeholders with those that work in
both Makefile and Ninja generators.

Fixes: #27716
2026-03-24 15:24:20 -04:00
Willem Deconinck
2b2cea3037 NAG-Fortran: Add support for WHOLE_ARCHIVE on Linux 2026-03-23 17:15:35 -04:00
Brad King
89fe07f800 Merge topic 'rust-rlib'
e6a544836b Rust: Update experimental UUID
881faf67e5 Rust: Switch to building .rs files to .rlib instead of native object files
942ddcdd36 Rust: Add support for position independent code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11686
2026-03-21 10:18:21 -04:00
Baudouin Feildel
881faf67e5 Rust: Switch to building .rs files to .rlib instead of native object files
Each Rust source file given to a target is considered a separate crate
root. There's a concept of a "main crate root", which is the `.rs` file
that is given to the final linker phase in CMake. Other Rust source file
in a target are built as rlib separately.

The project can still build `.rs` files into object files by setting the
Rust_EMIT property on the desired source file.
2026-03-20 09:42:44 -04:00
Brad King
6bbbe81f64 Merge topic 'ExternalData-link-mode'
0db2ea9704 ExternalData: Add configurable link materialization mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11829
2026-03-20 08:54:02 -04:00
Brad King
55f59dbab6 Merge topic 'FindMatlab-mex-Fortran'
1a74acdc3f FindMatlab: Implement matlab_add_mex for Fortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11836
2026-03-20 08:42:07 -04:00
Baudouin Feildel
942ddcdd36 Rust: Add support for position independent code 2026-03-19 14:25:56 -04:00
Arkadiusz Lachowicz
0db2ea9704 ExternalData: Add configurable link materialization mode
Fixes: #27700
2026-03-19 17:34:08 +01:00
adam-sim-dev
1a74acdc3f FindMatlab: Implement matlab_add_mex for Fortran
Add a version file based on the languages of the source files rather
than languages that have been enabled.

Populate link flags and map files for Fortran.

Fixes: #25068
2026-03-19 11:48:37 -04:00
Giancane, Francesco
d2c2151d9e FindVulkan: Search for VkLayer libraries on iOS
On non-iOS systems, Vulkan Layers are loaded dynamically by the Vulkan
Loader at run-time.  On iOS systems, they are provided as frameworks to
be bundled with an application, so there must be a way to discover those
dependencies as well.

Inspired by the FindVulkan module in `KhronosGroup/Vulkan-Samples`.

Co-Authored-By: Brad King <brad.king@kitware.com>
2026-03-18 17:16:54 -04:00
Brad King
88c6815f7e Merge topic 'ExternalData-state-dir'
079c86e0a4 ExternalData: Add relocatable state metadata

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11814
2026-03-17 09:15:02 -04:00
Brad King
c7d287a479 Merge topic 'FindGLEW-cygwin'
2a5392c128 FindGLEW: Fix finding libraries on CYGWIN

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11821
2026-03-17 09:10:50 -04:00
Brad King
c8b36a6a95 Merge topic 'FindGLEW-cygwin' into release-4.3
2a5392c128 FindGLEW: Fix finding libraries on CYGWIN

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11821
2026-03-17 09:10:48 -04:00