Commit Graph
16182 Commits
Author SHA1 Message Date
Brad King ca0ed0f66f Merge topic 'swift-cmp0215-update'
e4a37fbf15 Tests/RunCMake/Swift: Add CMP0195 behavior checks
b7a78568c3 CMP0215: Update NEW behavior to require CMP0157/CMP0195 to be NEW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12407
2026-08-14 06:30:36 -04:00
Evan Wilde b7a78568c3 CMP0215: Update NEW behavior to require CMP0157/CMP0195 to be NEW
Update CMP0215 to avoid attempting to iterate through the flags
looking for `-emit-module-path` ins the user-specified flags. We don't
do this anywhere else in the code. The existing implementation didn't
handle correctly parsing the flag so `-I blah/my-emit-module-path/` and
`-Xcc -emit-module-path ...` would both trigger it, result in the
compiler not emitting any module. Furthermore, it didn't include the
user-specified module path as part of the build graph resulting in an
incorrect build graph that would never resolve.

The only two appropriate layouts for the module are either the flat
binary module file with the name `<module-name>.swiftmodule`, or the
nested form with
`<module-name>.swiftmodule/<module-triple>.swiftmodule`. The noted
Swift-Syntax situation passes the explicit `-emit-module-path` to get to
the latter form. This form is automatically emitted by CMake when
CMP0195 is `NEW`, removing the need for the flag. The Swift project
generally recommends the nested directory structure since it gathers all
of the generated interface outputs from the compiler (textual swift
interfaces, swiftdoc, sourceinfo, and the binary swiftmodule file) in a
single place, and since it uses the module triple in the filename,
cleanly allows fat mach-o binaries on Apple platforms.

Fixes: #28021
2026-08-13 10:14:16 -04:00
Brad King 3d5f989836 Merge topic 'clang-cl-absolute-source-path'
68491cedcf clang-cl: Fix C++ module scanning when cross-compiling from Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12389
2026-08-12 11:47:02 -04:00
Brad King f27e315222 Merge topic 'clang-cl-absolute-source-path' into release-4.4
68491cedcf clang-cl: Fix C++ module scanning when cross-compiling from Linux

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12389
2026-08-12 11:47:00 -04:00
Brad King f723293c7f Merge topic 'print_all_properties'
048ee670f2 cmake_print_properties: Deprecate in favor of cmake_language(PRINT_PROPERTIES)
2a2012e913 cmake_language: Add PRINT_PROPERTIES operation
4eedd0fdb9 TargetPropertyComputer: Refactor out LOCATION checks
f81da1043d TargetPropertyComputer: Remove redundant error check
72ae7352d5 get_property: Refactor logic to shared function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !11834
2026-08-12 11:31:34 -04:00
huangqinjin 68491cedcf clang-cl: Fix C++ module scanning when cross-compiling from Linux
Follow up commit ed48feeae8 (clang-cl: Add support for C++ modules,
2026-03-27, v4.4.0-rc1~428^2).  Prevent clang-cl from interpreting
absolute source paths as flags.

Fixes: #28036
2026-08-11 13:03:30 -04:00
Brad King c315c35f69 Merge topic 'FindDoxygen-output-subdirs'
8fc8f564c9 FindDoxygen: Create and clean recursive subdirectories for output formats

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12393
2026-08-11 11:20:47 -04:00
Brad King 7fdf6c90e7 Merge topic 'FindPython-fix-CROSSCOMPILING-CMP0190-OLD'
2f9f2557e3 Merge branch 'backport-FindPython-fix-CROSSCOMPILING-CMP0190-OLD' into FindPython-fix-CROSSCOMPILING-CMP0190-OLD
44fabaa32d FindPython: fix CROSSCOMPILING with CMP0190=OLD
7b74c14b02 FindPython: fix CROSSCOMPILING with CMP0190=OLD

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12394
2026-08-11 11:19:01 -04:00
Brad King 97d7e823c9 Merge topic 'FindPython-fix-CROSSCOMPILING-CMP0190-OLD' into release-4.4
7b74c14b02 FindPython: fix CROSSCOMPILING with CMP0190=OLD

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12394
2026-08-11 11:18:59 -04:00
Tom Osika 048ee670f2 cmake_print_properties: Deprecate in favor of cmake_language(PRINT_PROPERTIES)
Re-implement it in terms of the replacement command.

