From 171672f620934eafa79d4ef3e2b48143d23a75f8 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Thu, 31 Oct 2019 07:28:42 +0100 Subject: [PATCH] Configure: use CUDA_PATH only if set Use CUDA_PATH only if set - this prevents substitution of $CUDA_PATH/bin to /bin, which may be symlink to /usr/bin resulting in incorrect CUDA path root "/". --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 285afda83..262d45f3f 100644 --- a/configure.ac +++ b/configure.ac @@ -1957,8 +1957,12 @@ AC_ARG_WITH(cuda, [CUDA_PATH=$withval ]) +if test -n "$CUDA_PATH"; then + CUDA_PATH_SEP="$CUDA_PATH$PATH_SEPARATOR" +fi + # nvcc is intentional here -AC_PATH_PROG(NVCC, nvcc, [], [$CUDA_PATH/bin$PATH_SEPARATOR$PATH]dnl +AC_PATH_PROG(NVCC, nvcc, [], [$CUDA_PATH_SEP$PATH]dnl [$PATH_SEPARATOR/opt/cuda/bin$PATH_SEPARATOR/usr/local/cuda/bin]) if test -n "$NVCC" -a $cross_compile = no -a $cuda_req != no