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>
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>
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/
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.
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.
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
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>
bd629722bd CUDA: Support _CMAKE_FEATURE_DETECTION_TARGET_TYPE like all other languages
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12220
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
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: #27901Fixes: #27893
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.
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.
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