Commit Graph
16118 Commits
Author SHA1 Message Date
Brad King 6677f6959f Merge topic 'fbuild_fix_win_cl_detection'
f143ff5ba4 FASTBuild: Prefer first compiler in PATH on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12264
2026-07-14 09:00:23 -04:00
Brad King ccb47a71cc Merge topic 'cpackifw-recent-versions'
311b78b37a CPackIFW: Add recent release versions to search list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12268
2026-07-14 08:56:11 -04:00
Eduard Voronkin f143ff5ba4 FASTBuild: Prefer first compiler in PATH on Windows
We already do this for other command-line generators on Windows.

Fixes: #27923
2026-07-13 18:54:00 -04:00
Craig Scott 311b78b37a CPackIFW: Add recent release versions to search list
Fixes: #27917
2026-07-12 15:08:18 +10:00
Sharadh Rajaraman 1610aa22f4 Clang: Add support for import std when targeting the MSVC ABI
When Clang targets the MSVC ABI, discover the MSVC standard library's
import-std metadata discovery through the MSVC module logic.  Also
extend the latter to use `CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES`
and honor `CMAKE_CXX_STDLIB_MODULES_JSON`.

Closes: #26761
Signed-off-by: Sharadh Rajaraman <r.sharadh@outlook.sg>
2026-07-08 16:55:21 -04:00
Sharadh Rajaraman b9bb2b1256 CompilerId: detect MSVC STL for clang-cl
Extend C++ stdlib detection to cover Clang with MSVC frontend and
forward configured standard include directories to the probe command.

Also recognize _MSVC_STL_VERSION in CXX-DetectStdlib.h so the
standard library is classified as msvc instead of UNKNOWN in this path.

Issue: #26761
Signed-off-by: Sharadh Rajaraman <r.sharadh@outlook.sg>
2026-07-08 14:27:05 -04:00
Brad King 04c04c85f1 Merge topic 'tcl-9'
b4534a9b7c Find{TCL,Tclsh,TclStub,Wish}: Add support for Tcl/Tk 9.0 & 9.1
7ab991f5b6 Find{TCL,Tclsh,TclStub}: Remove matches for non-existent Tcl/Tk 8.7
df0671701e Find{TCL,Tclsh,TclStub,Wish}: Remove outdated Windows registry searches

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12232
2026-07-03 09:24:26 -04:00
FeRD (Frank Dana) b4534a9b7c Find{TCL,Tclsh,TclStub,Wish}: Add support for Tcl/Tk 9.0 & 9.1
Tcl/Tk 9.0.0 was released[1] in 2024, and is already up to version
9.0.4 (just released 2026-07-26).

Tcl/Tk 9.1 is currently nearing beta,[2] and will likely release soon.

Since it's still possible to have both of these libraries installed
without Tclsh or Wish (making version detection via those tools
unviable), add 9.0 and 9.1 variants to the explicit library/include
path and file matches performed by FindTCL.

Also add 9.0 and 9.1 patterns to the tool detections in FindTclsh,
FindTclStub, and FindWish.

[1]: https://sourceforge.net/projects/tcl/files/Tcl/9.0.0/
[2]: https://sourceforge.net/projects/tcl/files/Tcl/9.1b0/
2026-07-02 06:58:58 -04:00
FeRD (Frank Dana) 7ab991f5b6 Find{TCL,Tclsh,TclStub}: Remove matches for non-existent Tcl/Tk 8.7
Version 8.7 of Tcl/Tk never made it past alpha status.
What was briefly labeled 8.7a5 eventually released as 9.0.0.

And in FindTclStub, also remove patterns for ttkstub8.8, which
even more than 8.7 never actually existed.
2026-07-02 06:58:01 -04:00
Brad King df0671701e Find{TCL,Tclsh,TclStub,Wish}: Remove outdated Windows registry searches
Installers from "Scriptics" have not been available for many years.

