Commit Graph

15675 Commits

Author SHA1 Message Date
Brad King
388e2ae0a5 FindPostgreSQL: Add support for version 17 2025-11-12 14:35:11 -05:00
Brad King
a0642acbce FindImageMagick: Fix detection of version 7 from headers 2025-11-12 14:35:11 -05:00
Brad King
faf8addc71 FindJNI: Add Debian/Ubuntu specific paths for more recent JDK versions 2025-11-12 14:35:11 -05:00
Brad King
72ce711899 GoogleTest: Avoid POST_BUILD race condition for gtest_discover_tests()
Fix commit 6680df042e (GoogleTest: Avoid POST_BUILD race condition for
gtest_discover_tests(), 2025-10-26, v4.2.0-rc2~15^2) to actually hash
the target name instead of an empty string.

Fixes: #27319
2025-11-06 14:28:30 -05:00
Alex Turbov
2ca11db2e3 pre-commit: version bump typos hook plus fix found typos
Backport commit 8de02a14c8 (ci(pre-commit): version bump `typos` hook
plus fix found typos, 2025-10-23) to the CMake 4.2 release branch.
2025-10-30 17:43:16 -04:00
Brad King
1925477cb7 macOS: Do not incorrectly search for per-arch SDKs
Extend commit a9b41195d2 (Handle multi-arch sysroots on Apple platforms,
2019-07-26, v3.17.0-rc1~287^2) to recognize versioned macOS SDK names.

Fixes: #27340
2025-10-29 14:50:51 -04:00
Brad King
3ef5ce55db Merge topic 'python_debug_postifx_no_interpreter' into release-4.2
6a35c277d0 FindPython: Support getting DEBUG_POSTFIX without requiring Interpreter
43fec72adb Tests: Fix RunCMake.UseSWIG SetPOSTFIX case on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11345
2025-10-28 09:34:29 -04:00
Andrej730
6a35c277d0 FindPython: Support getting DEBUG_POSTFIX without requiring Interpreter 2025-10-27 10:27:32 -04:00
Brad King
009f1ab0e3 Merge topic 'gtest-discovery-race-condition' into release-4.2
6680df042e GoogleTest: Avoid POST_BUILD race condition for gtest_discover_tests()

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11357
2025-10-27 09:35:50 -04:00
Brad King
b39e361175 Merge topic 'xcode-macos-deployment-target' into release-4.2
de53a46a91 Help: Add 4.1 release note for restored Xcode default deployment target
85ba6f5d1b Merge branch 'backport-4.0-xcode-macos-deployment-target'
884260ced6 Help: Add 4.0 release note for restored Xcode default deployment target
1a37c83c7e Xcode: Restore default CMAKE_OSX_DEPLOYMENT_TARGET to run on host
e927408047 Apple: Initialize deployment target after SDK

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11361
2025-10-27 09:26:15 -04:00
Craig Scott
6680df042e GoogleTest: Avoid POST_BUILD race condition for gtest_discover_tests()
If multiple calls to `gtest_discover_tests()` are made with different
targets and they use the same working directory, they would previously
have tried to use the same `cmake_test_discovery.json` file for collecting
the set of tests during discovery. Incorporate a hash of the target name
into the file name to ensure that no longer occurs.

Fixes: #27319
2025-10-27 07:37:00 +11:00
Brad King
85ba6f5d1b Merge branch 'backport-4.0-xcode-macos-deployment-target' 2025-10-26 11:19:58 -04:00
Brad King
1a37c83c7e Xcode: Restore default CMAKE_OSX_DEPLOYMENT_TARGET to run on host
Xcode by default targets the SDK's macOS version rather than the host's
macOS version.  In commit 7b19531291 (macOS: Do not pass any
SDK/-isysroot to compilers by default, 2024-11-06, v4.0.0-rc1~511^2) we
reverted commit 24aafbde11 (Xcode: Adjust deployment target SDK version
to host version, 2015-10-11, v3.4.0-rc2~6^2), but it is still needed for
Xcode.  Restore the behavior so binaries run on the host by default.

