Commit Graph

67790 Commits

Author SHA1 Message Date
Marc Chevrier
41a4a32135 FindPython: Avoid implicit link library on Windows
Starting with version 3.14, on Windows, by specifying macro Py_NO_LINK_LIB,
the python library is no longer implicitly specified at the link step.

Fixes: #26756
2025-05-20 09:16:14 -04:00
Marc Chevrier
811f00f9ad FindPython: rely on ABIFLAGS on Windows for ABI profile
Starting with Python 3.14, the config_var ABIFLAGS is now also available
on Windows.
2025-05-20 09:16:14 -04:00
Brad King
dadc015020 Merge topic 'ci-no-kwsys-console-buf' into release-3.31
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:47 -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
0883fac39a Merge topic 'clang-libstdcpp-3.31' into release-3.31
802f261d62 experimental/CXXModules: recycle the UUID
c88f3ea1e4 Clang/CXXImportStd: support `-stdlib=libstdc++`
ba5c9703b1 Experimental: recycle the `import std` UUID
9cad48c6cb gcc: support `import std`
acbada3df6 Tests/RunCMake: handle C++26 support where needed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10778
2025-05-14 15:31:47 -04:00
Ben Boeckel
802f261d62 experimental/CXXModules: recycle the UUID
Now that `clang -stdlib=libstdc++` is supported.

(cherry picked from commit 52e2785018 (experimental/CXXModules: recycle
the UUID, 2025-04-30))
2025-05-14 20:15:57 +02:00
Ben Boeckel
c88f3ea1e4 Clang/CXXImportStd: support -stdlib=libstdc++
Fedora 42 ships `clang` with `libstdc++` as the default. Detect and
support `import std;` in this configuration.
2025-05-14 20:15:26 +02:00
Ben Boeckel
ba5c9703b1 Experimental: recycle the import std UUID
Now that GCC is supported, update the feature UUID.

(cherry picked from commit 469175c2e6 (Experimental: recycle the `import
std` UUID, 2024-11-21))
2025-05-14 20:15:10 +02:00
Ben Boeckel
9cad48c6cb gcc: support import std
(cherry picked from commit a980dab9b1 (gcc: support `import std`,
2024-11-21))
2025-05-14 20:14:44 +02:00
Ben Boeckel
acbada3df6 Tests/RunCMake: handle C++26 support where needed
(cherry picked from commit 2791b7564b (Tests/RunCMake: handle C++26
support where needed, 2024-12-31, v4.0.0-rc1~238^2~3))
2025-05-14 15:39:12 +02:00
Brad King
e466e7d702 Merge topic 'cuda-13.0-prep' into release-3.31
b62f3257f2 CUDA/Clang: Update nvcc default architectures with CUDA 13 deprecations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10671
2025-05-14 08:33:52 -04:00
Robert Maynard
b62f3257f2 CUDA/Clang: Update nvcc default architectures with CUDA 13 deprecations
As outlined in the CUDA 12.9 release notes sm_5X, sm_6X, and sm_70
are being removed in CUDA 13:

> Maxwell, Pascal, and Volta architectures are now feature-complete with
> no further enhancements planned. While CUDA Toolkit 12.x series will
> continue to support building applications for these architectures,
> offline compilation and library support will be removed in the next
> major CUDA Toolkit version release.
2025-05-13 09:40:00 -04:00
Brad King
23e8090aa4 Merge topic 'backport-kwsys-SystemInformation-s390x' into release-3.31
b64548eedc KWSys: Backport "Fix GetNumberOfLogicalCPU on s390x" to CMake 3.31

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10758
2025-05-09 09:33:56 -04:00
Tom Stellard
b64548eedc KWSys: Backport "Fix GetNumberOfLogicalCPU on s390x" to CMake 3.31
The format of `/proc/cpuinfo` is different on `s390x` than other
architectures.

