Commit Graph
16160 Commits
Author SHA1 Message Date
Brad King de68c0071c Merge topic 'orangec-rc'
835dfdfbac OrangeC: Fix compiling Windows Resources with only CXX enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12373
2026-08-06 09:24:54 -04:00
Brad King ac513358d1 Merge topic 'FortranCInterface-NAG-Fortran'
1c84ea4953 FortranCInterface: Restore mangling detection for NAG Fortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12369
2026-08-05 15:05:32 -04:00
Brad King 835dfdfbac OrangeC: Fix compiling Windows Resources with only CXX enabled
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>
2026-08-05 14:21:10 -04:00
Brad King 3541846b47 Merge topic 'FindJNI-OpenSUSE'
25efb8bf45 FindJNI: Add paths for OpenSUSE libalternatives-based packages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12368
2026-08-05 13:49:28 -04:00
Brad King 362f4ec53a Merge topic 'FindJNI-OpenSUSE' into release-4.4
25efb8bf45 FindJNI: Add paths for OpenSUSE libalternatives-based packages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12368
2026-08-05 13:49:25 -04:00
Brad King 1c84ea4953 FortranCInterface: Restore mangling detection for NAG Fortran
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
2026-08-04 09:44:08 -04:00
Brad King 17eb093d35 Merge topic 'FindPython-fix-ARCHITECTURE_ID-check'
7fc60e733d FindPython: Fix CMAKE_LANG_COMPILER_ARCHITECTURE_ID check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12362
2026-08-04 09:00:30 -04:00
Brad King 25efb8bf45 FindJNI: Add paths for OpenSUSE libalternatives-based packages
Fixes: #28015
2026-08-04 08:31:53 -04:00
Vito Gamberini ab1bd6f6c6 c++modules: Remove CXX_MODULE_STD and CMAKE_CXX_COMPILER_IMPORT_STD
Fixes: #27966, #27992, #28000
2026-08-03 10:05:34 -04:00
Marc Chevrier 7fc60e733d FindPython: Fix CMAKE_LANG_COMPILER_ARCHITECTURE_ID check
Fixes: #28012
2026-08-02 15:54:33 +02:00
Brad King e98e59cc82 Merge topic 'FindPython-SOSABI_PLATFORM'
91e227939c FindPython: Add Python_SOSABI_PLATFORM variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12360
2026-08-01 07:27:55 -04:00
Marc Chevrier 91e227939c FindPython: Add Python_SOSABI_PLATFORM variable
This variable gives the SABI module extension which include the
platform triplet.

