13385 Commits

Author SHA1 Message Date
Christoph Reiter
2859be7575 FindOpenMP: Add support for openmp 5.1 (llvm 17) and 5.2
llvm 17 now defaults to openmp 5.1; see LLVM commit `0c6f2f629cc0`.
It makes FindOpenMP set OPENMP_FOUND and OpenMP_C_SPEC_DATE, but not
OpenMP_C_VERSION, because it doesn't know the version mapping.
Add the spec date to the version mapping for 5.1 and 5.2 to make
things work again.
2023-11-13 10:51:40 -05:00
Brad King
139df0bc2f GetPrerequisites: Revert "Ignore relative paths printed by ldd"
Revert commit cf2ad9995a (GetPrerequisites: Ignore relative paths
printed by ldd, 2023-02-20, v3.27.0-rc1~459^2) because it regressed
existing use cases.  We will need to find another solution to the use
case motivating the change.

Fixes: #25372
2023-10-31 14:15:29 -04:00
Brad King
25644a78de FindPostgreSQL: Add support for version 16
Fixes: #25292
2023-10-02 14:44:04 -04:00
Brad King
75e9918a66 Android: Require Clang 18 for -std=c++23
Update the Clang version checks added by

* commit eacacc70fc (Clang: use -std=c++23 for Clang 17.0+,
                     2023-05-08, v3.27.0-rc1~115^2)
* commit 0183956d30 (Clang: C++26 support,
                     2023-05-16, v3.27.0-rc1~85^2)

to account for Android NDK r26's distribution of a Clang based on a
development version of LLVM/Clang 17.0 that pre-dated addition of
these flags.

Follow the pattern from commit 12e6796b62 (Android: Do not pass
non-existent Clang -std flags, 2018-04-02, v3.12.0-rc1~284^2),
which fixed the same problem for `-std=c++17`.

Fixes: #25281
2023-09-27 12:56:49 -04:00
Brad King
a159c2d3cf Merge topic 'FindBoost-1.83' into release-3.27
897a149067 FindBoost: Add support for Boost 1.83

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8793
2023-09-12 07:54:59 -04:00
Brad King
897a149067 FindBoost: Add support for Boost 1.83
Update the list of known versions.

Run the command

    cmake -DBOOST_DIR=/path/to/boost_1_83_0 \
      -P Utilities/Scripts/BoostScanDeps.cmake

to extract dependencies from the 1.83.0 source tree.

Dependencies differ from 1.82, as mentioned in the 1.83 release notes:

* Boost.Timer no longer depends on Boost.Chrono

Fixes: #25243
2023-09-11 09:54:49 -04:00
Ben Boeckel
84a097f038 FortranCInterface: forward CMAKE_OSX_DEPLOYMENT_TARGET
GCC needs to be taught about every macOS release it seems, so older
builds may not support usage on newer releases by default.
2023-09-10 21:11:34 -04:00
Brad King
9034394950 FindZLIB: Fix extraction of two-component version number 1.3
Fixes: #25200
2023-08-22 15:08:35 -04:00
Brad King
eab1f33eff Merge topic 'LLVMFlang-Fortran-flags' into release-3.27
1140087ade LLVMFlang-Fortran: Add flags for build types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8741
2023-08-19 08:53:31 -04:00
Tarun Prabhu
1140087ade LLVMFlang-Fortran: Add flags for build types
Fixes: #25193
2023-08-19 08:47:44 -04:00
Brad King
e4fe26201f VS: Remove duplicate import in compiler id vcxproj
Since commit d3c4c6d630 (VS: Import default C++ props file before
toolset-specific props file, 2023-03-01, v3.27.0-rc1~361^2) we import
`Microsoft.Cpp.Default.props` twice.  Remove the extra import line, and
re-order imports as intended by the original change.
2023-08-18 09:49:25 -04:00
Brad King
fcb944a11b Merge topic 'clang_c23' into release-3.27
65288eb92a Clang: use -std=c23 for Clang 18+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8716
2023-08-16 09:44:47 -04:00
Brad King
d8ef731738 Merge topic 'FindPython-3.13' into release-3.27
dfab044c44 FindPython: add support for Python 3.13

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8712
2023-08-16 09:42:52 -04:00
Raul Tambre
65288eb92a Clang: use -std=c23 for Clang 18+
Canonical flag changed in LLVM commit 13629b140801870feff855ca168edf6b34dbef8d.
2023-08-15 09:43:48 -04:00
Vasily Ryabov
dfab044c44 FindPython: add support for Python 3.13
Python 3.13.0a0 can be built from main branch of python/cpython though
there were no official releases yet.
2023-08-15 09:39:43 -04:00
Brad King
955d2b8847 Merge topic 'TAPI-is-Apple-only' into release-3.27
8b0f0dc257 Apple Text Stubs (.tbd): various fixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8708
2023-08-15 09:35:07 -04:00
Marc Chevrier
8b0f0dc257 Apple Text Stubs (.tbd): various fixes
* ensure tapi lookup is applied only for concerned toolchains
* fix typos in tests

