Commit Graph

13270 Commits

Author SHA1 Message Date
Brad King
ebf3f48dab Merge topic 'modules-if-deref'
21e13f2416 CMakeDetermineCXXCompiler: Avoid if() quoted auto-dereference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8438
2023-04-28 10:10:39 -04:00
Brad King
3df699544b Merge topic 'update_FindCUDAToolkit_nvrtc_notes'
0e0eb12918 FindCUDAToolkit: Update nvrtc section to clarify a static version exists

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8436
2023-04-28 10:09:40 -04:00
Brad King
9b463cc4b5 Merge topic 'iar-silent-flag'
01e944128d IAR: Move linker silencing flag to CMAKE_EXE_LINKER_FLAGS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8421
2023-04-28 10:08:22 -04:00
Brad King
21e13f2416 CMakeDetermineCXXCompiler: Avoid if() quoted auto-dereference
This was missed by commit 29c3edb87a (Avoid if() quoted
auto-dereference, 2014-10-14, v3.2.0-rc1~501^2).

Fixes: #24859
2023-04-27 12:13:22 -04:00
Brad King
582c17bdd2 Merge topic 'ninja-nvhpc-fortran-Werror'
0f6a1dd3ed Ninja: Revert "Exclude NVHPC -Werror flags during Fortran preprocessing"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8435
2023-04-27 09:40:21 -04:00
Craig Scott
0ca98beb57 Merge topic 'ExternalProject-relative-git-urls'
550f63447d ExternalProject/FetchContent: Support relative remote URLs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7988
2023-04-27 09:12:26 -04:00
Robert Maynard
0e0eb12918 FindCUDAToolkit: Update nvrtc section to clarify a static version exists
Fixes #24798
2023-04-27 08:53:32 -04:00
Brad King
0f6a1dd3ed Ninja: Revert "Exclude NVHPC -Werror flags during Fortran preprocessing"
Revert commit 6b58cdd4cf (Ninja: Exclude NVHPC -Werror flags during
Fortran preprocessing, 2023-04-04).  Since commit 9d40f01442 (NVHPC: Use
-Werror for COMPILE_OPTIONS_WARNING_AS_ERROR, 2023-04-13), `nvfortran`
can handle the plain `-Werror` flag during preprocessing.

Issue: #24665
2023-04-26 14:36:46 -04:00
Michael Karcher
ca6e81a31f VS/Android: Deduce processor type from CMAKE_GENERATOR_PLATFORM
Closes: #24839
2023-04-26 18:11:23 +02:00
Felipe Torrezan
01e944128d IAR: Move linker silencing flag to CMAKE_EXE_LINKER_FLAGS
The IAR linker silencer flag was previously hardcoded in
`CMAKE_${lang}_LINKER_EXECUTABLE`.  Move the flag to a place that is
under the end user's control.  The default behavior (silenced linker) is
not changed.

Fixes: #24828
2023-04-26 10:48:31 -04:00
Brad King
d5d06ec444 Merge topic 'vs2022-android'
16d8b65bc0 VS/Android: Use safe API level when detecting the NDK directory
f7af10100c VS/Android: Detect full NDK root instead of sysroot
850ee280e0 VS/Android: Set API level explicitly during compiler identification
5d5b6c741d VS/Android: Do not specify Windows Runtime library type during compiler id
e78abf94e3 VS/Android: Use ApplicationTypeRevision 3.0 in VS2022

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8426
2023-04-26 10:28:38 -04:00
Brad King
1ac569fdaa Merge topic 'fortran_ninja_compile_as_warning'
9d40f01442 NVHPC: Use -Werror for COMPILE_OPTIONS_WARNING_AS_ERROR

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8415
2023-04-26 10:24:28 -04:00
Brad King
b92e21cab8 Merge topic 'FindCUDAToolkit-static-deps'
1d6c343661 FindCUDAToolkit: Add missing static library dependencies on pthread and libdl

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8422
2023-04-26 10:22:27 -04:00
Brad King
768c36e256 Merge topic 'FindCUDAToolkit_nvrtc_windows_dependencies'
11a9f88bdf FindCUDAToolkit: Fix nvrtc_static dependencies on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8405
2023-04-26 10:21:13 -04:00
Robert Maynard
1d6c343661 FindCUDAToolkit: Add missing static library dependencies on pthread and libdl
Discourse-topic: https://discourse.cmake.org/t/7946
2023-04-26 10:19:59 -04:00
Chris Wright
550f63447d ExternalProject/FetchContent: Support relative remote URLs
Teach `ExternalProject_Add` and `FetchContent_Declare` to resolve
relative remote URLs provided via `GIT_REPOSITORY`.  Add policy
CMP0150 to maintain compatibility.