Issue: #27513
2026-08-10 17:45:47 -04:00
James Miro 8fc8f564c9 FindDoxygen: Create and clean recursive subdirectories for output formats
Teach `doxygen_add_docs()` to recursively create subdirectories for each
output format (HTML, XML, ...) and add each subdirectory to the `clean`
target.  Previously, only the HTML output directory was added to the
`clean` target.

Fixes: #27970, #22570
2026-08-10 10:32:14 -04:00
Brad King bae815ccf7 Merge topic 'fix-check-modules-again'
3209535fb3 Check*: Restore toleration of false-like requirements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12387
2026-08-10 09:52:25 -04:00
Marc Chevrier 2f9f2557e3 Merge branch 'backport-FindPython-fix-CROSSCOMPILING-CMP0190-OLD' into FindPython-fix-CROSSCOMPILING-CMP0190-OLD 2026-08-10 14:56:04 +02:00
Marc Chevrier 44fabaa32d FindPython: fix CROSSCOMPILING with CMP0190=OLD
Fixes: #28029
2026-08-10 14:52:04 +02:00
Marc Chevrier 7b74c14b02 FindPython: fix CROSSCOMPILING with CMP0190=OLD 2026-08-10 14:28:15 +02:00
Fabrice de Gans d75d5dfadf ASM: Record all assembler id information
Previously, `CMAKE_ASM${DIALECT}_COMPILER_FRONTEND_VARIANT` and
`CMAKE_ASM${DIALECT}_SIMULATE_ID` were not saved in with the build
configuration. As a result, these were left unpopulated on re-configure.
This is particularly problematic when `clang-cl` is used as the
assembler on Windows, since CMake would mistakenly identify the build as
being "GCC on Windows", resulting in include paths being passed with
forward slashes on re-configure, causing a full rebuild.

Fix the issue by saving the information so it persists across
re-configures.
2026-08-08 10:51:14 -04:00
Brad King 3fdafa3302 Merge topic 'windows-toolchain-input'
f5837208f5 CMAKE_TOOLCHAIN_FILE: Fix Windows saved input toolchain file syntax error
996fc21020 Tests: Enable toolchain parts of RunCMake.CompilerChange on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !12382
2026-08-08 10:47:50 -04:00
Matthew Woehlke 3209535fb3 Check*: Restore toleration of false-like requirements
Commit 7644d557df (Check*: Refactor variable handling, 2026-07-20,
v4.4.1~12^2~1) introduced a subtle regression in the handling of
`CMAKE_REQUIRED_LINK_OPTIONS` and `CMAKE_REQUIRED_LIBRARIES` which
resulted in an error if these were set to a 'false-like' value. This
could happen, for example, if the user passes `<name>_LIBS`, which
happens to have the value `<name>-NOTFOUND`. Previously, such values
would be ignored.

Fix it by separately checking for user- or module-provided link options
or link libraries. (We were already doing this for the other variables
used to propagate requirements into checks.)

Fixes: #28026
2026-08-07 14:14:52 -04:00
Aiden Woodruff f5837208f5 CMAKE_TOOLCHAIN_FILE: Fix Windows saved input toolchain file syntax error
The value of _CMAKE_INPUT_TOOLCHAIN_FILE can contain backslashes when
Windows path separators are used. This commit ensures regression tests
check such cases and saves the value with a bracket argument to avoid
causing a syntax error due to the backslashes.

Fixes: #28024
2026-08-07 13:04:14 -04:00
Brad King ebd3af92f9 Merge topic 'print_variables'
4f09a029dc cmake_print_variables: Deprecate in favor of cmake_language(PRINT_VARIABLES)
a06658b6d7 cmake_language: Add PRINT_VARIABLES operation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12160
2026-08-07 11:48:00 -04:00
Tom Osika 4f09a029dc cmake_print_variables: Deprecate in favor of cmake_language(PRINT_VARIABLES)
Re-implement it in terms of the replacement command.

Issue: #27513
2026-08-07 10:57:01 -04:00
Marc Chevrier 8c0bb8ee95 FindPython: Add support for python specific crosscompiling emulator
Fixes: #27996
2026-08-06 17:57:26 +02:00
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