Commit Graph

71299 Commits

Author SHA1 Message Date
Brad King
5c67530c0f Merge topic 'ci-macos-sdk' into release-4.1
baa8cab401 ci: Revert packaging to macOS 15.5 SDK to restore cmake-gui rendering
aa1a122514 ci: Add script to install macOS SDK version 15.5
b33a5366f4 ci: Add script to repackage macOS SDKs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11359
2025-10-27 09:11:01 -04:00
Brad King
baa8cab401 ci: Revert packaging to macOS 15.5 SDK to restore cmake-gui rendering
Since commit 965a12cb8a (ci: update macOS jobs to use Xcode 26.0,
2025-09-18, v4.1.2~9^2) and commit 9d302ecd47 (ci: update macOS jobs to
use Xcode 26.0 in CMake 3.31 branch, 2025-10-07) our macOS 10.13+
packages are built using the macOS 26 SDK, with which Qt 5.15.2 does not
render buttons in `cmake-gui` correctly.  Revert to an older macOS SDK
to avoid the problem until we update our Qt version.

Fixes: #27325
2025-10-25 20:57:13 -04:00
Brad King
aa1a122514 ci: Add script to install macOS SDK version 15.5
With Xcode 16.4, run

    env SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk \
    .gitlab/ci/repackage/macos.sh

and host `MacOSX15.5.sdk.tar.bz2` ourselves.
2025-10-25 20:54:16 -04:00
Brad King
b33a5366f4 ci: Add script to repackage macOS SDKs 2025-10-25 20:49:13 -04:00
Brad King
197069bc6a Merge branch 'release-4.0' into release-4.1 2025-10-25 09:15:42 -04:00
Brad King
aa8f174479 Merge topic 'FindPython-3.15' into release-4.1
7f628ea04b FindPython: Add support for Python 3.15
5b78983813 Tests/FindBoost/TestPython: Improve python version list formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11350
2025-10-25 09:15:27 -04:00
Brad King
a0e480ca89 Merge branch 'release-3.31' into release-4.0 2025-10-25 09:15:19 -04:00
Brad King
91525f6eb0 Merge topic 'FindPython-3.15' into release-4.0
7f628ea04b FindPython: Add support for Python 3.15
5b78983813 Tests/FindBoost/TestPython: Improve python version list formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11350
2025-10-25 09:15:04 -04:00
Brad King
9d2aa76bb7 Merge topic 'FindPython-3.15' into release-3.31
7f628ea04b FindPython: Add support for Python 3.15
5b78983813 Tests/FindBoost/TestPython: Improve python version list formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11350
2025-10-25 09:14:38 -04:00
Karolina Surma
7f628ea04b FindPython: Add support for Python 3.15 2025-10-24 17:42:44 -04:00
Brad King
5b78983813 Tests/FindBoost/TestPython: Improve python version list formatting 2025-10-24 17:42:44 -04:00
Brad King
68721a1726 Merge branch 'release-4.0' into release-4.1 2025-10-22 19:11:44 -04:00
Brad King
efe6ffc2f5 Merge topic 'backport-4.0-cross-compile-macos' into release-4.1
61d0bdf6b7 macOS: Avoid relying on sw_vers when cross-compiling from another OS
d9d65ab54f macOS: Remove outdated condition for CMAKE_OSX_DEPLOYMENT_TARGET

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11340
2025-10-22 19:09:36 -04:00
Brad King
9a2ee83045 Merge topic 'backport-4.0-cross-compile-macos' into release-4.0
61d0bdf6b7 macOS: Avoid relying on sw_vers when cross-compiling from another OS
d9d65ab54f macOS: Remove outdated condition for CMAKE_OSX_DEPLOYMENT_TARGET

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11340
2025-10-22 19:08:46 -04:00
Brad King
61d0bdf6b7 macOS: Avoid relying on sw_vers when cross-compiling from another OS
We have a few code paths needed only to support builds hosted on
macOS 10.4.  Update the conditions to work when cross-compiling
to macOS from another platform.

This backports commit eb8facd396 (macOS: Avoid relying on sw_vers
when cross-compiling from another OS, 2025-04-28, v4.1.0-rc1~260^2)
to CMake 4.0.

