Commit Graph

15340 Commits

Author SHA1 Message Date
Brad King
e5dc5dfe10 Merge topic 'cuda-nonexistent-compiler-path'
bf442068bb CUDA: Improve error message for nonexistent compiler paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10933
2025-07-09 09:43:29 -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
64b35e8fcb Merge topic 'gtest-use-json-output-for-discovery'
088b0af2f9 GoogleTest: Fix naming of tests with named parameters
3f780c3fde GoogleTest: Set DEF_SOURCE_LINE on tests if file and line are known
1cdceae8e3 GoogleTest: Parse discovered test list from JSON output if supported
07d14c21a9 GoogleTest: Add tests for NO_PRETTY_VALUES and NO_PRETTY_TYPES
54bb974b27 GoogleTest: Add tests for named parameters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Dennis Lambe <malsyned_kitware@malsyned.net>
Merge-request: !10739
2025-07-08 09:40:03 -04:00
Dennis Lambe Jr.
088b0af2f9 GoogleTest: Fix naming of tests with named parameters
Recent changes to the JSON and stdout parsers changed the current test
names from an unintentional bug to an intentional compatibility hack.
This commit removes that compatibility hack and makes tests with named
parameters follow the same naming conventions as tests with numbered
parameters.

Fixes: #26939
2025-07-08 07:58:35 +10:00
Ottmar Zittlau
3f780c3fde GoogleTest: Set DEF_SOURCE_LINE on tests if file and line are known
This information is available when --gtest_output=json is supported,
which it almost always is on GoogleTest >= 1.8.1.
2025-07-08 07:58:34 +10:00
Ottmar Zittlau
1cdceae8e3 GoogleTest: Parse discovered test list from JSON output if supported
The --gtest_output=json option is supported from gtest 1.8.1 onwards.
Earlier versions output a warning about it being an unrecognized option,
and builds that #define GTEST_HAS_FILE_SYSTEM 0 output an error about it
being unsupported, but in both cases still continue outputting the same
plain text output as before and return an exit code of 0.

We now add that option and check for whether the JSON file is generated,
falling back to parsing the plain text output as before if it isn't or
if the environment variable NO_GTEST_JSON_OUTPUT is set.

The fake executor binaries are sensitive to parameter order. This commit
adds --gtest_output:json arguments to a number of tests added for the
new JSON parser. The argument order has been adjusted for the
invocations of those binaries.

Co-Authored-By: Craig Scott <craig.scott@crascit.com>
Co-Authored-By: Dennis Lambe Jr. <malsyned@malsyned.net>
2025-07-08 07:58:34 +10:00
Brad King
bc07a21836 Merge topic 'post-rel-dev'
8071304f2e Configure CMake itself with policies through CMake 4.0
f7380d8c4a export: Increase maximum policy version in exported files to 4.0
94ff184a63 Add deprecation warnings for policies CMP0143 and below

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10925
2025-07-03 13:03:14 -04:00
Brad King
56958a94bb Merge topic 'GNUInstallDirs-cached-default'
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:27 -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
f7380d8c4a export: Increase maximum policy version in exported files to 4.0
The files generated by `install(EXPORT)`, `export()`, and
`install_jar_exports()` commands are known to work with policies
as of CMake 4.0, so enable them in sufficiently new CMake versions.
2025-07-02 09:41:30 -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
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
b8f1b684d4 Merge topic 'FindBoost-1.88'
2bb8c6aec7 FindBoost: Add support for Boost 1.88

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10915
2025-07-01 11:18:50 -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
1a3dd3ae5b Merge topic 'llvm-binutils'
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:33 -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
be6c582ef6 Merge topic 'normalize-toolchain-file'
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:36 -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
c61d4d48a6 Merge topic 'emscripten-platform'
d89f1cbc16 ci: Enable Emscripten test on some Debian jobs in nightly pipeline
33082bf817 ci: add scripts to install Emscripten 4.0.9
c6da668b13 Emscripten: Add tests for the Emscripten toolchain
96d9b94a98 Emscripten: Add platform modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10832
2025-06-19 10:22:15 -04:00
Brad King
739d188703 Merge topic 'openssl-arm64-windows'
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:28 -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
96e1d168fc Merge topic 'cuda-nvtx3-interop'
c88d5cdd06 CUDAToolkit: Add CUDA 12.9 nvtx3 updates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10889
2025-06-18 09:42:53 -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
Quinn Powell
96d9b94a98 Emscripten: Add platform modules
Issue: #18423
2025-06-17 15:07:45 -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