Skip to content

Commit c8e885d

Browse files
committed
Find libcuda.so automatically if --with-cuda-lib is not passed.
Finding CUDA libraries without having to specify both --with-cuda and --with-cuda-lib was requested in github issue #12264 Signed-off-by: Nick Sarkauskas <[email protected]>
1 parent aa2e117 commit c8e885d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

config/opal_check_cuda.m4

+5-1
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,13 @@ AC_ARG_WITH([cuda],
5050
[AS_HELP_STRING([--with-cuda(=DIR)],
5151
[Build cuda support, optionally adding DIR/include])])
5252
AC_MSG_CHECKING([if --with-cuda is set])
53+
54+
# Search for libcuda.so in $with_cuda if the user didn't pass --with-cuda-libdir
5355
AC_ARG_WITH([cuda-libdir],
5456
[AS_HELP_STRING([--with-cuda-libdir=DIR],
55-
[Search for CUDA libraries in DIR])])
57+
[Search for CUDA libraries in DIR])],
58+
[],
59+
[with_cuda_libdir=$(dirname $(find $with_cuda -name libcuda.so))])
5660
5761
# Note that CUDA support is off by default. To turn it on, the user has to
5862
# request it. The user can just ask for --with-cuda and it that case we

0 commit comments

Comments
 (0)