Issue: #26619
2025-05-09 09:14:14 -04:00
Brad King
07df1a2a64 Merge topic 'cuda-12.9' into release-3.31
a1b4c30f24 CUDA: Add CUDA 12.9 new architectures and family syntax
b2251e0deb CUDA/Clang: Update architectures supported by CUDA 12.8

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10738
2025-05-03 09:58:35 -04:00
Robert Maynard
a1b4c30f24 CUDA: Add CUDA 12.9 new architectures and family syntax 2025-05-02 15:46:49 -04:00
Robert Maynard
b2251e0deb CUDA/Clang: Update architectures supported by CUDA 12.8 2025-05-02 15:46:06 -04:00
Brad King
85fe8185ba Merge branch 'release-3.30' into release-3.31 2025-04-30 09:39:26 -04:00
Brad King
fefb49bc80 Merge topic 'macos-curl-backend' into release-3.31
1e1129c6fe macOS: Reliably apply workaround for system curl 8.{3,4,5} LibreSSL backend

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10724
2025-04-30 09:39:16 -04:00
Brad King
97ab40893d Merge topic 'macos-curl-backend' into release-3.30
1e1129c6fe macOS: Reliably apply workaround for system curl 8.{3,4,5} LibreSSL backend

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10724
2025-04-30 09:37:36 -04:00
Gregor Jasny
1e1129c6fe macOS: Reliably apply workaround for system curl 8.{3,4,5} LibreSSL backend
In commit f2596dfa0e (macOS: Work around bug in system curl 8.{3,4,5}
LibreSSL backend, 2024-07-16, v3.30.1~2^2) we tried to prefer
`secure-transport` on problematic versions of curl.  However, the
`curl_global_sslset` setting must be applied before every
`curl_global_init` call, not just the first one.  Otherwise a
second (or subsequent) download won't apply the work-around.
2025-04-29 11:49:49 -04:00
Brad King
ee2463e8c5 Merge topic 'automoc-predefs' into release-3.31
ccef69bde4 AUTOMOC: Avoid compiler warnings while computing predefines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10702
2025-04-24 07:12:14 -04:00
Brad King
2e72a6af2d Merge topic 'cuda_tests_no_hardcoded_sm_values' into release-3.31
83a0c72a2d ci: Tell CudaOnly.CompileFlags test what specific architecture to use

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10701
2025-04-24 07:11:28 -04:00
Brad King
ccef69bde4 AUTOMOC: Avoid compiler warnings while computing predefines
LLVM/Clang 20, when invoked as `clang++ -E -c ...`, now warns:

    warning: argument unused during compilation: '-c'

Drop the unnecessary `-c` flag.  Also add a `-w` flag to suppress
warnings so their text is not parsed as predefines.
2025-04-24 07:07:00 -04:00
Robert Maynard
83a0c72a2d ci: Tell CudaOnly.CompileFlags 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 50 in this test.

This extends commit 63a5460faf (ci: Tell CudaOnly.Architecture test what
specific architecture to use, 2025-04-21).
2025-04-23 09:28:13 -04:00
Brad King
26fd56549a Merge topic 'clang-cuda-default-arch' into release-3.31
47ddbc9ded CUDA/Clang: Prefer NVCC's default architecture for each CUDA Toolkit version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10698
2025-04-23 08:56:24 -04:00
Brad King
47ddbc9ded CUDA/Clang: Prefer NVCC's default architecture for each CUDA Toolkit version
This makes the default CUDA architecture consistent across compilers,
and makes it more likely that the resulting binary will run on the
user's hardware.

This also makes hardware requirements for CI builds more consistent.
See commit 4f2178c4a8 (ci: add tags to tie CUDA jobs to runners with
hardware supporting them, 2025-04-21).
2025-04-22 09:51:02 -04:00
Brad King
ff52aa5b40 Merge topic 'backport-ci-cuda' into release-3.31
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:19:47 -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
7b16db932a CMake 3.31.7 v3.31.7 2025-04-10 09:13:20 -04:00
Brad King
24b907a9e2 Merge topic 'backport-3.31-apple-CoreFoundation-headers' into release-3.31
42390e7aa2 Source: Include specific CoreFoundation headers instead of umbrella header
14ffd1cc4e cmXCodeObject: Drop unused CoreFoundation header

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10616
2025-04-09 09:07:27 -04:00
Sergey Fedorov
42390e7aa2 Source: Include specific CoreFoundation headers instead of umbrella header
Some CoreFoundation headers included by the umbrella header, which we do
not need, use syntax that GCC does not support.  Avoid including them.