Fixes: #26814
2025-10-22 17:26:36 -04:00
Brad King
d9d65ab54f macOS: Remove outdated condition for CMAKE_OSX_DEPLOYMENT_TARGET
Revert commit 2853326e7a (BUG: Only set CMAKE_OSX_DEPLOYMENT_TARGET on
Mac OSX 10.4 or later, 2009-01-27, v2.8.0~1169).  AFAIK no one is using
macOS versions older than 10.4 anymore.

This backports commit 476b2a386f (macOS: Remove outdated condition
for CMAKE_OSX_DEPLOYMENT_TARGET, 2025-04-28, v4.1.0-rc1~260^2~1)
to CMake 4.0.
2025-10-22 17:26:31 -04:00
Brad King
458ef4ad11 Merge branch 'release-4.0' into release-4.1 2025-10-21 11:03:29 -04:00
Brad King
3a953fcfff Merge branch 'release-3.31' into release-4.0 2025-10-21 11:03:18 -04:00
Brad King
a606bc4a7f Merge topic 'backport-3.31-ios-compiler-inspection' into release-4.1
636d3a7a2f Apple: Backport "Enable linking during iOS toolchain inspection" to 3.31

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11333
2025-10-21 11:03:01 -04:00
Brad King
42b3b74bde Merge topic 'backport-3.31-ios-compiler-inspection' into release-4.0
636d3a7a2f Apple: Backport "Enable linking during iOS toolchain inspection" to 3.31

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11333
2025-10-21 11:02:39 -04:00
Brad King
d83b2e8fe0 Merge topic 'backport-3.31-ios-compiler-inspection' into release-3.31
636d3a7a2f Apple: Backport "Enable linking during iOS toolchain inspection" to 3.31

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11333
2025-10-21 11:01:39 -04:00
Brad King
636d3a7a2f Apple: Backport "Enable linking during iOS toolchain inspection" to 3.31
Backport commit 79a83ddb08 (Apple: Enable linking during
iOS/tvOS/visionOS/watchOS toolchain inspection, 2024-11-14,
v4.0.0-rc1~471^2) to 3.31.

Since commit 11da882a12 (Apple: Introduce separate system name for iOS,
tvOS, and watchOS, 2018-01-15, v3.14.0-rc1~14^2~1) our toolchain
inspection steps, like ABI detection, tell `try_compile` to use a
`STATIC_LIBRARY` instead of an `EXECUTABLE`.  This was needed at the
time to avoid codesign requirements.  However, commit d3a64c4e3f (Xcode:
Explicitly turn off signing in try_compile projects, 2020-07-16,
v3.19.0-rc1~483^2) introduced a more general solution to that problem.
Restore linking during toolchain inspection so that we can detect and
identify the linker.

Suggested-by: Marc Chevrier <marc.chevrier@gmail.com>
Fixes: #26443
2025-10-21 09:22:41 -04:00
Brad King
a2ebda45e2 Merge topic 'collect-genex-fix' into release-4.1
6e637b1102 install(PACKAGE_INFO): Fix error when usage requirements contain certain genex

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11322
2025-10-20 13:41:30 -04:00
Martin Duffy
6e637b1102 install(PACKAGE_INFO): Fix error when usage requirements contain certain genex
Since commit 13c7bb5b0c (cmGeneratorExpression: Update strip function to
collect parsed expressions, 2025-04-08, v4.1.0-rc1~361^2~1), the logic
to strip generator expressions would error if the stripped expressions
were being collected and an expression without a `:` was found inside an
expression with a `:`. This resulted in an error when exporting a target
that contained such a generator expression in its link libraries or
compile definitions.

Address the error by checking whether the latest `$<` proceeded the
latest `:`.
2025-10-17 11:34:43 -04:00
Brad King
ae2cdad16c Merge branch 'release-4.0' into release-4.1 2025-10-07 16:47:47 -04:00
Brad King
d4837302fe Merge branch 'release-3.31' into release-4.0 2025-10-07 16:45:24 -04:00
Brad King
892b0de5d4 Merge topic 'backport-ci-xcode-26' into release-3.31
9d302ecd47 ci: update macOS jobs to use Xcode 26.0 in CMake 3.31 branch
f6f1c5ca1f Tests: Teach RunCMake to ignore Xcode an IDERunDestination warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11292
2025-10-07 16:44:28 -04:00
Brad King
9d302ecd47 ci: update macOS jobs to use Xcode 26.0 in CMake 3.31 branch 2025-10-07 14:14:26 -04:00
Brad King
f6f1c5ca1f Tests: Teach RunCMake to ignore Xcode an IDERunDestination warning
On some Xcode versions, `xcodebuild` may warn:

    ... xcodebuild[...] IDERunDestination: ...

