Fix commit 402d72b6c0 (OrangeC: Add support for compiling Windows
Resources, 2026-03-24, v4.4.0-rc1~444^2~1) to work for both C and CXX.
Inspired-by: Arha Gatram <agatram@nvidia.com>
Since commit cb616d43d6 (FortranCInterface: Fix failure with gfortran 12
and Clang, 2022-05-16, v3.23.2~10^2) we add LTO flags for C symbols when
using the GNU C compiler. However, they are only needed when detecting
mangling of the GNU Fortran compiler, as was originally written in
commit 6a0ce19ce1 (FortranCInterface: Fix compatibility with GCC
gfortran 12 LTO, 2022-01-19, v3.22.2~5^2).
Fixes: #28008
`git.dcmtk.org` now enforces a browser challenge so Sphinx `linkcheck`
fails. Rather than adding a suppression, a version number is sufficient
on its own without a hyperlink.
Since commit 302a645d73 (CPack/DEB: use `triggers` instead of legacy
postXXX scripts for `ldconfig`, 2026-03-05, v4.4.0-rc1~583^2) the
`triggers` feature refers to `DPKG_EXECUTABLE` if the latter is defined.
Unfortunately, it is defined only if one particular execution branch has
executed. Move the `find_program(dpkg)` to the function scope to make
it available in all execution branches.
Prior to porting `gtest_discover_tests` to `discover_tests` it silently
tolerated an unpaired property name. `discover_tests` does not support
that, so remove the unpaired argument. Also add a warning to help
projects avoid such usage.
Fixes: #28004
Refactoring in commit a72e241200 (Check*: Restore more toleration of
`;-W...` in CMAKE_REQUIRED_FLAGS, 2026-07-21, v4.4.1~12^2) changed the
pattern that `Check*` modules use to forward `CMAKE_REQUIRED_FLAGS` to
`try_compile` calls. However, it accidentally left out part of the new
pattern in the `CheckSymbolExists` module. Fix that and add tests.
Fixes: #28001
Save original input value of CMAKE_TOOLCHAIN_FILE also before
normalization or relative searching to avoid reconfiguring because the
full path doesn't match the input. Tests correct behavior avoiding
reconfigures and ensuring reconfigure on toolchain change from preset.
Fixes: #24942
Commit 5abaf65154 (Check*: Restore toleration of `;-W...` in
CMAKE_REQUIRED_FLAGS, 2026-06-24, v4.4.0-rc3~2^2) introduced logic to
prevent `-W*` arguments in `CMAKE_REQUIRED_FLAGS` from being passed as
CMake arguments in the `check[_<lang>]_source_{compiles,runs}` family of
utilities. However, several other related modules are also affected.
Update those to also use the new logic, and to have more uniform
implementations, making use of the refactoring from the previous commit.
Fixes: #27961
Commit 5abaf65154 (Check*: Restore toleration of `;-W...` in
CMAKE_REQUIRED_FLAGS, 2026-06-24, v4.4.0-rc3~2^2) introduced logic to
prevent `-W*` arguments in `CMAKE_REQUIRED_FLAGS` from being passed as
CMake arguments. It was never the intent of `CMAKE_REQUIRED_FLAGS` to
support such usage; however, since older versions of CMake would
silently accept such arguments, some users were unintentionally passing
compiler warnings as CMake arguments. Although this usage is incorrect,
it was silently tolerated until CMake 4.4, which began treating unknown
`-W*` as an error.
Because it turns out that modules besides `CheckSource{Compiles,Runs}`
are affected, we are going to need the logic added by that commit in
many more places. As a first step toward accommodating that need, move
the logic to a new internal helper. While we're at it, try to generally
consolidate the common logic for handling the various variables that the
`Check*` family of modules uses for injecting arguments into the
ultimate `try_compile` calls.
Changes target namespace to CUDAToolkit to match module name. Adds ALIAS
targets with the old CUDA:: namespace to maintain backwards
compatibility.
Issues: #27786
The discovery script created by commit 3748ca9f (GoogleTest: generate
single discovery script, 2026-04-08, v4.4.0-rc1~302^2~1) creates
generate-time collisions if gtest_discover_tests() is called on the
same target in the same directory with the same arguments multiple
times. Handle the case with a warning to preserve compatibility with
existing projects.
Fixes: #27940
Restore the logic from commit 6680df042e (GoogleTest: Avoid POST_BUILD
race condition for gtest_discover_tests(), 2025-10-26, v4.2.0-rc2~15^2)
that was lost in the refactoring in commit 3748ca9fc7 (GoogleTest:
generate single discovery script, 2026-04-08, v4.4.0-rc1~302^2~1). Add
a regression test.
Fixes: #27939, #27319, #27972
2c181bd60a GoogleTest: Drop newlines from test names
b464920acc string(STRIP): Document that it removes newlines
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12262
It is possible to have trailing ( and maybe leading ) newlines in a test name. This causes problems with ctest
features like `tests-from-file` since they will never
be an exact match.
So now we sanitize names by removing these newlines
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/