GCC-Issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115880
2025-04-08 11:38:24 -04:00
Brad King
14ffd1cc4e cmXCodeObject: Drop unused CoreFoundation header
It has not been needed since commit d250b67722 (cmGlobalXCodeGenerator:
Adopt pbxproj object id generation, 2021-01-06, v3.19.3~4^2~2).
2025-04-08 11:38:23 -04:00
Brad King
1c08b49347 Merge topic 'backport-3.31-apple-posix' into release-3.31
aa64d4482f macOS: Define _DARWIN_C_SOURCE in more sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10619
2025-04-08 10:42:25 -04:00
Sergey Fedorov
aa64d4482f macOS: Define _DARWIN_C_SOURCE in more sources
Restore Darwin APIs removed by `_POSIX_C_SOURCE`.
2025-04-07 15:56:36 -04:00
Brad King
42e2964c5f Merge branch 'release-3.30' into release-3.31 2025-03-27 09:10:09 -04:00
Brad King
d5d7175d9c Merge topic 'FindCUDAToolkit-cupti' into release-3.31
cbb8f30ee6 CUDAToolkit: Restore ability to find cupti library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10533
2025-03-27 09:09:47 -04:00
Brad King
750436c3a0 Merge topic 'FindCUDAToolkit-cupti' into release-3.30
cbb8f30ee6 CUDAToolkit: Restore ability to find cupti library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10533
2025-03-27 09:09:24 -04:00
Marcus D. Hanwell
cbb8f30ee6 CUDAToolkit: Restore ability to find cupti library
In commit f69b9b7305 (CUDAToolkit: Restore ability to find cupti
headers, 2023-12-08, v3.28.1~8^2) we did not update the CUPTI library
searches to add the extra search path needed for certain install layouts
(only the header search path). Add the additional library search paths.

Fixes: #26770
Issue: #25484
2025-03-26 14:03:34 -04:00
Brad King
e3c5a561a3 Merge topic 'GNU-linker-pushpop_state-detection' into release-3.31
d5be7c7f31 Linker: Detect GNU push-state/pop-state flags more robustly
7b552b9a64 Linker: Save GNU push-/pop-state detection with compiler inspection results
a9b126b0da Linker: Save linker inspection results with compiler inspection results
3f5f2b2d49 Linker: Honor CMAKE_<LANG>_LINK_LIBRARY_USING_FEATURE_SUPPORTED when FALSE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10468
2025-03-21 08:06:00 -04:00
Marc Chevrier
d5be7c7f31 Linker: Detect GNU push-state/pop-state flags more robustly
Try actually passing them to the linker to see whether it complains.

Fixes: #26766
2025-03-20 11:00:02 -04:00
Marc Chevrier
7b552b9a64 Linker: Save GNU push-/pop-state detection with compiler inspection results
Previously we saved it in the cache, which:

* Persists even if a new version of CMake changes how the check works.
* Does not propagate to `try_compile` checks.
2025-03-20 11:00:02 -04:00
Marc Chevrier
a9b126b0da Linker: Save linker inspection results with compiler inspection results
Reconfigure `CMake<LANG>Compiler.cmake` again after linker information
is detected.
2025-03-20 11:00:02 -04:00
Marc Chevrier
3f5f2b2d49 Linker: Honor CMAKE_<LANG>_LINK_LIBRARY_USING_FEATURE_SUPPORTED when FALSE
It is documented to override `CMAKE_LINK_LIBRARY_USING_FEATURE_SUPPORTED`.
2025-03-20 10:59:01 -04:00
Brad King
e4bf5e4a53 Merge topic 'doc-CMAKE_CONFIG_DIR' into release-3.31
bbbbab4661 Help: Add 3.31 release note for CMAKE_CONFIG_DIR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10474
2025-03-18 09:17:09 -04:00
Brad King
52b62cf4e1 Merge topic 'ASM_MARMASM-config' into release-3.31
9b5915c178 MARMASM: Fix loading linker information

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10487
2025-03-18 09:16:34 -04:00
Marc Chevrier
9b5915c178 MARMASM: Fix loading linker information
Fix misspelled `ASM_DIALECT` variable value.
2025-03-17 12:02:38 -04:00
Peter Kokot
bbbbab4661 Help: Add 3.31 release note for CMAKE_CONFIG_DIR
This was accidentally left out of commit 1df94443fe (fileapi: Add
support for user-wide queries, 2024-08-16, v3.31.0-rc1~177^2).
2025-03-17 11:57:15 -04:00
Brad King
662e8aeea8 Merge topic 'msvc-c++23' into release-3.31
d54916d03a MSVC: Revert use of temporary -std:c++23preview flag for C++23

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10470
2025-03-17 11:41:04 -04:00