Skip to content
Snippets Groups Projects
Commit d856aaa3 authored by Robert Maynard's avatar Robert Maynard
Browse files

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.
parent 6c01bbe1
Branches
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment