diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2021-05-03 14:59:23 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2021-07-28 17:49:44 (GMT) |
commit | d856aaa37d35a23b1d5da3aa3cc34201b76b8bde (patch) | |
tree | d83e76a4b0e3179c50c74a72d4a0db80dc24e78d /Modules/FindCUDAToolkit.cmake | |
parent | 6c01bbe180df8771fa1e93776f0b716ac146218f (diff) | |
download | CMake-d856aaa37d35a23b1d5da3aa3cc34201b76b8bde.zip CMake-d856aaa37d35a23b1d5da3aa3cc34201b76b8bde.tar.gz CMake-d856aaa37d35a23b1d5da3aa3cc34201b76b8bde.tar.bz2 |
FindCUDAToolkit: Understand NVHPC versioned math library layout
The NVHPC packages bundle the CUDA math libraries in a sibling
directory (`math_libs`) instead of in with the rest of the
cuda libraries.
Depending on the NVHPC package the math_libs folder can have
versioned subdirectories, therefore we prefer finding the
same versions as the CUDA Toolkit and falling back to the
latest when not possible.
Diffstat (limited to 'Modules/FindCUDAToolkit.cmake')
-rw-r--r-- | Modules/FindCUDAToolkit.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake index e453109..92042d2 100644 --- a/Modules/FindCUDAToolkit.cmake +++ b/Modules/FindCUDAToolkit.cmake @@ -844,6 +844,9 @@ if(CUDAToolkit_FOUND) HINTS ${CUDAToolkit_LIBRARY_DIR} ENV CUDA_PATH PATH_SUFFIXES lib64/stubs lib/x64/stubs lib/stubs stubs + # Support NVHPC splayed math library layout + ../../math_libs/${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR}/lib64 + ../../math_libs/lib64 ) mark_as_advanced(CUDA_${lib_name}_LIBRARY) |