Fixes: #27997
2026-07-31 16:41:01 +02:00
Brad King 0007fe8428 FindDCMTK: Drop explicit hyperlink to a specific DCMTK commit
`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.
2026-07-31 10:29:09 -04:00
Brad King 90cfce949a Merge topic 'discover-tests-crash'
1b2f3287f7 GoogleTest: Restore toleration of odd test PROPERTIES count
6147180017 discover_tests: Require properties to be key-value pairs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12350
2026-07-31 08:52:06 -04:00
Brad King 9656732cf5 Merge topic 'discover-tests-crash' into release-4.4
1b2f3287f7 GoogleTest: Restore toleration of odd test PROPERTIES count
6147180017 discover_tests: Require properties to be key-value pairs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12350
2026-07-31 08:52:04 -04:00
Brad King b947bcd122 Merge topic 'cpackdeb-find-dpkg'
da9a8a3fbe CPack/DEB: Fix regression when package architecture is explicitly specified

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12351
2026-07-31 08:30:20 -04:00
Alex Turbov da9a8a3fbe CPack/DEB: Fix regression when package architecture is explicitly specified
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.
2026-07-30 12:28:11 -04:00
Daniel Pfeifer 1b2f3287f7 GoogleTest: Restore toleration of odd test PROPERTIES count
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
2026-07-30 12:23:22 -04:00
Brad King 13e8dbad0f Merge topic 'CheckSymbolExists-required-flags'
e81906d12e CheckSymbolExists: Restore support for CMAKE_REQUIRED_FLAGS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Tom Pollard <tom_pollard@hotmail.co.uk>
Merge-request: !12342
2026-07-30 11:27:44 -04:00
Josef Šimánek e81906d12e CheckSymbolExists: Restore support for CMAKE_REQUIRED_FLAGS
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
2026-07-29 11:02:57 -04:00
Brad King 70f568b17b Merge topic 'FindPython-add-pydebug-ABI-support-on-Windows'
84cb7e2629 FindPython: Add support for pydebug ABI flag on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !12325
2026-07-28 09:35:25 -04:00
Marc Chevrier 84cb7e2629 FindPython: Add support for pydebug ABI flag on Windows
Fixes: #27969
2026-07-26 17:10:25 +02:00
Brad King cebb36e790 Merge topic 'doc-GNUInstallDirs-cross'
1b33892492 GNUInstallDirs: Document cross-compiling behavior w.r.t. lib directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12318
2026-07-24 08:18:24 -04:00
Brad King 1b33892492 GNUInstallDirs: Document cross-compiling behavior w.r.t. lib directories
The default is always `lib` when cross-compiling because we do not
know the target's distro.

Closes: #27982
2026-07-23 16:46:00 -04:00
Brad King 47e0f5da6a Merge topic 'toolchain-preset-warning'
7bc37a0561 CMAKE_TOOLCHAIN_FILE: Avoid excess reconfigures from relative paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12289
2026-07-23 08:42:32 -04:00
Aiden Woodruff 7bc37a0561 CMAKE_TOOLCHAIN_FILE: Avoid excess reconfigures from relative paths
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
2026-07-22 11:53:05 -04:00
Brad King 9c631586d2 Merge topic 'cuda-toolkit-namespace'
f2d5320d42 FindCUDAToolkit: Add CUDAToolkit:: namespace targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12290
2026-07-22 11:32:13 -04:00
Brad King 0c702d4692 Merge topic 'more-CMAKE_REQUIRED_FLAGS-fixes'
a72e241200 Check*: Restore more toleration of `;-W...` in CMAKE_REQUIRED_FLAGS
7644d557df Check*: Refactor variable handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12303
2026-07-22 10:55:46 -04:00
Matthew Woehlke a72e241200 Check*: Restore more toleration of ;-W... in CMAKE_REQUIRED_FLAGS
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
2026-07-21 15:21:42 -04:00
Matthew Woehlke 7644d557df Check*: Refactor variable handling
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.
2026-07-21 15:21:42 -04:00
Brad King a0a2ba79c4 Merge topic 'FindPython-fix-SABIModule-detection'
5fdfb2283a FindPython: fix SABIModule detection failure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12285
2026-07-21 10:05:47 -04:00
Brad King 1a58fc5bb9 Merge topic 'FindPython-fix-SABIModule-detection' into release-4.4
5fdfb2283a FindPython: fix SABIModule detection failure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12285
2026-07-21 10:05:45 -04:00
Arha Gatram f2d5320d42 FindCUDAToolkit: Add CUDAToolkit:: namespace targets
Changes target namespace to CUDAToolkit to match module name. Adds ALIAS
targets with the old CUDA:: namespace to maintain backwards
compatibility.

Issues: #27786
2026-07-20 15:59:26 -07:00
Brad King f858c1907d Merge topic 'gtest-multiple-discovery'
c3c95f3010 GoogleTest: Avoid generation error on duplicate target test discovery

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12279
2026-07-20 15:09:05 -04:00
Brad King 43f6543134 Merge topic 'gtest-test-target'
4f0dea4ea5 Merge branch 'backport-4.2-gtest-test-target' into gtest-test-target
fc1b218b37 GoogleTest: Fix gtest_discover_tests race on POST_BUILD of multiple targets
e79506fadf GoogleTest: Fix gtest_discover_tests race on POST_BUILD of multiple targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12276
2026-07-20 15:05:18 -04:00
Tyler Yankee c3c95f3010 GoogleTest: Avoid generation error on duplicate target test discovery
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
2026-07-20 13:26:08 -04:00
Tyler Yankee fc1b218b37 GoogleTest: Fix gtest_discover_tests race on POST_BUILD of multiple targets
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
2026-07-20 11:21:35 -04:00
Brad King a6d2c60f73 Merge topic 'googletest_handle_newline_characters'
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
2026-07-20 09:58:38 -04:00
Robert Maynard 2c181bd60a GoogleTest: Drop newlines from test names
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
2026-07-16 15:11:53 -07:00
Marc Chevrier 5fdfb2283a FindPython: fix SABIModule detection failure
Fixes: #27950
2026-07-16 17:28:43 +02:00
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 e5eea8e913 Merge topic 'fbuild_fix_win_cl_detection' into release-4.4
f143ff5ba4 FASTBuild: Prefer first compiler in PATH on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12264
2026-07-14 09:00:21 -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
Brad King 8ca9a4e1c3 Merge topic 'cpackifw-recent-versions' into release-4.4
311b78b37a CPackIFW: Add recent release versions to search list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12268
2026-07-14 08:56:10 -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