Fixes: #27309
2025-10-26 11:19:19 -04:00
Brad King
e927408047 Apple: Initialize deployment target after SDK 2025-10-26 11:16:45 -04:00
Brad King
823362224f Merge topic 'fbuild_cuda' into release-4.2
2cfae5e140 ci: Add job for CUDA with FASTBuild generator on Linux
4135175337 FASTBuild: support CUDA language

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11324
2025-10-26 10:32:23 -04:00
Brad King
8ba7fc0af9 Merge topic 'FindPython-3.15' into release-4.2
7f628ea04b FindPython: Add support for Python 3.15
5b78983813 Tests/FindBoost/TestPython: Improve python version list formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Andrej <azhilenkov@gmail.com>
Merge-request: !11350
2025-10-25 09:16:05 -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
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
Eduard Voronkin
4135175337 FASTBuild: support CUDA language
Fixes: #27318
2025-10-25 08:58:38 -04:00
Karolina Surma
7f628ea04b FindPython: Add support for Python 3.15 2025-10-24 17:42:44 -04:00
Andrej730
6eae783add UseSWIG: Issue swig_link_libraries deprecation warning if CMP0078 is NEW 2025-10-24 20:58:23 +05: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
e00b84ec13 Merge topic 'gtest-json-discovery-empty' into release-4.2
f67efb64ab GoogleTest: Restore support for empty discovered test list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11326
2025-10-22 07:29:11 -04:00
Ottmar Zittlau
f67efb64ab GoogleTest: Restore support for empty discovered test list
Since commit 1cdceae8e3 (GoogleTest: Parse discovered test list from
JSON output if supported, 2025-05-02, v4.2.0-rc1~533^2~2) we've
incorrectly tried to `return()` from a `macro()` when no tests are
available.  This led to the situation that a file that contains the test
details was not properly overwritten but still indicated that the test
target was not built.

Fixes: #27319
2025-10-21 11:39:19 -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
Tristan Daifuku
69e2f3f8ea Linker: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL set to ANY
Tolerate expected failures of linkers invoked via `execute_process`.
2025-10-20 11:58:46 -04:00
Brad King
576e63f28d Compilers: Use -print-sysroot output only with successful exit code 2025-10-20 11:58:46 -04:00
Brad King
caef2113e6 Merge topic 'patch-find-modules-missing-found-vars' into release-4.2
c8ea0ba3be Find*: Add missing <PackageName>_FOUND variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11303
2025-10-14 11:47:46 -04:00
Brad King
6843f4b62a Merge topic 'patch-FindLua-version-51' into release-4.2
b4a08078d6 FindLua51: Use Lua51_VERSION result variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11306
2025-10-14 11:46:25 -04:00
Brad King
1b9dbb6c90 Merge topic 'patch-FindOpenMP' into release-4.2
e5aa17333d FindOpenMP: Set the version result variable and update docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11304
2025-10-14 11:44:40 -04:00
Brad King
0279505105 Merge topic 'find_cuda_toolkit_run_nvcc_with_ccbin' into release-4.2
4c3480fc0a CUDAToolkit: Use correct target paths from nvcc when cross-compiling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11228
2025-10-14 11:43:25 -04:00
Brad King
6b57a8435f Merge topic 'external-project-env-mod-lists' into release-4.2
9cb590b843 ExternalProject: Fix lists and empty commands with environment modification
2e0a8455b3 Tests: Match expected environment modification more completely
819c6177b8 Tests: Match expected environment modification more consistently
c555e10fd4 Tests: Use shorter paths in RunCMake.ExternalProject

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11272
2025-10-14 11:40:33 -04:00
Peter Kokot
b4a08078d6 FindLua51: Use Lua51_VERSION result variable
If using both FindLua and FindLua51 modules, the FindLua51 and Lua 5.2
or newer is found, FindLua51 module can set the Lua_VERSION variable to
empty value. Instead, the Lua51_VERSION can be used to bypass this
issue.

Issue: #27088
2025-10-13 12:10:24 -04:00
Peter Kokot
e5aa17333d FindOpenMP: Set the version result variable and update docs
* This module previously didn't define the OpenMP_VERSION result
  variable.
* Added CMake versions to variables when they were provided by the
  module.
* Synced docs.
2025-10-13 12:09:54 -04:00
Peter Kokot
c8ea0ba3be Find*: Add missing <PackageName>_FOUND variables
* FindKDE4: Added note about KDE4_FOUND result variable (it is set by
  the upstream FindKDE4Internal module, and now also synced in the docs
  and code for consistency).

