Commit Graph

15334 Commits

Author SHA1 Message Date
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
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
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
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
scivision
836060a783 FindMatlab add R2025a version map
Just like 20412181e9
2025-06-12 21:53:29 -04:00
Peter Kokot
c31f68bded FindBZip2: Fix check for 1.0.1 and earlier versions
Changes:
- BZip2 versions before 1.0.2 required `<stdio.h>` header file to be
  included before `bzlib.h` for the FILE definition.
- Described `BZIP2_NEED_PREFIX` in more details.
2025-06-13 01:25:18 +02:00
Ben Boeckel
b634998727 Help: add and make references to generators consistent 2025-06-12 21:25:24 +02:00
Brad King
feba34c68a Merge topic 'link-flags'
d592558b8b cmLocalGenerator: Drop no-op link flag placeholder infrastructure
67639002ad Ninja,Makefile: Drop now-unused placeholders from link rule variables
951e4d3f62 Ninja,Makefile: Move builtin linker flags to <LINK_FLAGS> placeholder
6b618c6079 cmLocalGenerator: Clarify MODULE link flags placeholder population
c52a654aa1 cmLocalGenerator: Improve formatting of rule placeholder variable list
37cf9941ed UseEcos: Add missing placeholder in rules to link executables
fa61be5bc4 Embarcadero,OpenWatcom: Clear unused flags for creating shared libraries
124e40947c CMakeCommonLanguageInclude: Do not unset MODULE library flags when empty
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10869
2025-06-11 10:28:07 -04:00
Brad King
67639002ad Ninja,Makefile: Drop now-unused placeholders from link rule variables
Previously we used separate placeholders for builtin linker flags:

* CMAKE_<LANG>_LINK_FLAGS for EXECUTABLEs
* CMAKE_SHARED_LIBRARY_CREATE_<LANG>_FLAGS for SHARED libraries
* CMAKE_SHARED_MODULE_CREATE_<LANG>_FLAGS for MODULE libraries

These are now always replaced by the empty string, so drop them
from our rule variables.
2025-06-10 14:43:15 -04:00
Brad King
929c66c068 Merge topic 'update_nvhpc_visibility_and_pie_flags'
ea6b29a367 NVHPC: Add support for 25.07 no-pie option
8ef90ffc52 NVHPC: Add support for COMPILE_OPTIONS_VISIBILITY

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10867
2025-06-10 09:57:03 -04:00
Brad King
37cf9941ed UseEcos: Add missing placeholder in rules to link executables 2025-06-10 08:53:47 -04:00
Brad King
fa61be5bc4 Embarcadero,OpenWatcom: Clear unused flags for creating shared libraries
Clear `CMAKE_SHARED_LIBRARY_CREATE_<LANG>_FLAGS` since no special
link flags are needed to create a DLL with these toolchains.
Our shared library creation rules do not reference the placeholder,
so this variable was never used.  However, we may soon teach the
generators to look it up directly.
2025-06-10 08:53:47 -04:00
Brad King
124e40947c CMakeCommonLanguageInclude: Do not unset MODULE library flags when empty 2025-06-10 08:53:47 -04:00
Brad King
7b4c87edae ADSP: Do not pass executable link flags when creating a static library
This was done by mistake in commit d090159318 (ENH: add support for the
ADSP toolchains for Blackfin, Shark and TigerShark DSPs, patch from
Raphael Cotty, 2007-07-12, v2.6.0~1446), and preserved in the
generalization by commit e9eabb0dcd (ADSP: Configure compiler in
compiler module, 2022-03-24, v3.24.0-rc1~331^2~1).  Fix both places.
2025-06-09 16:08:33 -04:00
Brad King
58a70cfc38 Swift: Drop unused placeholder in shared library link rule
The `CMAKE_SHARED_LIBRARY_<LANG>_FLAGS` placeholder is meant for flags
used to compile sources meant for a shared library.  It is used for
C/CXX to add PIC flags.  It is not documented for public use, and we do
not populate it for Swift anyway.
2025-06-09 16:04:10 -04:00
Brad King
0165b3fa62 CrayPrgEnv: Drop unused static library "link" flags variable
In commit c54a621b55 (Cray: New platform file for Cray Linux Environment
and PrgEnv, 2015-11-13, v3.5.0-rc1~216^2~1) we populated variable
`CMAKE_STATIC_LIBRARY_LINK_<LANG>_FLAGS`, but we never reference it, and
the generators do not use it.  Static libraries are archives, and are
not produced by a linker.
2025-06-09 15:53:04 -04:00
Brad King
2f177e61d5 GNU: Remove non-functional code in OBJCXX support
In commit 9e66397c28 (Languages: Add support for Objective-C++,
2019-09-13, v3.16.0-rc1~44^2~2) we set `CMAKE_OBCXX_LINK_FLAGS`.
It was a typo for `CMAKE_OBJCXX_LINK_FLAGS`, and so has not had
any effect.
2025-06-09 15:28:29 -04:00
Robert Maynard
ea6b29a367 NVHPC: Add support for 25.07 no-pie option 2025-06-09 14:36:07 -04:00
Brad King
1824b771e9 Merge topic 'cpack-nuget-symbol-package'
e71396c8db CPack/NuGet: Enable the generation of NuGet symbol package(s)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10852
2025-06-06 08:22:00 -04:00
Brad King
91690cac34 Merge topic 'msvc-link-machine'
92d6126450 MSVC: Move link -machine flag out of CMAKE_*_LINKER_FLAGS
bb8baacbcc MSVC: Factor out link -machine flag name
4c6c7f4d45 MSVC: Move link -subsystem flag handling near and -machine flag handling
f1a80a5581 CUDA: Drop unused link rule variable setting on Windows
a0732ce47f CMAKE_STATIC_LINKER_FLAGS: Fix terminology in cache entry help string
53aab8acd6 Tests: Generalize test name RunCMake.MSVC{Warning => Default}Flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10849
2025-06-06 08:19:54 -04:00
Brad King
b01c1df41b Merge topic 'cuda-nvcc-system-includes'
d2be863b5e CUDA: Add include paths from nvcc SYSTEM_INCLUDES entry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10857
2025-06-06 08:12:49 -04:00
Brad King
dc646156d0 Merge topic 'cuda-nvcc-system-includes' into release-4.0
d2be863b5e CUDA: Add include paths from nvcc SYSTEM_INCLUDES entry

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10857
2025-06-06 08:12:47 -04:00
Robert Maynard
8ef90ffc52 NVHPC: Add support for COMPILE_OPTIONS_VISIBILITY 2025-06-05 15:12:45 -04:00
Robert Maynard
d2be863b5e CUDA: Add include paths from nvcc SYSTEM_INCLUDES entry
Upcoming versions of nvcc are adding support for `SYSTEM_INCLUDES`
which contain includes that are implicitly used with `-isystem`
instead of `-I`.

