Commit Graph

911 Commits

Author SHA1 Message Date
Brad King 383406fc18 Merge topic 'pass-trivial-by-value'
b1fdab3cc1 source: Pass small and trivially copyable types by value
7829ea76ad source: Pass cmFileTime by value
99c10afc26 source: Pass trivial dap::*Event by value
0bcb8d6e3c source: Pass cmFileAPI::Object by value
964e992ec5 source: Pass cmCTestResourceAllocator::Resource by value
ee1c32b6d7 source: Pass cmBuildOptions by value
fa0e5906ff source: Pass cmStringRange by value
0c4040057a source: Pass cm::string_view by value

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10948
2025-08-02 06:23:48 -04:00
Brad King 63753ed9ff Merge topic 'ci-iar'
49382f0377 ci: Update to IAR arm 9.70.1, riscv 3.40.1, rl78 5.20.1, rx 5.20.1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10999
2025-08-02 06:16:42 -04:00
Brad King 49382f0377 ci: Update to IAR arm 9.70.1, riscv 3.40.1, rl78 5.20.1, rx 5.20.1
Run `.gitlab/ci/repackage/iar.ps1` with the installer and host the
package archives ourselves.
2025-08-01 12:18:19 -04:00
Brad King 26357b1ddf Merge topic 'ci-warning-flags'
b51127249e ci: Enable -Wstrict-prototypes in tests for merge request pipelines
58d5f34d31 Replace deprecated -Werror-implicit-function-declaration with -Werror=
78c0935c9b Enable -Wundefined-func-template when building CMake's C++ code
2c6dde430a Enable -Wstrict-prototypes when building CMake's C code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10983
2025-08-01 11:18:05 -04:00
Daniel Pfeifer b1fdab3cc1 source: Pass small and trivially copyable types by value 2025-08-01 09:56:00 -04:00
Brad King b51127249e ci: Enable -Wstrict-prototypes in tests for merge request pipelines
Enable it in Makefile generator jobs that run in merge requests.
In particular, this causes RunCMake tests to fail if they build
C code with a missing function prototype because the compiler's
stderr reaches RunCMake's checks.  Catch this before staging.

Skip enabling this in the Fedora+Makefiles job because Fedora's GCC
now defaults to C23 under which -Wstrict-prototypes does not warn.

Suggested-by: Matthew Woehlke <matthew.woehlke@kitware.com>
2025-07-31 10:10:15 -04:00
Brad King 15f788814e ci: Configure clazy job to build with system jsoncpp
Extend commit bdb9d818d2 (ci: Add lint job to run clazy on our
C++ code, 2025-07-22) to avoid linting third-party jsoncpp code.
2025-07-29 14:56:23 -04:00
Brad King bdb9d818d2 ci: Add lint job to run clazy on our C++ code
Suppress all failing checks for now.  They can be incrementally
enabled and fixed in the future.
2025-07-24 10:45:05 -04:00
Brad King c6b2439aad ci: Add clazy to Fedora base image 2025-07-24 10:44:59 -04:00
Brad King 671b52fc5d Merge topic 'pchreuse-refactor'
11ee18b758 ci: extend msvc_v71_nmake `RunCMake.PrecompileHeaders` test timeout
1c91fadbe8 Tests/RunCMake/PrecompileHeaders: support extended timeout
42f2867b3b pchreuse: defer dependency addition until generation time
f9bc615d9a pchreuse: ban PCH reuse from targets which disable PCH
f78f592b78 pchreuse: defer target existence enforcement to generation time
3ef773490d pchreuse: defer PCH consistency checks to generation time
1d701491a2 pchreuse: always ask the PCH reuse target for PDB information
6e7da8aa95 cmGeneratorTarget: factor out reuse target computation
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: alcroito <alexandru.croitor@qt.io>
Acked-by: Vincent X <gulackeg@gmail.com>
Merge-request: !10887
2025-07-23 12:07:07 -04:00
Brad King 7f168d5bb1 Merge topic 'msvc-std-clatest'
0d758be222 MSVC: Enable C23 language support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10949
2025-07-23 11:59:21 -04:00
Michael Hirsch 0d758be222 MSVC: Enable C23 language support
Introduced support via `-std:clatest` in cl 19.39.
2025-07-22 13:50:44 -04:00
Ben Boeckel 11ee18b758 ci: extend msvc_v71_nmake RunCMake.PrecompileHeaders test timeout 2025-07-22 12:42:58 -04:00
Brad King 82ac700f78 ci: Drop nightly job that builds CMake with vendored curl on macOS
Revert commit 31884a7146 (ci: Add nightly job to build CMake with
vendored curl on macOS, 2024-05-09, v3.30.0-rc1~130^2).  After
curl 8.15.0 dropped support for the Secure Transport backend, we
rely on the curl provided by macOS to use the system certificate
store.
2025-07-21 14:03:33 -04:00
Brad King cbc3166ca4 Merge topic 'clang-cl-c23'
9a720d96eb clang-cl: Add support for C23

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Acked-by: Raul Tambre <raul@tambre.ee>
Merge-request: !10916
2025-07-02 08:01:58 -04:00
Yonggang Luo 9a720d96eb clang-cl: Add support for C23
Although there is no `cl -std:c23` flag, the underlying Clang compiler
does have a C23 mode we can activate by passing `-std=c23` through a
`clang-cl` wrapper flag.