Teach RunCMake to drop such incidental lines before matching against
expected output.

Backport commit edaa6ed06a (Tests: Teach RunCMake to ignore Xcode an
IDERunDestination warning, 2025-09-19, v4.1.2~9^2~1) to CMake 3.31.
2025-10-07 14:12:53 -04:00
Brad King
58880d6773 Merge topic 'ninja-trailing-newline-comment' into release-4.1
12a225d56d Ninja: handle trailing newlines in variable stanzas

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11286
2025-10-07 08:58:51 -04:00
Ben Boeckel
12a225d56d Ninja: handle trailing newlines in variable stanzas
When a variable ends with a newline, the Ninja generator escapes it as
expected with `$\n`. However, when writing it out, whitespace is
trimmed. This leaves a trailing `$` instead which consumes the newline
and masks the following stanza. In a custom command, this hides the
`restat = 1` setting.

Detect this case and restore the newline as necessary.

See: #25983
2025-10-06 09:54:15 -04:00
Brad King
a2f4f74ed3 Merge branch 'release-4.0' into release-4.1 2025-10-03 11:13:58 -04:00
Brad King
9cd9d787ea Merge topic 'pkg-root-var' into release-4.1
1a16e4fc69 Merge branch 'backport-pkg-root-var' into pkg-root-var
87a661a916 find_package: Fix regression on `<PackageName>_ROOT` relative to CWD
fc059e1978 Merge branch 'backport-pkg-root-var' into pkg-root-var
ab0a44a0a0 find_package: Fix regression on `<PackageName>_ROOT` relative to CWD
d029b828b2 find_package: Avoid repeating search for lower-case .cps file
fc4d238d7a Tests: Match RunCMake.find_package-CPS version candidates more precisely

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11277
2025-10-03 11:12:06 -04:00
Brad King
9355a194ca Merge topic 'backport-pkg-root-var' into release-4.0
ab0a44a0a0 find_package: Fix regression on `<PackageName>_ROOT` relative to CWD
d029b828b2 find_package: Avoid repeating search for lower-case .cps file
fc4d238d7a Tests: Match RunCMake.find_package-CPS version candidates more precisely

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11277
2025-10-03 11:10:18 -04:00
Brad King
1a16e4fc69 Merge branch 'backport-pkg-root-var' into pkg-root-var
Use the `-s ours` strategy because we already made equivalent changes.
2025-10-02 15:31:06 -04:00
Robert Maynard
87a661a916 find_package: Fix regression on <PackageName>_ROOT relative to CWD
In commit 9d44a77454 (find_*: Explicitly normalize found paths as they
exist on disk, 2024-10-17, v4.0.0-rc1~597^2~1), we removed path
normalization from the internal `cmSearchPath::AddPathInternal` helper.
Most call sites were updated to normalize input paths first, but search
paths derived from `<PackageName>_ROOT` CMake variables are no longer
normalized.  Instead we normalize the path to the file found after
searching.

When `find_package` "config" mode considers a candidate CMake package
configuration file, normalize its path before loading the adjacent
package version file so that the latter is loaded by absolute path.
Otherwise `cmMakefile::ReadDependentFile` interprets a relative path
with respect to the current source directory rather than the current
working directory.

Fixes: #27279
2025-10-02 15:30:13 -04:00
Brad King
fc059e1978 Merge branch 'backport-pkg-root-var' into pkg-root-var 2025-10-02 15:28:03 -04:00
Robert Maynard
ab0a44a0a0 find_package: Fix regression on <PackageName>_ROOT relative to CWD
In commit 9d44a77454 (find_*: Explicitly normalize found paths as they
exist on disk, 2024-10-17, v4.0.0-rc1~597^2~1), we removed path
normalization from the internal `cmSearchPath::AddPathInternal` helper.
Most call sites were updated to normalize input paths first, but search
paths derived from `<PackageName>_ROOT` CMake variables are no longer
normalized.  Instead we normalize the path to the file found after
searching.