Fixes: #24211
Co-Authored-By: Craig Scott <craig.scott@crascit.com>
2023-04-26 16:30:36 +08:00
Michael Karcher
16d8b65bc0 VS/Android: Use safe API level when detecting the NDK directory 2023-04-25 13:49:03 -04:00
Michael Karcher
f7af10100c VS/Android: Detect full NDK root instead of sysroot
Visual Studio always uses a complete NDK and not a standalone toolchain.
Let CMake handle the NDK and related logic correctly, avoid trying to
find the standalone toolchain version from the unified clang toolchain
in newer NDKs.
2023-04-25 13:48:33 -04:00
Michael Karcher
850ee280e0 VS/Android: Set API level explicitly during compiler identification
VS2022 defaults to API 31 in 64-bit builds.  This breaks if you combine
VS2022 with an older Android NDK.
2023-04-25 13:47:17 -04:00
Michael Karcher
5d5b6c741d VS/Android: Do not specify Windows Runtime library type during compiler id
The VS2022 Clang toolchain adds some windows libraries to the linked
library list if RuntimeLibrary is set, even if the Project is targeting
Android.  This causes an unexpected linker failure.
2023-04-25 13:46:10 -04:00
Michael Karcher
e78abf94e3 VS/Android: Use ApplicationTypeRevision 3.0 in VS2022
Visual Studio 17 (Marketing name: Visual Studio 2022) still ships with
"3.0" as most recent Variant of the Android application type.
Use this revision.
2023-04-25 13:45:37 -04:00
Robert Maynard
11a9f88bdf FindCUDAToolkit: Fix nvrtc_static dependencies on Windows
Required for CUDA toolkit 11.5:

* https://docs.nvidia.com/cuda/archive/11.5.0/nvrtc/index.html#build-instruction
2023-04-25 13:37:19 -04:00
Robert Maynard
9d40f01442 NVHPC: Use -Werror for COMPILE_OPTIONS_WARNING_AS_ERROR
The previously-used `-Werror all-warnings` is not supported by
the NVHPC suite of compilers.  This previously worked since `-Werror`
was being used and `all-warnings` was being excluded.

We thought this was the correct syntax due to incorrect documentation
about `-Werror`, which stated the argument should be space-separated,
while it should actually be separated with `=` or `,`.

Issue: #24665
2023-04-25 11:16:26 -04:00
Craig Scott
453cf8a196 Merge topic 'ninja-nvhpc-fortran-Werror'
6b58cdd4cf Ninja: Exclude NVHPC -Werror flags during Fortran preprocessing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8393
2023-04-10 17:34:47 -04:00
Brad King
3f68cb080f Merge topic 'FindOpenSSL-mingw'
248689f9bf FindOpenSSL: Fix finding header files and static libraries on MinGW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8394
2023-04-06 09:09:42 -04:00
Brad King
8b9c2b0009 Merge topic 'FindCUDAToolkit-nvptxcompiler_static-deps'
8711231739 FindCUDAToolkit: nvptxcompiler_static correctly specify dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8395
2023-04-06 09:05:50 -04:00
Brad King
038cd7f620 Merge topic 'FindCUDAToolkit-nvptxcompiler_static-deps' into release-3.26
8711231739 FindCUDAToolkit: nvptxcompiler_static correctly specify dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8395
2023-04-06 09:05:49 -04:00
Brad King
d797c3c8e9 Merge topic 'FindCUDAToolkit-cusparse-deps'
516d807423 FindCUDAToolkit: Add dependency between cusparse and nvJitLink

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8397
2023-04-06 09:04:43 -04:00
Robert Maynard
516d807423 FindCUDAToolkit: Add dependency between cusparse and nvJitLink
Starting in CUDA 12.0 cusparse uses nvJitLink. As part of verifying this PR I also corrected the nvJitLink dependencies
2023-04-05 11:37:06 -04:00
Robert Maynard
8711231739 FindCUDAToolkit: nvptxcompiler_static correctly specify dependencies
Avoids linking to `Threads::Threads` on non-unix systems where it isn't needed. In addition ensures that dlopen symbols are resolved.
2023-04-05 10:57:55 -04:00
مهدي شينون (Mehdi Chinoune)
248689f9bf FindOpenSSL: Fix finding header files and static libraries on MinGW
* Avoid searching in the `Program Files` folder because the official
  OpenSSL is built for the MSVC ABI, and so is not compatible with MinGW.

* Static libraries on MinGW has `.a` extension.
2023-04-05 09:49:31 -04:00
Brad King
6b58cdd4cf Ninja: Exclude NVHPC -Werror flags during Fortran preprocessing
The Ninja generator preprocesses Fortran separately in order to scan for
module dependencies.  NVHPC's `nvfortran` does not support its `-Werror`
flag while preprocessing with `-E`, so filter it out.

Fixes: #24665
2023-04-04 14:53:26 -04:00
Brad King
87b97464f7 Merge topic 'FindBLAS-LAPACK-vendor-var'
9d18426c47 Find{BLAS,LAPACK}: Prefer BLA_VENDOR cmake variable over env variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8387
2023-04-04 09:30:39 -04:00
Brad King
c07e915adb Merge topic 'swift-xcode-14.3'
52dbfefe0d Xcode: Fix detection of Swift compiler location for Xcode 14.3

Merge-request: !8388
2023-04-04 09:26:01 -04:00
Brad King
f8deb84120 Merge topic 'swift-xcode-14.3' into release-3.26
52dbfefe0d Xcode: Fix detection of Swift compiler location for Xcode 14.3

