Commit Graph
15975 Commits
Author SHA1 Message Date
Brad King 54590f1ae6 Merge topic 'iccarm-next'
6fe9de264b IAR: changes for the upcoming compiler version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12030
2026-05-12 10:46:03 -04:00
Brad King 64fc2f8089 Merge topic 'ctest-llvm-cov'
a79ac015c6 ctest: Merge llvm-cov's .profraw files into a .profdata file for each test
5494697ed1 Tests: Add case for llvm-cov usage by ctest command line modes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12007
2026-05-12 10:32:10 -04:00
Brad King da83ac8b9b Merge topic 'FindBoost-1.91'
8a4f5b0afb FindBoost: Add support for Boost 1.91

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Christoph Grüninger <foss@grueninger.de>
Merge-request: !12045
2026-05-12 09:48:22 -04:00
Brad King 8a4f5b0afb FindBoost: Add support for Boost 1.91
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_91_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.91.0 source tree.

Dependencies differ from 1.90:

* Boost.Iostreams no longer depends on Boost.Regex
* Boost.Log no longer depends on Boost.Regex

Fixes: #27803
2026-05-11 16:55:05 -04:00
Serguei E. Leontiev 884d312784 PellesC: Add makefile rules for preprocessor and assembly output
Issue: #21536
2026-05-11 14:55:38 -04:00
Brad KingandSerguei E. Leontiev bc51518821 PellesC: Compile for architecture matching LIB environment variable
Issue: #21536
Co-authored-by: Serguei E. Leontiev <leo@sai.msu.ru>
2026-05-11 14:55:12 -04:00
Brad King 20ccf97df8 PellesC: Configure linker mode for ASM_POASM
This was missed in commit a95fae2d36 (PellesC: Add support for ASM_POASM
language assembler, 2026-04-21).
2026-05-11 14:11:31 -04:00
Joseph Snyder a79ac015c6 ctest: Merge llvm-cov's .profraw files into a .profdata file for each test
If the CTEST_TEST_COVERAGE_TOOL is set to LLVM-COV, use the
`llvm-profdata --merge` functionality to collect the `.profraw` files
generated by running each test into a combined `.profdata` file.
This is the file that could be used to parse or display coverage
information for each test.

Issue: #26932
2026-05-11 11:33:41 -04:00
Brad King df6629b401 Merge topic 'cuda-compiler-detection-error'
30488911c7 CUDA: Better diagnostic error when compiler identification fails

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12029
2026-05-11 11:17:17 -04:00
Felipe Torrezan 6fe9de264b IAR: changes for the upcoming compiler version
Significant changes on the next major version of the IAR compiler
required some changes in CMake:

- __IAR_COMPILERBASE__ offers a fine grained versioning option
  in comparisom with __IAR_SYSTEMS_ICC__, which only referred
  to the IAR internal platform version.

- C++20 Language support added for Arm (v10.10.1+), where libc++
  is used by default.
2026-05-11 11:25:57 +02:00
Robert Maynard 30488911c7 CUDA: Better diagnostic error when compiler identification fails
Fixes: #27800
2026-05-08 09:48:31 -04:00
Brad King eb1a6e2169 Merge topic 'exe-check-find'
7406f0be82 Modules: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12025
2026-05-08 07:45:27 -04:00
Brad King 64b8f7251d Merge topic 'nasm-32bit'
3e2d51e823 ASM_NASM: Detect 32-bit object formats from C or C++ target architecture

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12026
2026-05-08 07:25:22 -04:00
scivision 7406f0be82 Modules: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL
Capture `execute_process` calls' `RESULT_VARIABLE`.

We don't actually need to check the result as we presume the existing
logic is already adequate, and sometimes programs return non-zero values
as result of valid query.  I.e. this is a "safe" way to broadly protect
these scripts.

