[cig-commits] [commit] master: update in CIT_CUDA_CONFIG uses CUDA_FLAGS rather than default C flags for nvcc compilation tests (b5689ae)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri Sep 19 07:39:18 PDT 2014


Repository : https://github.com/geodynamics/autoconf_cig

On branch  : master
Link       : https://github.com/geodynamics/autoconf_cig/compare/52924a0f61974de0830a47ca057d9762419718ea...ba14abf73197b78e13d1a155a8f84ceb1d7be3e4

>---------------------------------------------------------------

commit b5689aeec1425de8b68b679a2440845c6418b6dd
Author: daniel peter <peterda at ethz.ch>
Date:   Fri Sep 19 11:10:14 2014 +0200

    update in CIT_CUDA_CONFIG uses CUDA_FLAGS rather than default C flags for nvcc compilation tests


>---------------------------------------------------------------

b5689aeec1425de8b68b679a2440845c6418b6dd
 cit_cuda.m4 | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/cit_cuda.m4 b/cit_cuda.m4
index 31a4963..f4c202e 100644
--- a/cit_cuda.m4
+++ b/cit_cuda.m4
@@ -37,14 +37,16 @@ AC_DEFUN([CIT_CUDA_CONFIG], [
   LDFLAGS_save="$LDFLAGS"
   LIBS_save="$LIBS"
 
-  # Check for CUDA headers
-  AC_MSG_CHECKING([for cuda_runtime.h])
-
+  # uses nvcc compiler
+  CFLAGS="$CUDA_FLAGS"
   if test "x$CUDA_INC" != "x"; then
     CUDA_CPPFLAGS="-I$CUDA_INC"
-    CFLAGS="$CUDA_CPPFLAGS $CFLAGS"
+    CFLAGS="$CFLAGS $CUDA_CPPFLAGS"
   fi
+
+  # Check for CUDA headers
   # runs test with nvcc
+  AC_MSG_CHECKING([for cuda_runtime.h])
   ac_compile='$NVCC -c $CFLAGS conftest.$ac_ext >&5'
   AC_COMPILE_IFELSE([
     AC_LANG_PROGRAM([[
@@ -58,7 +60,6 @@ AC_DEFUN([CIT_CUDA_CONFIG], [
   ])
 
   # Check fo CUDA library
-
   if test "x$CUDA_LIB" != "x"; then
     CUDA_LDFLAGS="-L$CUDA_LIB"
     LDFLAGS="$CUDA_LDFLAGS $LDFLAGS"



More information about the CIG-COMMITS mailing list