Issue: #27914
Reported-by: FeRD (Frank Dana) <ferdnyc@gmail.com>
2026-07-02 06:57:33 -04:00
Brad King c292fa6b2f Merge topic 'uname-no-sysroot'
15ddce7e35 CMakeDetermineSystem: Do not try to lookup 'uname' in CMAKE_SYSROOT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12231
2026-07-01 09:49:13 -04:00
Dmitry Vilkov 15ddce7e35 CMakeDetermineSystem: Do not try to lookup 'uname' in CMAKE_SYSROOT
We find `uname` before the toolchain file has been included, so the user
has not yet been able to set `CMAKE_FIND_ROOT_PATH_MODE_PROGRAM`.  If
`CMAKE_SYSROOT` is passed via the command line, avoid searching in it.
2026-06-30 12:02:02 -04:00
Brad King bce2b06a6e Merge topic 'FindPkgConfig-batch'
660684c333 FindPkgConfig: Batch pkg-config flag queries
9555f80ea8 FindPkgConfig: Tolerate include directory order in test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12204
2026-06-30 11:11:43 -04:00
Brad King be33dbe421 Merge topic 'changing-toolchain'
7a989ed58a CMAKE_TOOLCHAIN_FILE: Detect path changes and reset cache

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12211
2026-06-30 11:08:58 -04:00
Volodymyr Zolotopupov 660684c333 FindPkgConfig: Batch pkg-config flag queries 2026-06-29 15:43:55 -04:00
Aiden Woodruff 7a989ed58a CMAKE_TOOLCHAIN_FILE: Detect path changes and reset cache
If the path to the toolchain file changes then anything in the cache
that's derived from the toolchain may need to be recomputed.  Detect
this case and start a fresh build.

Issue: #27867
Signed-off-by: Aiden Woodruff <aiden.woodruff@kitware.com>
2026-06-29 12:09:16 -04:00
Brad King e0fab2e604 Merge topic 'cuda_lang_support_code_signing'
bd629722bd CUDA: Support _CMAKE_FEATURE_DETECTION_TARGET_TYPE like all other languages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12220
2026-06-29 11:48:37 -04:00
Robert Maynard bd629722bd CUDA: Support _CMAKE_FEATURE_DETECTION_TARGET_TYPE like all other languages 2026-06-25 13:22:02 -04:00
Brad King 1521c231c2 Merge topic 'FindDoxygen-USES_TERMINAL'
89de655356 FindDoxygen: Add USES_TERMINAL option to doxygen_add_docs()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12184
2026-06-25 07:31:24 -04:00
Brad King fe3be55d54 Merge topic 'check-tolerate-W-flags'
5abaf65154 Check*: Restore toleration of `;-W...` in CMAKE_REQUIRED_FLAGS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12212
2026-06-25 07:25:38 -04:00
Brad King 7b9bc34277 Merge topic 'check-tolerate-W-flags' into release-4.4
5abaf65154 Check*: Restore toleration of `;-W...` in CMAKE_REQUIRED_FLAGS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12212
2026-06-25 07:25:37 -04:00
Brad King 8192c7dce1 Merge topic 'skip-toolchain-checks-more-variables'
170248fbcb CMakeDetermineCompilerABI: require more variables to skip checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12201
2026-06-25 07:22:31 -04:00
Brad King fba52b2b69 Merge topic 'skip-toolchain-checks-more-variables' into release-4.4
170248fbcb CMakeDetermineCompilerABI: require more variables to skip checks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12201
2026-06-25 07:22:29 -04:00
Brad King 53862a2744 Merge topic 'fortran-ptr-size'
e13c32153b Fortran: Detect pointer size on Intel archs with Oracle Studio 12.4 and below
11c897d487 Fortran: Detect pointer size on PowerPC archs with PGI
e88a4b9f2c Sunway: Detect sw_64 architecture more consistently

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12216
2026-06-25 07:19:52 -04:00
Brad King 9c7c431442 Merge topic 'fortran-ptr-size' into release-4.4
e13c32153b Fortran: Detect pointer size on Intel archs with Oracle Studio 12.4 and below
11c897d487 Fortran: Detect pointer size on PowerPC archs with PGI
e88a4b9f2c Sunway: Detect sw_64 architecture more consistently

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12216
2026-06-25 07:19:50 -04:00
Brad King 9120771b28 Merge topic 'FindCUDAToolkit_support_win_arm64'
0e9d7128cd CUDA: Add support for Clang on Windows ARM64
5f2b27562e FindCUDAToolkit: Add support for windows arm64
afb9e1eab8 FindCUDAToolkit: Detect target processor even when not cross-compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12210
2026-06-25 07:17:56 -04:00
Matthew Woehlke 5abaf65154 Check*: Restore toleration of ;-W... in CMAKE_REQUIRED_FLAGS
The `CMAKE_REQUIRED_FLAGS` variable, used by the various entry points to
`cmake_check_source_{compiles,runs}`, specifies that flags shall not be
separated by semicolons. This is because the way in which it is passed
to the child `cmake` process means that, when considered as a list (with
semicolon separated items), only the first item is actually used as
compile flags, with any additional items actually seen as arguments to
the child `cmake` process. While this usage is unsupported, if invoked
accidentally, flags starting with `-W` were silently ignored by CMake.