Issue: #27782
2026-05-07 13:36:36 -04:00
St Rangeset f9a127c713 ASM_NASM: Allow flags to override default object format
Move the `<FLAGS>` placeholder to after our builtin `-f` format flag.
This ensures user-specified flags take precedence, as NASM uses
the last occurrence of the `-f` argument.

Issue: #27797
2026-05-07 09:54:34 -04:00
Brad King 3e2d51e823 ASM_NASM: Detect 32-bit object formats from C or C++ target architecture
Fixes: #27797
2026-05-07 09:44:58 -04:00
Brad King 57a1945745 Merge topic 'exe-check'
8d48d755f0 Tests: Add missing execute_process result checks
a1b5c0da87 Modules: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL
6b4432bc10 FindGit: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12011
2026-05-07 08:07:07 -04:00
Brad King 68b4d85d65 Merge topic 'fix_f90_try_compile'
eaa32fad4d Fortran: Fix check for F90 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12018
2026-05-07 08:03:22 -04:00
Brad King ea1d99dc18 Merge topic 'nagfor_response_files'
65fbe16e16 NAG Fortran: Use `-xldarg @` to pass response files to the linker
6dc46638f4 NAG Fortran: Fix response file flag for creating archives
b53d3c7cc1 Makefiles: Make logic enabling CUDA device link response files more specific

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12013
2026-05-07 08:01:36 -04:00
Simon Maertens eaa32fad4d Fortran: Fix check for F90 support
Since commit db76876db5 (Modules: Use new SOURCES_FROM_* try_compile
(1/2), 2022-09-26, v3.25.0-rc1~74^2~1) the variable containing the F90
code was named incorrectly.  Thus the compilation test was performed on
an empty source file.
2026-05-06 15:21:32 -04:00
scivision a1b5c0da87 Modules: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL
Capture the `execute_process` command's `RESULT_VARIABLE`.

Issue: #27782
2026-05-06 11:16:36 -04:00
Brad King bfeef792bb Merge topic 'openwatcom-linker-id'
2e549c1df4 CMakeDetermineLinkerId: support the OpenWatcom linker ID

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12012
2026-05-06 10:21:23 -04:00
scivision 6b4432bc10 FindGit: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL
Issue: #27782
2026-05-06 03:18:34 -04:00
Simon Maertens 65fbe16e16 NAG Fortran: Use -xldarg @ to pass response files to the linker
The `nagfor` compiler driver does not invoke the linker directly.
Instead it runs the system C compiler driver, which then invokes the
linker.  Passing `@` to NAG Fortran expands the response file before
it reaches the linker, which might lead to too long linker lines.
`-Wl,@`, used since commit 10d6c3a635 (NAG: Pass response files
through front-end to the linker, 2018-08-01, v3.13.0-rc1~244^2), can
lead to wrong placement of the response file on the linker line and
doesn't work at all when the response file is the only object file
passed to the NAG Fortran frontend.

Instead use `-xldarg @` to pass a response file through to the linker
without any intermediate expansion.  However, the response file
generated by Ninja can contain flags meant for the compiler driver,
so we need to disable response files for these flags altogether.

Fixes: #23577
2026-05-06 02:00:40 +01:00
Simon Maertens 6dc46638f4 NAG Fortran: Fix response file flag for creating archives
Since commit 10d6c3a635 (NAG: Pass response files through front-end to
the linker, 2018-08-01, v3.13.0-rc1~244^2) we use `-Wl,@` instead of `@`
in order to pass the response file through the `nagfor` compiler driver
to the linker.  However, this is not needed for the archiver.  Create
a separate rule variable so we can use different response file flags
for archiving and linking.

Issue: #23577
2026-05-05 20:07:17 -04:00
Serguei E. Leontiev 7750b59f17 PellesC: Add support for long link lines using response files
Issue: #21536
2026-05-05 15:35:05 -04:00
Ben Boeckel 2e549c1df4 CMakeDetermineLinkerId: support the OpenWatcom linker ID 2026-05-05 12:24:59 -04:00
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