Merge-request: !8388
2023-04-04 09:24:57 -04:00
Brad King
52dbfefe0d Xcode: Fix detection of Swift compiler location for Xcode 14.3
Previously we tried to match output from `xcodebuild` to detect the
path to the `swiftc` tool.  This approach is used for C and CXX
for historical reasons, but is unnecessary for Swift.  We know the
name of the tool, so we can just ask `xcrun --find swiftc`.

Fixes: #24666
2023-04-03 18:59:57 -04:00
Brad King
9d18426c47 Find{BLAS,LAPACK}: Prefer BLA_VENDOR cmake variable over env variable
This is implied by the documentation, but was not implemented properly.

Fixes: #24664
2023-04-03 09:58:58 -04:00
Brad King
997e5fa714 Merge topic 'vs-fortran-try_compile'
4da50fe3f4 VS: Remove extra try_compile argument in Intel Fortran check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8383
2023-04-03 08:56:55 -04:00
Brad King
921ffd3070 Merge topic 'vs-fortran-try_compile' into release-3.26
4da50fe3f4 VS: Remove extra try_compile argument in Intel Fortran check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8383
2023-04-03 08:56:54 -04:00
Brad King
4da50fe3f4 VS: Remove extra try_compile argument in Intel Fortran check
Refactoring in commit d00d8537f6 (Modules: Use new keyword-dispatched
try_compile signature, 2022-09-16, v3.25.0-rc1~115^2) accidentally
left one of the old signature arguments behind, causing a warning.
2023-03-31 08:22:23 -04:00
Brad King
fb37de96a0 Merge topic 'remove-FindPythonInterp-FindPythonLibs'
a4c5b91f80 FindPython{Interp,Libs}: Add policy to remove these modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !8380
2023-03-31 08:08:18 -04:00
Brad King
be3c564f8c Merge topic 'binutils-strip-macos'
ac2562afb3 BinUtils: Avoid llvm-strip on Apple platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8372
2023-03-31 08:01:16 -04:00
Brad King
a4c5b91f80 FindPython{Interp,Libs}: Add policy to remove these modules
The `FindPythonInterp` and `FindPythonLibs` modules have been deprecated
since CMake 3.12.  Add a policy to pretend they do not exist in order to
encourage projects to port to `FindPython` or `FindPython{2,3}`.
2023-03-30 12:05:09 -04:00
Brad King
1d1ee2b049 Merge topic 'ci-FindHDF5'
d38c752de2 ci: Enable FindHDF5 tests on Linux builds
28c4945a8a ci: Add HDF5 to Debian and Fedora base images
ad9e151045 Tests: Add cases covering FindHDF5 variables and imported targets
0e87e6c1a4 Tests: Add FindMPI test environment modification option
ee075a53c8 FindHDF5: Record compiler wrapper checks to configure log
72915b1068 FindHDF5: Fix compiler wrapper checks with spaces in path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8378
2023-03-30 07:22:17 -04:00
Brad King
ac2562afb3 BinUtils: Avoid llvm-strip on Apple platforms
Since commit cf82300a63 (BinUtils: Clarify search logic and make it more
consistent, 2021-05-27, v3.21.0-rc1~119^2~2) we prefer `llvm-strip` over
`strip` when using Clang.  However, `llvm-strip` seems to produce
unusable binaries in cases involving chained fixups.  Prefer Apple's
`strip` over `llvm-strip` on `APPLE` platforms.

We still need to consider `llvm-strip` as a fallback as explained for
`llvm-ar` by commit fee36b7a78 (BinUtils: Restore llvm-ar fallback on
Apple platforms, 2022-03-15, v3.23.0-rc4~12^2).

Issue: #24601
2023-03-30 07:14:07 -04:00
Brad King
2f3ba93102 Merge topic 'FindOpenAL-framework'
f05bd762f5 ci: Enable FindOpenAL test on macOS jobs
1d06554fc6 Tests: Fix FindOpenAL test for macOS framework
5f5476ee31 FindOpenAL: Fix imported target for macOS framework

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8373
2023-03-30 06:57:10 -04:00
Brad King
ee075a53c8 FindHDF5: Record compiler wrapper checks to configure log 2023-03-29 17:18:29 -04:00
Brad King
72915b1068 FindHDF5: Fix compiler wrapper checks with spaces in path
Some HDF5 compiler wrappers do not support source file paths that
contain spaces.  Pass source files to them using a file name in the
current working directory to avoid spaces.
2023-03-29 17:18:29 -04:00
nega
5f5476ee31 FindOpenAL: Fix imported target for macOS framework
If a framework is found, specify it through `INTERFACE_LINK_LIBRARIES`
because `IMPORTED_LOCATION` requires a file and not a framework
directory.
2023-03-29 13:31:48 -04:00
Brad King
d79237a580 Merge topic 'swift-old-driver'
006e1995eb Swift: Restore compatibility with old C++ driver

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8365
2023-03-29 09:13:33 -04:00