For the sake of completeness with other find modules, also the following
deprecated find modules are synced as they already provided these
variables:

* FindDart: Documented the Dart_FOUND result variable.
* FindUnixCommands: Updated documentation (documented UnixCommands_FOUND
  result variable, and listed cache variables used by this module).

Issue: #27242
2025-10-13 12:06:58 -04:00
Robert Maynard
4c3480fc0a CUDAToolkit: Use correct target paths from nvcc when cross-compiling
This fixes issues where FindCUDAToolkit would find host
host platform libraries when nvcc -ccbin pointed to compiler of
a different CPU architecture.
2025-10-13 11:04:10 -04:00
Evan Wilde
9cb590b843 ExternalProject: Fix lists and empty commands with environment modification
Fix two bugs from commit e301cbffcc (ExternalProject: Set environment
variables, 2025-04-09):

* Do not flatten lists in command arguments when adding env mods.

* Remove empty `COMMAND`s without injecting corresponding env mods.

Fixes: #27125
Fixes: #27126
Co-authored-by: Brad King <brad.king@kitware.com>
2025-10-13 10:28:17 -04:00
Dylan Ulis
765e420128 QCC: Remove "-Wp," prefix for qcc system include arguments
`-Wp` is not needed on modern QNX/QCC.
`-isystem` is supported directly since QNX 7.0

Fixes: #26912
2025-10-09 09:51:29 -04:00
Brad King
051b0efd7d Merge topic 'FindZLIB-static'
b2c059e68f FindZLIB: Find static libraries from upstream zlib's cmake-based build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11291
2025-10-08 09:36:08 -04:00
Brad King
af8180a5a9 Merge topic 'ticlang-c17'
3a34f7715e TIClang: Add flags for C17 standard

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11285
2025-10-08 09:34:43 -04:00
winapiadmin
b2c059e68f FindZLIB: Find static libraries from upstream zlib's cmake-based build
Upstream zlib commit `74247f0947` (CMake: Install libs with static and
debug suffix., 2024-11-30) added suffix `s` to static library names.
2025-10-07 13:38:24 -04:00
Daniel Körner
3a34f7715e TIClang: Add flags for C17 standard
C17 is supported since version 1.3.
2025-10-07 11:11:52 -04:00
Robert Maynard
a345c0e193 FindCUDAToolkit: Don't keep searching when CUDAToolkit_ROOT is set
Don't continue to search other locations for CUDA if the user
has specified a location and we fail to find it.
2025-10-06 11:17:16 -04:00
Peter Kokot
fdadbe42fe FindCxxTest: Add CxxTest_FOUND variable and update docs
- This module previously didn't define the CxxTest_FOUND result variable
  consistently if neither Python nor Perl were found.
- Documentation is also updated a bit further to note that Perl-based
  test generator script has been removed in CxxTest version 4.0.
- Internal comments synced.
- Python_FOUND result variable used.

Issue: #27242
2025-10-02 22:31:41 +02:00
Brad King
0e0a304f41 Merge topic 'patch-FindOpenAL-version'
4df39cf269 FindOpenAL: Remove OPENAL_VERSION_STRING
ea2b9c6c01 FindOpenAL: Re-order deprecated variables section

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11273
2025-10-02 13:53:53 -04:00
Peter Kokot
4df39cf269 FindOpenAL: Remove OPENAL_VERSION_STRING
This result variable wasn't set by this module, yet it was documented.

Issue: #27088
2025-10-01 19:39:27 +02:00
Peter Kokot
ea2b9c6c01 FindOpenAL: Re-order deprecated variables section 2025-10-01 19:38:32 +02:00
AJIOB
83bbde5449 MSVC: Define _WINDLL consistently for shared libraries
Visual Studio defines this automatically for `.dll` targets.
For consistency, define it when compiling for the MSVC ABI
with other generators.  Add policy CMP0203 for compatibility.

Fixes: #27253
2025-09-29 18:26:44 -04:00
Brad King
c3b65c19ba Merge topic 'gtest-discover-tests-cleanup'
d86da0af70 GoogleTest: cleanup file generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11254
2025-09-29 09:24:43 -04:00