15358 Commits

Author SHA1 Message Date
Brad King
85ba6f5d1b Merge branch 'backport-4.0-xcode-macos-deployment-target' 2025-10-26 11:19:58 -04:00
Brad King
1a37c83c7e Xcode: Restore default CMAKE_OSX_DEPLOYMENT_TARGET to run on host
Xcode by default targets the SDK's macOS version rather than the host's
macOS version.  In commit 7b19531291 (macOS: Do not pass any
SDK/-isysroot to compilers by default, 2024-11-06, v4.0.0-rc1~511^2) we
reverted commit 24aafbde11 (Xcode: Adjust deployment target SDK version
to host version, 2015-10-11, v3.4.0-rc2~6^2), but it is still needed for
Xcode.  Restore the behavior so binaries run on the host by default.

Fixes: #27309
2025-10-26 11:19:19 -04:00
Brad King
e927408047 Apple: Initialize deployment target after SDK 2025-10-26 11:16:45 -04:00
Brad King
aa8f174479 Merge topic 'FindPython-3.15' into release-4.1
7f628ea04b FindPython: Add support for Python 3.15
5b78983813 Tests/FindBoost/TestPython: Improve python version list formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11350
2025-10-25 09:15:27 -04:00
Brad King
91525f6eb0 Merge topic 'FindPython-3.15' into release-4.0
7f628ea04b FindPython: Add support for Python 3.15
5b78983813 Tests/FindBoost/TestPython: Improve python version list formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11350
2025-10-25 09:15:04 -04:00
Karolina Surma
7f628ea04b FindPython: Add support for Python 3.15 2025-10-24 17:42:44 -04:00
Brad King
61d0bdf6b7 macOS: Avoid relying on sw_vers when cross-compiling from another OS
We have a few code paths needed only to support builds hosted on
macOS 10.4.  Update the conditions to work when cross-compiling
to macOS from another platform.

This backports commit eb8facd396 (macOS: Avoid relying on sw_vers
when cross-compiling from another OS, 2025-04-28, v4.1.0-rc1~260^2)
to CMake 4.0.

Fixes: #26814
2025-10-22 17:26:36 -04:00
Brad King
d9d65ab54f macOS: Remove outdated condition for CMAKE_OSX_DEPLOYMENT_TARGET
Revert commit 2853326e7a (BUG: Only set CMAKE_OSX_DEPLOYMENT_TARGET on
Mac OSX 10.4 or later, 2009-01-27, v2.8.0~1169).  AFAIK no one is using
macOS versions older than 10.4 anymore.

This backports commit 476b2a386f (macOS: Remove outdated condition
for CMAKE_OSX_DEPLOYMENT_TARGET, 2025-04-28, v4.1.0-rc1~260^2~1)
to CMake 4.0.
2025-10-22 17:26:31 -04:00
Brad King
636d3a7a2f Apple: Backport "Enable linking during iOS toolchain inspection" to 3.31
Backport commit 79a83ddb08 (Apple: Enable linking during
iOS/tvOS/visionOS/watchOS toolchain inspection, 2024-11-14,
v4.0.0-rc1~471^2) to 3.31.

Since commit 11da882a12 (Apple: Introduce separate system name for iOS,
tvOS, and watchOS, 2018-01-15, v3.14.0-rc1~14^2~1) our toolchain
inspection steps, like ABI detection, tell `try_compile` to use a
`STATIC_LIBRARY` instead of an `EXECUTABLE`.  This was needed at the
time to avoid codesign requirements.  However, commit d3a64c4e3f (Xcode:
Explicitly turn off signing in try_compile projects, 2020-07-16,
v3.19.0-rc1~483^2) introduced a more general solution to that problem.
Restore linking during toolchain inspection so that we can detect and
identify the linker.

Suggested-by: Marc Chevrier <marc.chevrier@gmail.com>
Fixes: #26443
2025-10-21 09:22:41 -04:00
Christopher Albert
7e8f76dad2 LFortran: Update flags renamed by version 0.55
The `--generate-object-code` flag is now `--separate-compilation`.

