Skip to content

Commit

Permalink
configure: do not add CUDA_LIB immediately to LIBS
Browse files Browse the repository at this point in the history
see the commit 085b6e6 (today)

autoconf generally dislikes spaces inside paths, which is true for CUDA
in MSW (path to CUDA libs is something like `-L"/c/Program Files/NVIDIA
GPU Computing Toolkit/CUDA/v11.8/lib"`), so do not use it for tests but
add it just when linking.
  • Loading branch information
MartinPulec committed Jul 29, 2024
1 parent 61bbc65 commit 9982928
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CXXFLAGS = @CXXFLAGS@ $(COMMON_FLAGS) -D_GNU_SOURCE
MKDIR_P = $(COND_SILENCE)mkdir -p
CUDA_FLAGS = @CUDA_FLAGS@ @CUDA_COMPUTE_ARGS@ @DEFS@ -g
LDFLAGS = @LDFLAGS@
LIBS += @LIBS@ @MATHLIBS@ -lm -pthread
LIBS += @LIBS@ @CUDA_LIB@ @MATHLIBS@ -lm -pthread
INC = -Isrc -I$(srcdir)/src -I$(srcdir)/test \
@INC@
CUDA_INC = @CUDA_INC@ -Isrc -I$(srcdir)/src
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,6 @@ fi
if test "$FOUND_CUDA" = yes; then
AC_DEFINE([HAVE_CUDA], [1], [CUDA is present on the system])
OBJS="$OBJS src/cuda_wrapper.o"
LIBS="$LIBS $CUDA_LIB"
if test $system != Windows; then
POST_COMPILE_MSG="$POST_COMPILE_MSG\n***\nYou have compiled in sort of CUDA code.\nIn order to use use it compression and \
decompression, you will need to have CUDA libraries visible to your OS.\n\
Expand All @@ -608,6 +607,7 @@ fi
ENSURE_FEATURE_PRESENT([$cuda_req], [$FOUND_CUDA], [CUDA not found])

AC_SUBST(CUDA_INC)
AC_SUBST(CUDA_LIB)
AC_SUBST(CUDA_COMPILER)
AC_SUBST(CUDA_COMPUTE_ARGS)

Expand Down

0 comments on commit 9982928

Please sign in to comment.