Fixes: #25182
2023-08-11 16:30:02 +02:00
Brad King
597139b853 FindJNI: Restore support for macOS without Xcode
Fix logic added by commit efa0e2ddaf (FindJNI: Update for Xcode greater than
12.1 on macOS, 2023-08-06, v3.27.2~5^2) to tolerate missing `xcodebuild`.

Fixes: #25181
2023-08-11 10:15:44 -04:00
Christian Oyarzun
efa0e2ddaf FindJNI: Update for Xcode greater than 12.1 on macOS
`JavaVM.framework` was removed from Xcode in version 12.2+.

Fixes: #23364
2023-08-07 16:09:22 -04:00
Marc Chevrier
b02f3872d0 FindPython: Restore Python_SITE* values for versions below 3.10
Debian based distributions have a buggy sysconfig package.
So, rely on distutils.sysconfig if python version is less than 3.10.

Fixes: #25135
2023-07-31 15:00:44 -04:00
Brad King
3ea7204de4 Merge topic 'FindOpenSSL-trust-root-dir' into release-3.27
791d4fd350 FindOpenSSL: Prefer OPENSSL_ROOT_DIR only if non-empty

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8643
2023-07-21 09:37:28 -04:00
Brad King
b4693ea408 Merge topic 'FindCUDAToolkit-libnvrtc-builtins' into release-3.27
c2601d01d1 FindCUDAToolkit: Fix nvrtc_builtins library name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !8642
2023-07-21 09:35:09 -04:00
Brad King
791d4fd350 FindOpenSSL: Prefer OPENSSL_ROOT_DIR only if non-empty
Since commit 5cc8a69867 (FindOpenSSL: Trust the user's OPENSSL_ROOT_DIR,
2023-05-17, v3.27.0-rc1~71^2) we use `OPENSSL_ROOT_DIR` whenever it is
defined, even if it is an empty string.  This breaks a pattern in
existing projects that define an empty `OPENSSL_ROOT_DIR` cache entry so
that `cmake-gui` users can fill it in.  Use the value only if non-empty.

Issue: #18352
2023-07-20 12:18:13 -04:00
Tomoharu Kitawaki
c2601d01d1 FindCUDAToolkit: Fix nvrtc_builtins library name
The lib is named `libnvrtc-builtins.so`, not `libnvrtc_builtins.so`.

Update the change from commit 2a94c762ed (FindCUDAToolkit: Add support
for CUDA::nvrtc_static, 2023-01-20, v3.26.0-rc1~55^2).  Apply a fix
similar to commit 9688a8ebc2 (FindCUDAToolkit: Fix
`nvrtc_builtins_static` library name, 2023-02-03, v3.26.0-rc2~15^2).
2023-07-20 11:34:47 -04:00
Brad King
a881ae61f1 Merge topic 'armclang-update-version-computation' into release-3.27
65fac2fa35 ARMClang: Fix computation of compiler semantic version patch level

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8636
2023-07-18 13:48:49 -04:00
Daniel Brondani
65fac2fa35 ARMClang: Fix computation of compiler semantic version patch level
According to ARMClang documentation 6.20, the patch version number
should not include the last two digits of `__ARMCOMPILER_VERSION`,
which are reserved for internal use by ARM.
2023-07-18 13:29:01 -04:00
Jannik Beyerstedt
6e90d79577 FindProtobuf: Fix new version number scheme
Revise the changes from commit fc7dcc6a24 (FindProtobuf: Support new
version number scheme, 2023-06-19, v3.27.0-rc3~2^2).  Changing the
content of `Protobuf_VERSION` to exclude the major version of the library
might break code as it can't be used to detect breaking changes in the
library any more.

However, protoc v22 and up don't print the major version any more, so we
need to compare the against a truncated version number, too.
2023-07-14 09:34:13 -04:00
Brad King
bfe4722a61 Android: Restore platform info and search paths shared with Linux
These were accidentally dropped by commit 1373373823 (enable_language:
Establish target platform identification variables earlier, 2023-06-06,
v3.27.0-rc1~3^2~1).

Fixes: #25077
2023-07-13 08:19:15 -04:00
Brad King
cd70f0f9eb Merge topic 'findprotobuf-mingw' into release-3.27
e978b3b814 FindProtobuf: Fix linking to shared libraries on MinGW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8609
2023-07-07 10:29:30 -04:00
Brad King
f79428619e HIP: Fix search for hip-lang CMake package on Fedora distros
These distros package the hip-lang package under `lib64`, so search it
too.  This is similar to commit bae57dc281 (HIP: Fix search for hip-lang
CMake package on multiarch distros, 2023-05-31, v3.27.0-rc1~28^2).

Fixes: #25050
2023-07-05 12:37:34 -04:00
مهدي شينون (Mehdi Chinoune)
e978b3b814 FindProtobuf: Fix linking to shared libraries on MinGW
Fixes: #25011
2023-07-05 08:25:01 -04:00
Brad King
9ede4cab2b FetchContent: Protect ExternalProject keywords from unknown arguments
`ExternalProject_Add` treats all keyword arguments as multi-valued.
FetchContent re-orders some keyword arguments w.r.t. unparsed arguments.
Add an internal keyword argument to separate the keyword values from
following unparsed arguments.