However, CMake 4.4 newly complains about unrecognized warning
categories, which means that uses which were silently broken now result
in a hard error.

In the longer term, it would be helpful to introduce a policy to repair
improper use of semicolons in `CMAKE_REQUIRED_FLAGS` in order to do what
the user probably meant. However, for various reasons, we do not want to
introduce a policy to CMake 4.4 at this time, and anyway, the policy
won't help users that haven't enabled it. Therefore, alter the 'check
source' functions to detect arguments being passed to `cmake` rather
than the compiler, and remove any such that start with `-W`. This
removes any arguments that newly cause errors starting with CMake 4.4,
while not otherwise altering behavior in case any users were abusing
this implementation quirk.

Strictly speaking, this means that users can no longer abuse this quirk
to alter CMake's diagnostics. However, the only case in which this
should be observable is if the user is already abusing the quirk to
inject their own CMake logic into the CMake-provided test projects.
Since this was never supported, anyone doing that can keep the pieces.

Issue: #27901
Fixes: #27893
2026-06-24 13:59:11 -04:00
Ben Boeckel 170248fbcb CMakeDetermineCompilerABI: require more variables to skip checks
These variables were missed in the addition of the feature.

Fixes: #27894
2026-06-24 11:38:50 -04:00
Brad King e13c32153b Fortran: Detect pointer size on Intel archs with Oracle Studio 12.4 and below
Revise commit eb8cb2c6c2 (Fortran: Detect pointer size on Intel archs
with PGI, 2014-04-10, v3.0.0-rc4~4^2) to consider more variants of the
architecture macros.
2026-06-24 11:32:44 -04:00
Brad King 11c897d487 Fortran: Detect pointer size on PowerPC archs with PGI
The PGI compiler does not define __SIZEOF_POINTER__ so use the
__ppc64__ or __ppc__ CPU macros to select a pointer size instead.
2026-06-24 11:32:44 -04:00
Brad King e88a4b9f2c Sunway: Detect sw_64 architecture more consistently
Revise commit cfbf0480ff (Sunway: Add sw_64 support, 2025-08-05,
v4.2.0-rc1~373^2) to use the same set of preprocessor definitions for
all languages, and to order them consistently w.r.t. other archs.
2026-06-24 11:32:44 -04:00
Robert Maynard 0e9d7128cd CUDA: Add support for Clang on Windows ARM64 2026-06-23 16:43:15 -04:00
Robert Maynard 5f2b27562e FindCUDAToolkit: Add support for windows arm64 2026-06-23 16:43:04 -04:00
James Miro 89de655356 FindDoxygen: Add USES_TERMINAL option to doxygen_add_docs()
Forward it to `add_custom_target()` and `add_custom_command()`
so that doxygen has access to the terminal when possible.

