Commit Graph

110 Commits

Author SHA1 Message Date
Robert Maynard
0b6ae9c467 FindCUDAToolkit: Restore CUDAToolkit_LIBRARY_SEARCH_DIRS variable
This was accidentally dropped by commit 4316d4dcfd (FindCUDAToolkit:
Search all of `nvcc` implicit includes and library dirs, 2023-09-26).
2023-10-04 12:10:02 -04:00
Robert Maynard
4316d4dcfd FindCUDAToolkit: Search all of nvcc implicit includes and library dirs
Improves the handling of CUDA layouts where we have multiple include
and library directories listed in the output of `nvcc -v`. This
updates both when the CUDA language is enabled or not.

Fixes: #24915
2023-09-27 13:28:52 -04:00
Robert Maynard
0744c02e24 FindCUDAToolkit: targets pointing to stubs now use IMPORTED_IMPLIB
This ensures that we don't add rpath entries to the stubs directory
which would cause runtime loading of the wrong libraries.
2023-07-24 14:56:28 -04:00
Brad King
6194193a8a Merge topic 'file-REAL_PATH-relative'
6b5f2dbbfe file(REAL_PATH): resolve symlinks before '..' components

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8605
2023-07-24 08:43:19 -04:00
Brad King
32174571e9 Merge topic 'FindCUDAToolkit-libnvrtc-builtins'
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:10 -04:00
Robert Maynard
6b5f2dbbfe file(REAL_PATH): resolve symlinks before '..' components
Previously REAL_PATH would collapse paths before resolving any symlinks
so if `..` crossed a symlink the output from `REAL_PATH` would be wrong.

It looked like REAL_PATH did this by mistake since it was a side-effect
of ensuring we had an absolute path before resolving symlinks.
2023-07-20 17:02:58 -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
Robert Maynard
f9579ffaa6 FindCUDAToolkit: Add cupti nvperf and pcsampling targets 2023-06-07 13:58:09 -04:00
Brad King
76940fecde Merge topic 'FindCUDAToolkit_more_library_root_detection'
587c0443cc FindCUDAToolkit: Support CUDA version extraction from version.json

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8451
2023-05-05 12:34:54 -04:00
Robert Maynard
587c0443cc FindCUDAToolkit: Support CUDA version extraction from version.json
Fixes: #24858
2023-05-04 12:26:04 -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
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
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
b548c7efa6 Merge topic 'FindCUDAToolkit-static-deps' into release-3.26
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:26 -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
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
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
Andrey Alekseenko
9be0063d98 FindCUDAToolkit: mark a few variables as advanced
- CUDAToolkit_BIN_DIR (was already "advanced" sometimes)
- CUDAToolkit_CUPTI_INCLUDE_DIR
2023-03-18 00:55:24 +01:00
Robert Maynard
21b102c77d FindCUDAToolkit: Add support for finding Tegra cudla library
Fixes #24575
2023-03-07 13:47:16 -05:00
Brad King
3c5b34af9d Help: Replace links with their permanent redirects 2023-02-17 08:45:01 -05:00
Brad King
1004be159f FindCUDAToolkit: Replace broken links to NVIDIA documentation
The cuFile API documentation has moved, so link to its new location.

The nvGRAPH library has been removed, so link to a web archive copy.

