Commit Graph
16195 Commits
Author SHA1 Message Date
Brad King 8337f4e670 Merge topic 'ibm-flang-fix'
fbe5bcb7d3 IBMFlang: Rename compiler modules from IBMLLVMFlang

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12443
2026-08-27 10:50:27 -04:00
Brad King 47c0fd1977 Merge topic 'GNUInstallDirs-no-lang'
78b4ffa0a7 GNUInutallDirs: Suppress LIBDIR warning for LANGUAGES NONE projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12440
2026-08-27 10:45:01 -04:00
Brad King ba0f16f6cb Merge topic 'ewilde/ninja-refactor-swift-builds'
23b33482f1 Swift: Refactor module / object builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12438
2026-08-27 10:36:55 -04:00
Kelvin Li fbe5bcb7d3 IBMFlang: Rename compiler modules from IBMLLVMFlang
These were missed in commit 4969297469 (IBMFlang: Rename compiler id
from IBMLLVMFlang, 2026-06-09, v4.4.0-rc1~7^2).
2026-08-26 16:36:13 -04:00
rewine 78b4ffa0a7 GNUInutallDirs: Suppress LIBDIR warning for LANGUAGES NONE projects
Projects that explicitly use LANGUAGES NONE, e.g. to install only
data files, have no target architecture, which is intentional.
Default to `lib` without warning.

Fixes: #23461
2026-08-26 09:38:33 -04:00
Brad King 10b4bf7e1e Merge topic 'flang-fortran-system-includes'
5d2974974b Flang: Do not use -isystem with classic flang

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12436
2026-08-26 09:24:06 -04:00
Zhiqiang Chen 5d2974974b Flang: Do not use -isystem with classic flang
Extend commit a8e7a1047a (GNU: Do not use -isystem with gfortran,
2015-03-26, v3.3.0-rc1~292^2) to cover classic Flang too.  It does
not search system include directories for Fortran `.mod` files.
2026-08-25 14:06:59 -04:00
Brad King 072038c191 Merge topic 'aix-gnu-no-lto'
cff46f99ee AIX: Disable LTO/IPO with GCC, which does not support it

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12430
2026-08-25 10:41:48 -04:00
Aditya Kamath cff46f99ee AIX: Disable LTO/IPO with GCC, which does not support it
The GNU compiler does not support LTO on AIX.
2026-08-24 13:52:21 -04:00
Brad King 92c31a16c0 Merge topic 'link-library-needed-library-linux'
a2e6306c27 GenEx/LINK_LIBRARY: Add NEEDED_LIBRARY support on Linux
158b64688f Linker/GNU: Refactor LINKER_PUSHPOP_STATE_SUPPORTED check to a function
0f784069c3 Tests: Consolidate RunCMake.target_link_libraries-LINK_LIBRARY conditions
6491bd5a5f Help: Format LINK_LIBRARY NEEDED_LIBRARY platforms as a definition list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !12410
2026-08-24 12:14:51 -04:00
Evan Wilde 23b33482f1 Swift: Refactor module / object builds
Splitting up the computation of common variables, module build
variables, and object build variables to make it a little easier to
focus on each one.

Updated tests to reflect updated flag order and updated object-build
description.
2026-08-14 17:02:20 -07:00
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
Robert Maynard a2e6306c27 GenEx/LINK_LIBRARY: Add NEEDED_LIBRARY support on Linux 2026-08-13 13:45:19 -04:00
Robert Maynard 158b64688f Linker/GNU: Refactor LINKER_PUSHPOP_STATE_SUPPORTED check to a function 2026-08-13 13:45:19 -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