When `find_package` "config" mode considers a candidate CMake package
configuration file, normalize its path before loading the adjacent
package version file so that the latter is loaded by absolute path.
Otherwise `cmMakefile::ReadDependentFile` interprets a relative path
with respect to the current source directory rather than the current
working directory.

Fixes: #27279
2025-10-02 15:24:47 -04:00
Brad King
d029b828b2 find_package: Avoid repeating search for lower-case .cps file 2025-10-02 15:24:47 -04:00
Brad King
fc4d238d7a Tests: Match RunCMake.find_package-CPS version candidates more precisely
Since commit 3e6466eb16 (find_package: Honor version requests when
finding CPS packages, 2025-02-12, v4.0.0-rc1~16^2) the test has relied
on `.*` to absorb capitalized paths on case-insensitive filesystems.
Match them explicitly.
2025-10-02 15:24:12 -04:00
Brad King
9cab1062e4 Merge branch 'release-4.0' into release-4.1 2025-10-02 13:57:11 -04:00
Brad King
9f7179793b Merge topic 'build-graph-opt-docs' into release-4.1
fac5e622b7 Help/OPTIMIZE_DEPENDENCIES: xref with CMP0154 documentation
03f5ffa2ca Help/OPTIMIZE_DEPENDENCIES: move period outside of parenthetical

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11275
2025-10-02 13:56:25 -04:00
Brad King
375307f4d7 Merge topic 'build-graph-opt-docs' into release-4.0
fac5e622b7 Help/OPTIMIZE_DEPENDENCIES: xref with CMP0154 documentation
03f5ffa2ca Help/OPTIMIZE_DEPENDENCIES: move period outside of parenthetical

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11275
2025-10-02 13:55:34 -04:00
Ben Boeckel
fac5e622b7 Help/OPTIMIZE_DEPENDENCIES: xref with CMP0154 documentation
Closes: #27250
2025-09-30 22:59:04 -04:00
Ben Boeckel
03f5ffa2ca Help/OPTIMIZE_DEPENDENCIES: move period outside of parenthetical
The preceding sentence needs a terminator.
2025-09-30 22:58:34 -04:00
Brad King
11f3f34077 CMake 4.1.2 v4.1.2 2025-09-30 10:48:33 -04:00
Brad King
aec52661a3 Merge topic 'genex-transitive-link-libraries' into release-4.1
e0bbe79cea CMP0189: Restore support for linking `$<TARGET_PROPERTY:tgt,LINK_LIBRARIES>`
cb69f750bf cmGeneratorTarget: Factor out helper to detect LINK_LIBRARIES evaluation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11262
2025-09-30 09:59:07 -04:00
Brad King
e0bbe79cea CMP0189: Restore support for linking $<TARGET_PROPERTY:tgt,LINK_LIBRARIES>
In general we disallow references to transitive target properties, such
as `COMPILE_DEFINITIONS`, in `[INTERFACE_]LINK_LIBRARIES` properties,
because the latter establish the transitivity itself.  Prior to CMP0189,
the `[INTERFACE_]LINK_LIBRARIES` properties were not themselves transitive
in `$<TARGET_PROPERTY>` expressions, so existing projects have code like

    target_link_libraries(foo PRIVATE "$<TARGET_PROPERTY:tgt,LINK_LIBRARIES>")

Policy CMP0189's NEW behavior, introduced by commit b3da9c6d60 (GenEx:
Evaluate LINK_LIBRARIES target properties transitively, 2025-02-24,
v4.1.0-rc1~731^2), makes `$<TARGET_PROPERTY:tgt,LINK_LIBRARIES>`
transitive, causing the above to be rejected.  Since evaluation of a
target's link libraries can already encounter and handle other targets'
link libraries, allow it in this case.

Fixes: #27265
2025-09-29 10:51:01 -04:00
Brad King
cb69f750bf cmGeneratorTarget: Factor out helper to detect LINK_LIBRARIES evaluation 2025-09-26 17:41:41 -04:00
Brad King
24ede8c516 Merge branch 'release-4.0' into release-4.1 2025-09-25 09:01:35 -04:00