Fixes: #25359
2026-06-23 16:26:12 -04:00
Robert Maynard afb9e1eab8 FindCUDAToolkit: Detect target processor even when not cross-compiling 2026-06-23 14:31:18 -04:00
Brad King a733b2c1ce Merge topic 'fix-opengl-legacy' into release-4.4
69956c6f63 FindOpenGL: Fix OpenGL and GLX result variables with legacy GL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12205
2026-06-23 09:55:23 -04:00
Brad King 7e4d73a178 Merge topic 'fix-opengl-legacy'
69956c6f63 FindOpenGL: Fix OpenGL and GLX result variables with legacy GL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12205
2026-06-23 09:53:18 -04:00
Carlo Bramini 69956c6f63 FindOpenGL: Fix OpenGL and GLX result variables with legacy GL
In commit 32a5f11e50 (FindOpenGL: respect legacy preference for OpenGL
and GLX libraries, 2025-10-31, v4.3.0-rc1~544^2) the result variables
were spelled incorrectly.  Also re-order logic to preserve the CMP0072
warning text naming the GLVND libraries.

Fixes: #27299
2026-06-22 20:05:04 -04:00
Brad King dfd1cf8d87 Merge topic 'import-std-refactor'
42d2d63235 c++modules: Copy props from BMI consumers more correctly
6d3e9d8220 c++modules: single import std target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !12193
2026-06-22 18:21:02 -04:00
Brad King 344c4ed360 Merge topic 'import-std-refactor' into release-4.4
42d2d63235 c++modules: Copy props from BMI consumers more correctly
6d3e9d8220 c++modules: single import std target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !12193
2026-06-22 18:21:00 -04:00
Brad King a64d3c5522 Merge topic 'FindRuby-vendor-dirs'
c4ee728699 FindRuby: Fix vendor directory discovery

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12189
2026-06-19 09:56:18 -04:00
Brad King d2880479b0 Merge topic 'FindRuby-vendor-dirs' into release-4.4
c4ee728699 FindRuby: Fix vendor directory discovery

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12189
2026-06-19 09:56:17 -04:00
Vito Gamberini 6d3e9d8220 c++modules: single import std target 2026-06-18 15:20:54 -04:00
Brad King c4ee728699 FindRuby: Fix vendor directory discovery
The `ruby -r vendor-specific` module no longer exists.
Use `ruby -r rbconfig` instead.

This patch has been carried by openSUSE's cmake package:

* https://build.opensuse.org/projects/openSUSE:Factory/packages/cmake/files/cmake-fix-ruby-test.patch?rev=274
* https://build.opensuse.org/package/rdiff/openSUSE:Factory/cmake?rev=106
* https://build.opensuse.org/package/rdiff/openSUSE:Factory/cmake?rev=57
* https://build.opensuse.org/package/rdiff/openSUSE:Factory/cmake?rev=56

Fixes: #27888
2026-06-18 10:50:52 -04:00
Brad King c154e36fac Merge topic 'ExternalProject-env-quoting'
036c331b97 ExternalProject: Fix ENVIRONMENT_MODIFICATION with spaces in values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12178
2026-06-17 08:45:33 -04:00
Brad King 25eb4244db Merge topic 'ExternalProject-env-quoting' into release-4.4
036c331b97 ExternalProject: Fix ENVIRONMENT_MODIFICATION with spaces in values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12178
2026-06-17 08:45:31 -04:00
Brad King 25aa28f880 Merge topic 'ExternalProject-env-quoting' into release-4.3
036c331b97 ExternalProject: Fix ENVIRONMENT_MODIFICATION with spaces in values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12178
2026-06-17 08:45:02 -04:00
Brad King 03585467bd Merge topic 'clang-scan-deps-no-toolchain-prefix'
5537b3d60e Clang-FindBinUtils: find unprefixed `clang-scan-deps` binaries as well

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12165
2026-06-16 10:18:16 -04:00
Brad King 8bbfb3611e Merge topic 'clang-scan-deps-no-toolchain-prefix' into release-4.4
5537b3d60e Clang-FindBinUtils: find unprefixed `clang-scan-deps` binaries as well

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12165
2026-06-16 10:18:14 -04:00
Brad King 1c88bce7c9 Merge topic 'FindDoxygen-error-quiet'
8e6e392962 FindDoxygen: Avoid leaking child process stderr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12169
2026-06-16 10:15:09 -04:00