Fixes: #27225
2025-09-15 20:34:16 -04:00
Cristian Le
2e88a3efc2 GNUInstallDirs: Fix regression on -DCMAKE_INSTALL_<dir>=<default> in /usr
Fix commit 9789f7d05e (GNUInstallDirs: Add internal helper to compute
specific defaults, 2025-03-28, v4.1.0-rc1~384^2~3) to avoid updating
explicitly-specified cache entries on the first run.  Do not reset the
default value until at least the second run, during which we have
`_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX` already defined.

Fixes: #27211
2025-09-10 16:03:43 -04:00
Brad King
87d95b2222 ASM: Restore CMAKE_ASM_COMPILER_ARCHITECTURE_ID persistence
Refactoring in commit 019f0f8b32 (ARCHITECTURE_ID: Save persistently
even if empty, 2025-03-13, v4.1.0-rc1~499^2~1) accidentally dropped
part of the variable name in `CMakeASMCompiler.cmake`.

Reported-by: Felipe Torrezan <felipe.torrezan@iar.com>
2025-09-08 10:38:30 -04:00
Marc Chevrier
c504b1c638 FindPython: Ensure correct handling of Python_FIND_ABI variable
Fixes: #27192
2025-09-04 15:06:57 +02:00
Brad King
fc41d4e3f6 Merge topic 'clang_cuda_support_cuda_13' into release-4.1
67c102ef64 Clang/CUDA: Support CUDA Toolkit 13 new include layout

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11079
2025-08-15 08:27:46 -04:00
Brad King
75679c169d Merge topic 'clang_cuda_support_cuda_13' into release-4.0
67c102ef64 Clang/CUDA: Support CUDA Toolkit 13 new include layout

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11079
2025-08-15 08:26:32 -04:00
Robert Maynard
67c102ef64 Clang/CUDA: Support CUDA Toolkit 13 new include layout
This ensures that clang knows about the two includes that are required for CUDA 13.
2025-08-14 09:55:53 -04:00
Brad King
68da4d6100 Merge topic 'cuda_13_support' into release-4.1
3ff777de12 CUDA: Update CUDA tests to handle CUDA 13 deprecations
bbf732525a CUDA: Add CUDA 13.0 support to 'all' and 'all-major' architecture tables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11015
2025-08-05 09:57:59 -04:00
Brad King
21c0a92bd2 Merge topic 'cuda_ensure_arch_order' into release-4.1
8beb309b79 CUDA: Make sure CUDA architectures are in order

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11014
2025-08-05 09:55:46 -04:00
Brad King
58fd8667a5 Merge topic 'qcc-8-cxx-lang-flag' into release-4.1
ea3280f15b Merge branch 'qcc-8-cxx-lang-flag-3.31' into qcc-8-cxx-lang-flag
166061629a QCC-CXX: use `-x c++` on 8+
dc7adb64f3 QCC-CXX: use `-x c++` on 8+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10992
2025-08-05 09:53:50 -04:00
Brad King
f9af4e50c4 Merge topic 'cuda_13_support' into release-4.0
3ff777de12 CUDA: Update CUDA tests to handle CUDA 13 deprecations
bbf732525a CUDA: Add CUDA 13.0 support to 'all' and 'all-major' architecture tables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11015
2025-08-05 09:53:41 -04:00
Brad King
388971557e Merge topic 'cuda_13_support' into release-3.31
3ff777de12 CUDA: Update CUDA tests to handle CUDA 13 deprecations
bbf732525a CUDA: Add CUDA 13.0 support to 'all' and 'all-major' architecture tables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11015
2025-08-05 09:52:56 -04:00
Brad King
1ff9ebe222 Merge topic 'cuda_ensure_arch_order' into release-4.0
8beb309b79 CUDA: Make sure CUDA architectures are in order

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11014
2025-08-05 09:52:16 -04:00
Brad King
2853f1c3d1 Merge topic 'cuda_ensure_arch_order' into release-3.31
8beb309b79 CUDA: Make sure CUDA architectures are in order

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11014
2025-08-05 09:51:43 -04:00
Brad King
9c1123a3c4 Merge topic 'qcc-8-cxx-lang-flag' into release-4.0
166061629a QCC-CXX: use `-x c++` on 8+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10992
2025-08-05 09:50:00 -04:00
Brad King
8a6a6e138c Merge topic 'qcc-8-cxx-lang-flag' into release-3.31
166061629a QCC-CXX: use `-x c++` on 8+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10992
2025-08-05 09:49:15 -04:00
Robert Maynard
bbf732525a CUDA: Add CUDA 13.0 support to 'all' and 'all-major' architecture tables 2025-08-04 11:22:12 -04:00
Robert Maynard
8beb309b79 CUDA: Make sure CUDA architectures are in order
Make sure we always group major versions together instead
of interleaving 100 and 120 families.
2025-08-04 11:06:45 -04:00
Ben Boeckel
166061629a QCC-CXX: use -x c++ on 8+
The `-lang-c++` flag has been deprecated.
2025-08-01 20:51:22 -04:00
Ben Boeckel
dc7adb64f3 QCC-CXX: use -x c++ on 8+
The `-lang-c++` flag has been deprecated.
2025-08-01 20:51:03 -04:00
Brad King
e349b471d8 MSVC: Fix regression that links shared libraries with bogus -shared flag
Clear `CMAKE_SHARED_LIBRARY_CREATE_<LANG>_FLAGS` since no special
link flags are needed to create a DLL with MSVC toolchains.
Our shared library creation rules never referenced that placeholder,
so this variable was never used until commit 951e4d3f62 (Ninja,Makefile:
Move builtin linker flags to <LINK_FLAGS> placeholder, 2025-06-09,
v4.1.0-rc1~37^2~2) taught the generators to look it up directly.

