Browse Source

Move -lcurand to STARPU_CURAND_LDFLAGS

Samuel Thibault 14 years ago
parent
commit
495e37b641
2 changed files with 5 additions and 1 deletions
  1. 3 1
      configure.ac
  2. 2 0
      examples/opt/Makefile.am

+ 3 - 1
configure.ac

@@ -386,6 +386,7 @@ if test x$enable_cuda = xyes; then
 
         if test "$F77" = "gfortran" ; then
             STARPU_CUDA_FORTRAN_LDFLAGS="-lgfortran"
+            AC_SUBST(STARPU_CUDA_FORTRAN_LDFLAGS)
         fi
 
 	#in case this is a 64bit setup, we tell nvcc to use a -m64 flag
@@ -483,7 +484,8 @@ AC_MSG_CHECKING(whether CURAND is available)
 AC_MSG_RESULT($have_curand)
 if test x$have_curand = xyes; then
     AC_DEFINE(STARPU_HAVE_CURAND,[1], [CURAND is available])
-    STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcurand"
+    STARPU_CURAND_LDFLAGS="$STARPU_CURAND_LDFLAGS -lcurand"
+    AC_SUBST(STARPU_CURAND_LDFLAGS)
 fi
 
 # Peer transfers are only supported since CUDA 4.0

+ 2 - 0
examples/opt/Makefile.am

@@ -71,6 +71,8 @@ pi_pi_redux_SOURCES =				\
 if STARPU_USE_CUDA
 pi_pi_redux_SOURCES +=				\
 	pi/pi_redux_kernel.cu
+pi_pi_redux_LDADD =				\
+	$(STARPU_CURAND_LDFLAGS)
 endif