Also port the fix from commit 30139913e9 (VS: Restore support for mixing
C++23 and C in one target with clang-cl, 2024-12-09, v3.31.3~10^2).

Fixes: #27038
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Co-authored-by: Brad King <brad.king@kitware.com>
2025-07-01 11:20:56 -04:00
Brad King d89f1cbc16 ci: Enable Emscripten test on some Debian jobs in nightly pipeline 2025-06-17 15:07:46 -04:00
Brad King 33082bf817 ci: add scripts to install Emscripten 4.0.9 2025-06-17 15:07:46 -04:00
Brad King 7fdbd6a292 Merge topic 'ci-xcode-16.4'
25ffa98d99 ci: update macOS jobs to use Xcode 16.4

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10886
2025-06-17 09:02:10 -04:00
Brad King 25ffa98d99 ci: update macOS jobs to use Xcode 16.4 2025-06-13 14:28:29 -04:00
Brad King 63c3e1fd3b ci: Shorten name of job testing Intel 2021.9 compilers on Windows
We do not need to test more than one patch level.
2025-05-21 16:47:03 -04:00
Brad King ebeee21983 ci: Update to IntelLLVM 2025.1 on Windows 2025-05-21 16:34:41 -04:00
Brad King 3bce19c653 ci: Add script to repackage Intel oneAPI compilers
Intel compilers for Windows are provided only via installer executables.
Add a script to repackage the parts we need for CMake's CI jobs.
2025-05-21 15:33:34 -04:00
Brad King 3955e9b614 Merge topic 'ci-msvc-14.44'
e37a40442a ci: Update Windows builds to MSVC 14.44 toolset
c955d5c31f ci: Tie Intel 2024.1 jobs on Windows to MSVC 14.43 toolset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10802
2025-05-21 08:24:05 -04:00
Brad King 81c7ed367c Merge topic 'ci-msvc-14.44' into release-4.0
e37a40442a ci: Update Windows builds to MSVC 14.44 toolset
c955d5c31f ci: Tie Intel 2024.1 jobs on Windows to MSVC 14.43 toolset

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10802
2025-05-21 08:24:03 -04:00
Brad King e37a40442a ci: Update Windows builds to MSVC 14.44 toolset 2025-05-20 10:24:48 -04:00
Brad King c955d5c31f ci: Tie Intel 2024.1 jobs on Windows to MSVC 14.43 toolset
Intel 2024.1 tools do not work with the MSVC 14.44 standard library.
2025-05-20 10:23:30 -04:00
Brad King dc59932f7f Merge topic 'ci-no-kwsys-console-buf' into release-4.0
16ceddc77e ci: Disable KWSys ConsoleBuf test that breaks on Windows Terminal 1.22+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10784
2025-05-14 16:36:08 -04:00
Brad King 16ceddc77e ci: Disable KWSys ConsoleBuf test that breaks on Windows Terminal 1.22+
We've removed use of KWSys ConsoleBuf in post-4.0 commit 3e88020aed
(StdIo: Replace uses of KWSys ConsoleBuf with StdIo::Console,
2025-05-08).  There is no need to run its test anymore.