This was not previously noticed because the `-shared` flag
is ignored unless the `-WX` flag enables an error on it.

Fixes: #27106
2025-08-01 12:37:55 -04:00
Brad King
a914434d52 Merge topic 'backport-determine-abi-fix' into release-4.0
41fbc2ce16 CMakeDetermineCompilerABI: Make ABI info string more robust

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10973
2025-07-28 10:17:59 -04:00
Brad King
41fbc2ce16 CMakeDetermineCompilerABI: Make ABI info string more robust
Backport commit c0224f5aa1 (CMakeDetermineCompilerABI: Make ABI info
string more robust, 2025-03-13, v4.1.0-rc1~499^2~4) to 3.31 and 4.0.
2025-07-28 10:16:02 -04:00
Brad King
7591439bb8 FortranCInterface: Add support for LFortran module mangling 2025-07-24 09:56:21 -04:00
Brad King
2f5dce1b40 cmExperimental: remove the flag for Windows Kernel Mode Driver support
Enable setting `CMAKE_SYSTEM_NAME` to `WindowsKernelModeDriver` without
an experimental gate.
2025-07-09 09:54:45 -04:00
Robert Maynard
bf442068bb CUDA: Improve error message for nonexistent compiler paths
Fixes: #25709
2025-07-08 09:58:37 -04:00
Brad King
567ce02d48 Merge topic 'GNUInstallDirs-cached-default' into release-4.1
5071c93a78 GNUInstallDirs: Fix regression on -DCMAKE_INSTALL_<dir>=<default>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Cristian Le <github@lecris.me>
Merge-request: !10921
2025-07-03 13:01:25 -04:00
Brad King
5071c93a78 GNUInstallDirs: Fix regression on -DCMAKE_INSTALL_<dir>=<default>
In commit 42dfcbf1a5 (GNUInstallDirs: Refactor LIBDIR default
calculation, 2025-03-27, v4.1.0-rc1~384^2~2) we introduced the
`_GNUInstallDirs_LIBDIR_get_default` helper and exercised code from
commit 9789f7d05e (GNUInstallDirs: Add internal helper to compute
specific defaults, 2025-03-28, v4.1.0-rc1~384^2~3) for the first time.
Fix the latter's code to update the `CMAKE_INSTALL_<dir>` cache entry
without triggering conversion of a relative path to an absolute path.