Support of this is needed in CMake as some CUDA Toolkit releases will
start to have a different include directory layout and using only the
output from `INCLUDES` will be insufficient to find all headers.
2025-06-05 10:53:12 -04:00
Jens Carl
e71396c8db CPack/NuGet: Enable the generation of NuGet symbol package(s)
Enable the generation of NuGet symbol package(s) with the new variable
`CPACK_NUGET_SYMBOL_PACKAGE`. CPack generates then normal nuget package
(*.nupkg) and a symbol nuget package (*.snupkg). The new generate
package contains PDB files.

Fixes: #26976
2025-06-05 10:41:22 -04:00
Brad King
2299f09898 Merge topic 'FindCUDAToolkit-doc-links'
d8e9b1bbdf FindCUDAToolkit: Simplify internal documentation links
db9b79fb9b FindCUDAToolkit: Update documentation URLs
1049b0d9a5 FindCUDAToolkit: Fix documentation link to cuRAND section

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10859
2025-06-05 09:37:02 -04:00
Brad King
92d6126450 MSVC: Move link -machine flag out of CMAKE_*_LINKER_FLAGS
The `CMAKE_{EXE,SHARED,MODULE,STATIC}_LINKER_FLAGS` variables are
not language-specific, so multiple languages' toolchains may disagree
about if/how to pass the flag through a compiler driver to the linker.
Furthermore, carrying the flag in public-facing variables allows projects
or users to change it even though it is required.  Add policy CMP0197
to remove the flag from the public-facing variables and generate it
automatically instead:

* For command-line generators, add the `-machine:` flag to the
  linker and archiver rule variables.

* For Visual Studio generators, we do not need to explicitly add the
  link `-machine:` flag.  MSBuild automatically adds it, and the new
  behavior actually removes a duplicate we generated previously.

Issue: #21934
2025-06-05 09:16:54 -04:00
Brad King
d8e9b1bbdf FindCUDAToolkit: Simplify internal documentation links 2025-06-04 19:40:04 -04:00