Windows-Terminal-Issue: https://github.com/microsoft/terminal/issues/18748
2025-05-14 15:36:11 -04:00
Brad King ce6b0f9e10 ci: Drop unused build artifact
KWSys no longer has a `testConsoleBufChild.exe`.
2025-05-14 09:05:21 -04:00
Ben Boeckel 5750fcd7b4 ci: enable import_std23 module compilation with clang
This is a stock Fedora 42 which uses a `clang` built with `libstdc++` as
the default stdlib.
2025-04-30 17:14:58 +02:00
Brad King 36d96ce044 ci: Drop outdated HDF5 Fortran compiler wrapper patch from Fedora jobs
Drop the patch step from commit 919de8785b (ci: Patch HDF5 Fortran
compiler wrappers in Fedora jobs, 2023-03-30, v3.27.0-rc1~242^2~1).
Fedora 42's HDF5 packages fixed the problem.
2025-04-25 08:33:35 -04:00
Brad King 5b21de16a0 ci: use Fedora 42 images and environments 2025-04-25 08:33:35 -04:00
Brad King efa818f661 ci: update Fedora base images to Fedora 42 2025-04-25 08:33:35 -04:00
Brad King 585e1655c2 ci: Update cppdap in extdeps jobs
Match the version from commit 5098a08fde (cppdap: Update script to get
version as of 2024-08-02, 2024-08-13, v3.31.0-rc1~232^2~1).
2025-04-25 08:33:35 -04:00
Brad King 01d0f037b6 ci: Remove superuser tools from PATH in Linux jobs
Our Linux CI jobs incidentally run as `root` in their containers, but
do not need any superuser tools.  Drop `sbin` entries from the `PATH`.
This also avoids finding user tools through Fedora 42's `sbin -> bin`
symbolic links.
2025-04-25 08:33:30 -04:00
Brad King 47f49e7b9c Merge topic 'ci-cuda'
dfe3b98387 Merge branch 'backport-ci-cuda' into ci-cuda
72e7636540 ci: add tags to tie CUDA jobs to runners with hardware supporting them
1395c1e19a ci: Tell CudaOnly.Architecture test what specific architecture to use
4f2178c4a8 ci: add tags to tie CUDA jobs to runners with hardware supporting them
63a5460faf ci: Tell CudaOnly.Architecture test what specific architecture to use

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10691
2025-04-22 09:22:20 -04:00
Brad King 72e7636540 ci: add tags to tie CUDA jobs to runners with hardware supporting them
CUDA 12.8 deprecated support for compute architectures below 75.
Presumably support will be removed from a future version of the
CUDA Toolkit.  Jobs using such a future version of CUDA will not
be able to compile support for CUDA architectures below 75, so
they will not be able to run on older hardware.  In preparation,
our CI runners now have `cuda-arch-#` tags for the architectures
they support.  Jobs may then be tagged with the minimum architecture
on which they can run.

Tag each job with the highest of the following requirements:

* Most of CMake's tests use the CUDA compiler's default architecture,
  which is based on the version the CUDA toolkit.

* For Clang we currently select architecture 52 if supported by the
  CUDA toolkit, even if that toolkit's NVCC defaults to an older arch.

* The `CudaOnly.Architecture` test uses a specific architecture
  configured by each CI job.
2025-04-21 18:25:49 -04:00
Brad King 1395c1e19a ci: Tell CudaOnly.Architecture test what specific architecture to use
CUDA 12.8 deprecates architectures below 75.  Presumably a future
version will remove it.  Prepare infrastructure to avoid relying on
hard-coded arch 52 in this test.
2025-04-21 18:24:41 -04:00
Brad King 4f2178c4a8 ci: add tags to tie CUDA jobs to runners with hardware supporting them
CUDA 12.8 deprecated support for compute architectures below 75.
Presumably support will be removed from a future version of the
CUDA Toolkit.  Jobs using such a future version of CUDA will not
be able to compile support for CUDA architectures below 75, so
they will not be able to run on older hardware.  In preparation,
our CI runners now have `cuda-arch-#` tags for the architectures
they support.  Jobs may then be tagged with the minimum architecture
on which they can run.

Tag each job with the highest of the following requirements:

* Most of CMake's tests use the CUDA compiler's default architecture,
  which is based on the version the CUDA toolkit.

