소스 검색

compilation system: cuda cppflags should also not be included automatically

Nathalie Furmento 14 년 전
부모
커밋
8e7dd0e906
8개의 변경된 파일11개의 추가작업 그리고 12개의 파일을 삭제
  1. 3 4
      configure.ac
  2. 1 1
      examples/Makefile.am
  3. 2 2
      examples/starpufft/Makefile.am
  4. 1 1
      examples/stencil/Makefile.am
  5. 1 1
      mpi/Makefile.am
  6. 1 1
      src/Makefile.am
  7. 1 1
      tests/Makefile.am
  8. 1 1
      tools/Makefile.am

+ 3 - 4
configure.ac

@@ -312,10 +312,8 @@ AC_DEFUN([STARPU_CHECK_CUDA_RUNTIME],
         fi
     fi
 
-    if test "$have_valid_cuda" = "no" ; then
-        CPPFLAGS="${SAVED_CPPFLAGS}"
-        LDFLAGS="${SAVED_LDFLAGS}"
-    fi
+    CPPFLAGS="${SAVED_CPPFLAGS}"
+    LDFLAGS="${SAVED_LDFLAGS}"
 
     if test "$have_valid_cuda" = "yes" -a "$__cuda_include_dir" != "no"; then
         STARPU_CUDA_CPPFLAGS="-I$__cuda_include_dir"
@@ -456,6 +454,7 @@ AC_CHECK_TYPE(cufftDoubleComplex,
 AM_CONDITIONAL(STARPU_HAVE_CUFFTDOUBLECOMPLEX, test x$have_cufftdoublecomplex = xyes)
 if test x$have_cufftdoublecomplex = xyes; then
 	AC_DEFINE(STARPU_HAVE_CUFFTDOUBLECOMPLEX, [1], [cufftDoubleComplex is available])
+        STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcufft"
 fi
 
 # The CURAND library is only available since CUDA 3.2

+ 1 - 1
examples/Makefile.am

@@ -14,7 +14,7 @@
 #
 # See the GNU Lesser General Public License in COPYING.LGPL for more details.
 
-AM_CFLAGS = $(HWLOC_CFLAGS) -Wall
+AM_CFLAGS = $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS)
 LIBS = $(top_builddir)/src/libstarpu.la $(HWLOC_LIBS) @LIBS@
 AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
 AM_LDFLAGS = $(STARPU_CUDA_LDFLAGS)

+ 2 - 2
examples/starpufft/Makefile.am

@@ -14,7 +14,7 @@
 #
 # See the GNU Lesser General Public License in COPYING.LGPL for more details.
 #
-AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_builddir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_builddir)/include $(STARPU_CUDA_CPPFLAGS)
 
 lib_LTLIBRARIES = libstarpufft.la
 
@@ -55,7 +55,7 @@ libstarpufft_la_SOURCES += cuda_kernels.cu
 am_libstarpufft_la_OBJECTS += cuda_kernels.o starpufft.lo
 endif
 
-libstarpufft_la_LIBADD += -lcufft
+libstarpufft_la_LIBADD += $(STARPU_CUDA_LDFLAGS)
 endif
 
 check_PROGRAMS = testf

+ 1 - 1
examples/stencil/Makefile.am

@@ -13,7 +13,7 @@
 #
 # See the GNU Lesser General Public License in COPYING.LGPL for more details.
 
-AM_CFLAGS = $(HWLOC_CFLAGS)
+AM_CFLAGS = $(HWLOC_CFLAGS) $(STARPU_CUDA_CPPFLAGS)
 LIBS = $(top_builddir)/src/libstarpu.la $(HWLOC_LIBS) @LIBS@
 AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
 AM_LDFLAGS = $(STARPU_CUDA_LDFLAGS)

+ 1 - 1
mpi/Makefile.am

@@ -58,7 +58,7 @@ NVCCFLAGS += -I$(top_srcdir)/include/ -I$(top_builddir)/include $(HWLOC_CFLAGS)
 	$(NVCC) $< -c -o $@ --compiler-options -fno-strict-aliasing  $(NVCCFLAGS) -I$(top_srcdir)/include/  -I$(top_builddir)/include/
 endif
 
-AM_CFLAGS = $(HWLOC_CFLAGS) -Wall
+AM_CFLAGS = $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS)
 LIBS = $(top_builddir)/src/libstarpu.la $(HWLOC_LIBS) @LIBS@
 AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/mpi/ -I$(top_srcdir)/src/  -I$(top_srcdir)/examples/ -I$(top_builddir)/src -I$(top_builddir)/include
 AM_LDFLAGS = $(STARPU_CUDA_LDFLAGS)

+ 1 - 1
src/Makefile.am

@@ -48,7 +48,7 @@ lib_LTLIBRARIES = libstarpu.la
 
 libstarpu_la_CPPFLAGS = -I$(top_srcdir)/include/
 
-libstarpu_la_CFLAGS = -W -Wall -Wextra $(HWLOC_CFLAGS)
+libstarpu_la_CFLAGS = -W -Wall -Wextra $(HWLOC_CFLAGS) $(STARPU_CUDA_CPPFLAGS)
 libstarpu_la_LIBADD = -lm $(HWLOC_LIBS)
 libstarpu_la_LDFLAGS = $(ldflags) -version-number 0:0:0 -no-undefined
 

+ 1 - 1
tests/Makefile.am

@@ -15,7 +15,7 @@
 #
 # See the GNU Lesser General Public License in COPYING.LGPL for more details.
 
-AM_CFLAGS = $(HWLOC_CFLAGS) -Wall
+AM_CFLAGS = $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS)
 LIBS = $(top_builddir)/src/libstarpu.la $(HWLOC_LIBS) @LIBS@
 AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/src/
 AM_LDFLAGS = $(STARPU_CUDA_LDFLAGS)

+ 1 - 1
tools/Makefile.am

@@ -16,7 +16,7 @@
 
 SUBDIRS =
 
-AM_CFLAGS = $(HWLOC_CFLAGS)
+AM_CFLAGS = $(HWLOC_CFLAGS) $(STARPU_CUDA_CPPFLAGS)
 LIBS = $(top_builddir)/src/libstarpu.la $(HWLOC_LIBS) @LIBS@
 AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/tools/ -I$(top_srcdir)/mpi/ -I$(top_builddir)/src -I$(top_srcdir)/src
 AM_LDFLAGS = $(STARPU_CUDA_LDFLAGS)