The NTVX library has a higher-level landing page.
2023-02-17 08:44:02 -05:00
Paul Taylor
9688a8ebc2 FindCUDAToolkit: Fix nvrtc_builtins_static library name
Update the change from commit 2a94c762ed (FindCUDAToolkit: Add support
for CUDA::nvrtc_static, 2023-01-20, v3.26.0-rc1~55^2).  The lib is named
`libnvrtc-builtins_static.a`, not `libnvrtc_builtins_static.a`.
2023-02-06 09:36:43 -05:00
Robert Maynard
2a94c762ed FindCUDAToolkit: Add support for CUDA::nvrtc_static 2023-01-20 12:05:43 -05:00
Robert Maynard
743d4181b4 FindCUDAToolkit: Support cross-compilation to sbsa-linux
Fixes #24192
2023-01-11 11:27:37 -05:00
Robert Maynard
e60fa80fbe FindCUDAToolkit: Handle CUDA::nvToolsExt not existing 2023-01-11 11:27:37 -05:00
Robert Maynard
d37d9c098c FindCUDAToolkit: Support the new nvJitLink library in CUDA 12 2022-12-12 13:28:50 -05:00
Robert Maynard
9d012b1f69 FindCUDAToolkit: Ensure that paths provided have no symlinks
Fixes: #24188
2022-11-30 16:39:00 -05:00
Brad King
9b9a421668 Merge topic 'find_cuda_toolkit_support_symlink_math_dirs'
989d50d7fc FindCUDAToolkit: Support nvhpc splayed layouts without symlinks
207518b6e8 FindCUDAToolkit: Handle CUDAToolkit_TARGET_DIR dir being a symlink

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7945
2022-11-23 07:11:59 -05:00
Robert Maynard
989d50d7fc FindCUDAToolkit: Support nvhpc splayed layouts without symlinks 2022-11-22 09:02:08 -05:00
Brad King
66b64b5984 Merge topic 'FindCUDAToolkit_handle_nvptxcompiler_static_not_existing'
c7ece269da FindCUDAToolkit: Handle toolkits that don't provide nvptxcompiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7932
2022-11-18 09:23:36 -05:00
Robert Maynard
207518b6e8 FindCUDAToolkit: Handle CUDAToolkit_TARGET_DIR dir being a symlink 2022-11-18 08:42:04 -05:00
Robert Maynard
c7ece269da FindCUDAToolkit: Handle toolkits that don't provide nvptxcompiler
Some versions of the CUDA toolkit don't provide any static
libraries, and therefore we need to handle that `nvptxcompiler_static`
might not be found
2022-11-17 13:41:11 -05:00
Robert Maynard
6f707ab541 FindCUDAToolkit: Support math_libs directory being a symlink
Fixes #24140
2022-11-09 16:04:00 -05:00
Robert Maynard
62f13ed588 FindCUDAToolkit: Restore usage from multiple directories
Fixes #24119
2022-11-02 12:23:30 -04:00
Robert Maynard
301815eb62 FindCUDAToolkit: Add nvptxcompiler_static dependency on Threads::Threads 2022-10-31 11:48:09 -04:00
Robert Maynard
eefba0fb02 FindCUDAToolkit: cuFile_rdma_static needs to link to cuFile_static 2022-10-12 13:26:05 -04:00
Brad King
9adb3fb733 Merge topic 'add_nvptx_compiler_to_findCUDAToolkit' into release-3.25
01cfd0163d FindCUDAToolkit: Add support for the nvptx compiler library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7779
2022-10-12 09:22:11 -04:00
Robert Maynard
01cfd0163d FindCUDAToolkit: Add support for the nvptx compiler library
Fixes #23892
2022-10-11 10:35:50 -04:00
Robert Maynard
ce6de038d9 FindCUDAToolkit: Add support for the cuFile library 2022-10-11 09:27:26 -04:00
Brad King
f6813c4159 Merge topic 'findCUDAToolkit_declare_deps_for_targets_once'
f0918fe505 FindCUDAToolkit: Correctly state cusolver and cublas dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7633
2022-09-07 09:38:01 -04:00
Robert Maynard
f0918fe505 FindCUDAToolkit: Correctly state cusolver and cublas dependencies
Fixes #23920
2022-09-02 12:24:40 -04:00
Craig Scott
7198d12d5e Merge topic 'correct_cupti_search_paths'
1f3c3589f1 FindCUDAToolkit: Search the cuda toolkit include path for cupti

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7608
2022-08-26 06:50:40 -04:00
Robert Maynard
1f3c3589f1 FindCUDAToolkit: Search the cuda toolkit include path for cupti 2022-08-24 09:49:10 -04:00
Raul Tambre
cd200c6c2d FindCUDAToolkit: nvtx3 target
nvtx3 is a header-only replacement for the previous shared library
implementations.

I implemented it as a separate target since while the header names match and
ideally it should be API compatible, forcing its include directory into the old
target would lengthen the include search path and could cause confusion or
possible build differences for projects using multiple build systems. This
keeps it explicit as a developer opt-in.

Implements: #21377
Resolves: #23835
2022-08-13 23:52:42 +03:00
Peter Bell
e6b51a1b01 CUDAToolkit: Add include paths for CUDA::cupti
CUDA's cupti library has its headers in a seperate directory on a
standard CUDA install, but `CUDA::cupti` only adds the default cuda
include directory.

Issue: #22761
2022-04-26 13:48:02 -04:00