Commit Graph

15359 Commits

Author SHA1 Message Date
John Parent
c6763bb021 ctest: support a new --objects-dir argument
When shorter object directories are used, CTest needs to know where to
look for artifacts.
2025-07-28 12:01:28 -04:00
Brad King
795e3f1ecc Merge topic 'lfortran-module-mangling'
7591439bb8 FortranCInterface: Add support for LFortran module mangling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10969
2025-07-28 09:30:48 -04:00
Brad King
7591439bb8 FortranCInterface: Add support for LFortran module mangling 2025-07-24 09:56:21 -04:00
Brad King
558b3922c3 Merge topic 'ExternalProject-env-vars'
e301cbffcc ExternalProject: Set environment variables
ff21c3f78a Help: ENVIRONMENT_MODIFICATION: split modification ops

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !10842
2025-07-23 12:08:36 -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
Brad King
13c3cf1b9c Merge topic 'llvm-install-name-tool'
9913d3ca1b BinUtils: Search for LLVM alternative to Apple's install_name_tool

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10955
2025-07-23 09:31:21 -04:00
Brad King
7c3e0d380f Merge topic 'clang-msvc-sysroot'
e06235e568 Clang: Implement CMAKE_SYSROOT for GNU-like front-end targeting MSVC ABI

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10962
2025-07-23 09:27:43 -04:00
mccakit
9913d3ca1b BinUtils: Search for LLVM alternative to Apple's install_name_tool
It is called `llvm-install-name-tool`.

Fixes: #27069
2025-07-22 13:59:09 -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
Evan Wilde
e301cbffcc ExternalProject: Set environment variables
Add the ability to modify the environment of the various steps running
as part of an external project build. This specifically adds the ability
to set them on the configure , build , install, and test steps, as well
as exposing the `ENVIRONMENT_MODIFICATION` keyword arguments to
`ExternalProject_Add_Step`, allowing customization of the environment of
custom steps.

The values of the environment variable respect the `LIST_SEPARATOR`.

Fixes: #26963
2025-07-22 13:13:23 -04:00
Brad King
e06235e568 Clang: Implement CMAKE_SYSROOT for GNU-like front-end targeting MSVC ABI
Fixes: #26084
2025-07-21 15:21:35 -04:00
Peter Kokot
0622cb343e AIX: Drop unnecessary -l from CMAKE_DL_LIBS
The `-lld` linker flag was added from the previous command-line script
that have all values in `CMAKE_DL_LIBS` prepended with `-l`.

On AIX, the `dlopen()` is otherwise in C library (default). But it seems
that also `libld` library was once needed on some versions to have
dynamic loading working.

Sync `CMAKE_DL_LIBS` value style with all other current usages.
2025-07-21 11:34:03 -04:00
Brad King
8eeeeb7efe Merge topic 'doc-FindDoxygen-TypoFix'
8695591d50 FindDoxygen: Fix typo in docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10956
2025-07-21 10:29:10 -04:00
Austin Schuberth
8695591d50 FindDoxygen: Fix typo in docs
The example for using custom configuration file used
`doxygen_add_doxs()` instead of `doxygen_add_docs()`.
2025-07-21 10:21:07 -04:00
Peter Kokot
59da6d9e5c TestBigEndian, CMAKE_<LANG>_BYTE_ORDER: Update documentation
- Fixed typo in the module description.
- Added examples section highlighting the code migration towards the
  `CMAKE_<LANG>_BYTE_ORDER` variable.
- Documented command similar to other modules.
- Added examples for the `CMAKE_<LANG>_BYTE_ORDER` variable and
  explained when endianness for different languages can be used.
2025-07-16 14:55:48 +02:00
Brad King
d4306378b9 Merge topic 'freebsd_linker_variables'
7ae11ea4e7 Platform: Add compiler platform modules for BSDs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10919
2025-07-15 10:54:13 -04:00
Undefine
7ae11ea4e7 Platform: Add compiler platform modules for BSDs
These set variables required for CMAKE_LINKER_TYPE to work

Fixes: #27037
2025-07-12 21:36:42 +02:00
Brad King
5cb9891d64 Merge topic 'windows-kernel-mode-driver'
2f5dce1b40 cmExperimental: remove the flag for Windows Kernel Mode Driver support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !10937
2025-07-10 10:30:26 -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
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