* For Clang we currently select architecture 52 if supported by the
  CUDA toolkit, even if that toolkit's NVCC defaults to an older arch.

* The `CudaOnly.Architecture` test uses a specific architecture
  configured by each CI job.
2025-04-21 18:17:55 -04:00
Brad King 63a5460faf ci: Tell CudaOnly.Architecture test what specific architecture to use
CUDA 12.8 deprecates architectures below 75.  Presumably a future
version will remove it.  Prepare infrastructure to avoid relying on
hard-coded arch 52 in this test.
2025-04-21 18:07:15 -04:00
Brad King f80de64581 ci: add tags to tie HIP jobs to runners with matching hardware
This is necessary to add CI runners with newer AMD GPUs over time.
2025-04-11 14:40:31 -04:00
Brad King 19f7e1f98d Merge topic 'ci-iar'
f3fe3a7cd3 ci: Update to IAR bxarm 9.60.4

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10632
2025-04-10 08:32:57 -04:00
Brad King 180fc85666 Merge topic 'FindXCTest-xcode-16'
2e59cee922 FindXCTest: Fix test module generation for Xcode 16
c653c1aa47 FindXCTest: Pass -bundle_loader linker flag for test module more reliably

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10573
2025-04-10 08:27:40 -04:00
Brad King 3c08fa2b0d Merge topic 'FindXCTest-xcode-16' into release-4.0
2e59cee922 FindXCTest: Fix test module generation for Xcode 16
c653c1aa47 FindXCTest: Pass -bundle_loader linker flag for test module more reliably

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10573
2025-04-10 08:27:38 -04:00
Brad King 2e59cee922 FindXCTest: Fix test module generation for Xcode 16
In Xcode 7.3 and above, the `TEST_HOST` setting causes Xcode to
implicitly place the test module inside the executable bundle regardless
of the module's own location settings.  Since commit a364d2513a (Xcode:
Fixup XCTest bundle location for Xcode 7.3, 2016-03-25, v3.5.2~6^2) we
explicitly tell CMake to put the test module in the same location so
that generator expressions used by `xctest_add_test` agree with where
Xcode actually puts it.  In Xcode 16 and above, our explicit location
settings for the test module conflict with Xcode's `TEST_HOST` rules,
causing errors about multiple commands producing the same path.

Fix this by dropping CMake's explicit location for the test module
unless needed to match a project-specified location for the testee.
Instead, teach `xctest_add_test` to express the xctest module location
selected by `TEST_HOST` by using generator expressions referencing the
testee bundle.

Fixes: #26301
Fixes: #26514
2025-04-09 17:06:13 -04:00
Brad King f3fe3a7cd3 ci: Update to IAR bxarm 9.60.4
Run `.gitlab/ci/repackage/iar.ps1` with the installer and host the
package archives ourselves.
2025-04-09 09:30:49 -04:00
Brad King 48235b3257 Merge topic 'ci-xcode-16.3'
3b4adc2043 ci: update macOS jobs to use Xcode 16.3

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10575
2025-04-02 10:14:22 -04:00
Brad King 3b4adc2043 ci: update macOS jobs to use Xcode 16.3 2025-04-01 13:10:32 -04:00
Peter Kokot dd2edc3497 FindASPELL: Add components and imported targets
Components are added in a backward-compatible way:

* ASPELL component - adds the ASPELL::ASPELL imported target
* Executable component - adds the ASPELL::Executable imported target

If components are not specified in find_package() call, module, by
default, searches for both components and provides backward
compatibility with the find_package(ASPELL) usage via ASPELL_LIBRARIES,
ASPELL_INCLUDE_DIR, and ASPELL_EXECUTABLE variables.

The ASPELL_DEFINITIONS variable description removed from the
documentation as it was never defined by this module.

Additionally added a Pspell interface check (pspell.h header file) if
Aspell library provides it. It is checked separately because it might
be located in a subdirectory of pspell/pspell.h and code includes it as
`<pspell.h>`. Some distributions package pspell.h as part of the
libpspell development package and install also libaspell development
package as a dependency for BC.

Added also ASPELL_VERSION variable in case aspell executable can
determine it.

Issue: #26811
2025-04-01 05:25:25 +02:00