From e9107bc4f38a117c20a5caee300a2e7a22c99a34 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 6 Feb 2025 01:04:16 +0100 Subject: [PATCH] Also try to get cuda from path to nvcc --- configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/configure.ac b/configure.ac index 1c3b138cff..ff3931464c 100644 --- a/configure.ac +++ b/configure.ac @@ -1718,6 +1718,20 @@ if test x$enable_cuda = xyes -o x$enable_cuda = xmaybe; then if test "$have_valid_cuda" = "no" ; then STARPU_CHECK_CUDA("$CUDA_ROOT", "$CUDA_INC_PATH", "$CUDA_LIB_PATH") fi + if test "$have_valid_cuda" = "no" ; then + if test "$NVCC" = "" ; then + AC_PATH_PROG([NVCC], [nvcc], [not-found], [$PATH:/usr/local/cuda/bin]) + fi + if test "$NVCC" != not-found ; then + CUDA_ROOT="$(dirname $NVCC)/.." + # Try to find all of cuda just from the availability of nvcc in PATH + STARPU_CHECK_CUDA("$CUDA_ROOT", "$CUDA_ROOT/include", "$CUDA_ROOT/lib") + cuda_dir=$(dirname $NVCC)/.. + else + unset NVCC + fi + fi + if test "$have_valid_cuda" = "no" ; then for f in "/usr/local/cuda" "/c/cuda" "/cygdrive/c/cuda" "/opt/cuda" "$CUDA_ROOT" "$CUDA_PATH" "$CUDA_INC_PATH/.." "$CUDA_INC/.." "$CUDA_BIN/.." "$CUDA_SDK/.." "$CUDA_INSTALL_PATH" "$CUDA_TOOLKIT"; do if test -n "$f" ; then