This was exposed by commit 550f63447d (ExternalProject/FetchContent:
Support relative remote URLs, 2023-04-21, v3.27.0-rc1~156^2) by adding
`GIT_REPOSITORY` to the set of re-ordered keyword arguments.  This
caused its value to absorb following unparsed arguments.

Fixes: #25029
2023-06-29 09:49:51 -04:00
Brad King
b1d2c495dd Merge topic 'FindCxxTest-doc' into release-3.27
676d1da38b FindCxxTest: Modernize documentation formatting
dfe0f58962 FindCxxTest: Update link to cxxtest project page

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8589
2023-06-26 09:45:45 -04:00
Brad King
b7810bfb18 Merge topic 'support_nvhpc_versions_without_isystem' into release-3.27
f73ae7c510 NVHPC: Support nvfortran versions that don't support isystem

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8588
2023-06-26 09:44:56 -04:00
Brad King
676d1da38b FindCxxTest: Modernize documentation formatting 2023-06-23 12:20:03 -04:00
Brad King
dfe0f58962 FindCxxTest: Update link to cxxtest project page 2023-06-23 12:20:03 -04:00
Robert Maynard
f73ae7c510 NVHPC: Support nvfortran versions that don't support isystem
Fixes: #25019
2023-06-23 12:14:09 -04:00
Marc Chevrier
5945a98ced link dependencies: deactivate the feature
Unfortunately it breaks in combination with LTO due to a bug in the GNU
linker.

Fixes: #25014
2023-06-23 10:35:04 -04:00
Brad King
fd949f6e01 Merge topic 'android-platform-vars' into release-3.27
ab66b89a46 Android: Restore platform id vars with legacy toolchain file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8576
2023-06-20 13:09:58 -04:00
Brad King
ab66b89a46 Android: Restore platform id vars with legacy toolchain file
Restore definition of `ANDROID` and `UNIX` when `CMAKE_SYSTEM_VERSION`
is `1`.  This was broken by commit 1373373823 (enable_language:
Establish target platform identification variables earlier, 2023-06-06,
v3.27.0-rc1~3^2~1).

Fixes: #25004
2023-06-20 10:39:37 -04:00
Jannik Beyerstedt
fc7dcc6a24 FindProtobuf: Support new version number scheme
Protobuf changed it's version number scheme with version 21. The first number
(usually the major version) is not synchronized between compiler and library
version, but the second and third number are. See
https://protobuf.dev/news/2022-05-06/ for more details.

Fixes: #24847
2023-06-20 09:59:53 -04:00
Brad King
80ba2cccfc FindPostgreSQL: Add support for version 15 2023-06-16 08:21:04 -04:00
Brad King
4a2b708144 Modules: Restore unnecessary inclusions for compatibility
Since commit 03c6ebf2b5 (Modules:Check,GenerateExportHeader: include
only what's needed, 2023-03-09, v3.27.0-rc1~327^2) some existing
projects broke because they were accidentally relying on indirect
inclusion of some check modules.  For now, restore the unnecessary
includes for compatibility.  They can be removed with a policy later.

Fixes: #24991
Issue: #24994
2023-06-12 09:59:23 -04:00
Brad King
abc93ff511 Merge topic 'FindCUDAToolkit-cupti-nvperf' into release-3.27
f9579ffaa6 FindCUDAToolkit: Add cupti nvperf and pcsampling targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8545
2023-06-08 10:48:09 -04:00
Robert Maynard
f9579ffaa6 FindCUDAToolkit: Add cupti nvperf and pcsampling targets 2023-06-07 13:58:09 -04:00
Brad King
e4c53cdc15 BinUtils: Drop now-unnecessary cross-compiling workaround for Apple hosts
Previously we added fallbacks to `llvm-{ar,strip}` on Apple hosts
in case of cross-compiling because the `APPLE` platform variable
was not set w.r.t. the target platform.  The platform variable
has been fixed, so remove the fallbacks.

Issue: #23333
2023-06-07 07:02:20 -04:00
Brad King
1373373823 enable_language: Establish target platform identification variables earlier
Set target platform identification variables like `APPLE` and `LINUX`
as soon as the target system is identified.  This makes them available
during toolchain and binutils selection.

Fixes: #23333
2023-06-07 07:02:20 -04:00
Brad King
1d916bf3d2 kFreeBSD,GNU: Provide multiarch library directory regex earlier
Make `CMAKE_LIBRARY_ARCHITECTURE_REGEX` available while determining
compilers before `Platform/{kFreeBSD,GNU}` is loaded.

Follow up commit cc737ae829 (Linux: Provide multiarch library directory
regex earlier, 2023-05-31).
2023-06-06 15:35:20 -04:00
Brad King
ec472999dc Merge topic 'apple-clang-asm-compiler-id'
8c789bee83 AppleClang: Fix ASM compiler identification

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8537
2023-06-06 10:00:52 -04:00
Brad King
1ad77d7029 Merge topic 'FindPython-distutils-deprecation'
988ac305bd FindPython: update for distutils module deprecation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8538
2023-06-06 09:54:04 -04:00