1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-09-20 01:05:38 +01:00

Ugly... nvcc needs -x cu to compile .cc as cuda.

Since CXXFLAGS is Also passed to linker, and -x cu breaks link phase must replace
CXX and CXXLD with nvcc -x cu and nvcc -link respectively.
This commit is contained in:
paboyle 2018-01-24 13:18:19 +00:00
parent 4e1135b214
commit ff7b587fad

View File

@ -32,7 +32,6 @@ AC_DEFINE_UNQUOTED([GXX_VERSION],["$GXX_VERSION"],
[version of g++ that will compile the code])
############### Checks for typedefs, structures, and compiler characteristics
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
@ -222,6 +221,17 @@ AC_ARG_ENABLE([gen-simd-width],
[ac_gen_simd_width=$enable_gen_simd_width],
[ac_gen_simd_width=32])
##################### Compiler dependent choices
case ${CXX} in
nvcc)
CXX="nvcc -x cu"
CXXLD="nvcc -link"
;;
*)
CXXLD=${CXX}
;;
esac
case ${ax_cv_cxx_compiler_vendor} in
clang|gnu)
case ${ac_SIMD} in
@ -473,6 +483,7 @@ GRID_BRANCH=`git rev-parse --abbrev-ref HEAD`
AM_CXXFLAGS="-I${abs_srcdir}/include $AM_CXXFLAGS"
AM_CFLAGS="-I${abs_srcdir}/include $AM_CFLAGS"
AM_LDFLAGS="-L${cwd}/lib $AM_LDFLAGS"
AC_SUBST([CXXLD])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_CXXFLAGS])
AC_SUBST([AM_LDFLAGS])