Fixes: #27027
2025-07-02 09:14:56 -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
Kefu Chai
2bb8c6aec7 FindBoost: Add support for Boost 1.88
Update the list of known versions.

Run the command

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

to extract dependencies from the 1.88.0 source tree.

Dependencies differ from 1.87:

* Boost.Process now depends on Boost.Filesystem

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2025-06-30 15:26:18 -04:00
Brad King
e9ca1d149e Merge topic 'llvm-binutils' into release-4.1
621d21c827 BinUtils: pick LLVM variants for LLVMFlang and IntelLLVM as well

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10899
2025-06-24 10:45:32 -04:00
Brad King
9c3ce7852f Merge topic 'normalize-toolchain-file' into release-4.1
c393300e2b cmake: Restore acceptance of -DCMAKE_TOOLCHAIN_FILE=//... on non-Windows
cf0f46ed85 Tests/RunCMake/CommandLine: Simplify --toolchain cases

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10901
2025-06-24 10:42:34 -04:00
Brad King
c393300e2b cmake: Restore acceptance of -DCMAKE_TOOLCHAIN_FILE=//... on non-Windows
POSIX specifies that two leading slashes have implementation-defined
interpretation, so CMake 3.31 and below did not normalize away leading
double slashes.  However, most implementations simply treat a leading
`//` as just `/`, so CMake 4.0 now normalizes them away when they do not
correspond to a network path on Windows.

This change exposed that we were not normalizing `CMAKE_TOOLCHAIN_FILE`
before passing its value to `include()` the first time if it was not
passed with the `FILEPATH` or `PATH` cache entry type.  Fix that.

Fixes: #27010
2025-06-23 10:37:59 -04:00
Eisuke Kawashima
621d21c827 BinUtils: pick LLVM variants for LLVMFlang and IntelLLVM as well
Fixes: #26196
2025-06-23 09:39:54 -04:00
Brad King
b8cbc0b2bb Merge topic 'openssl-arm64-windows' into release-4.1
bf52219e4c FindOpenSSL: Add support for ARM64 Windows pre-built binaries
5afebd310e FindOpenSSL: Refactor architecture-specific suffix table

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10893
2025-06-19 10:19:27 -04:00
Matej Kenda
bf52219e4c FindOpenSSL: Add support for ARM64 Windows pre-built binaries
Shining Light Productions now provides OpenSSL binaries for windows-arm64.
2025-06-18 10:52:19 -04:00
Matej Kenda
5afebd310e FindOpenSSL: Refactor architecture-specific suffix table
Do not assume all suffixes start with `x`.
2025-06-18 10:50:54 -04:00
Brad King
bd3f836fa1 Merge topic 'cuda-nvtx3-interop' into release-4.1
c88d5cdd06 CUDAToolkit: Add CUDA 12.9 nvtx3 updates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10889
2025-06-18 09:42:52 -04:00
Robert Maynard
c88d5cdd06 CUDAToolkit: Add CUDA 12.9 nvtx3 updates
Starting in CUDA 12.9 the `nvToolsExt` library is no longer provided.
C and C++ projects should switch over to `nvtx3`.

Projects that previously used `nvToolsExt` with Fortran, can now use the
new `CUDA::nvtx3_interop` target for the same functionality with the new
NVTX v3 API.
2025-06-17 09:55:21 -04:00
Brad King
50bd58c352 Merge topic 'doc-generator-xrefs'
98837b42c3 Help: minor reference and markup fixes
b634998727 Help: add and make references to generators consistent

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10877
2025-06-17 09:10:23 -04:00
Brad King
bbed0589ec Merge topic 'matlab2025a'
836060a783 FindMatlab add R2025a version map

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10881
2025-06-17 09:06:51 -04:00