From dee96cbf8296b9f16dc378c78cdcb74302da77c5 Mon Sep 17 00:00:00 2001 From: Christopher Kelly Date: Wed, 29 Apr 2020 10:37:11 -0400 Subject: [PATCH] Added workaround in configure to still catch Cuda compiler when nvcc with extra arguments (eg -ccbin) is used as CXX --- configure.ac | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index fb69ca0e..46559507 100644 --- a/configure.ac +++ b/configure.ac @@ -274,12 +274,20 @@ case ${ac_gen_scalar} in esac ##################### Compiler dependent choices -case ${CXX} in + +#Strip any optional compiler arguments from nvcc call (eg -ccbin) for compiler comparison +CXXBASE=${CXX} +CXXTEST=${CXX} +if echo "${CXX}" | grep -q "nvcc"; then + CXXTEST="nvcc" +fi + +case ${CXXTEST} in nvcc) # CXX="nvcc -keep -v -x cu " # CXXLD="nvcc -v -link" - CXX="nvcc -x cu " - CXXLD="nvcc -link" + CXX="${CXXBASE} -x cu " + CXXLD="${CXXBASE} -link" # CXXFLAGS="$CXXFLAGS -Xcompiler -fno-strict-aliasing -Xcompiler -Wno-unusable-partial-specialization --expt-extended-lambda --expt-relaxed-constexpr" CXXFLAGS="$CXXFLAGS -Xcompiler -fno-strict-aliasing --expt-extended-lambda --expt-relaxed-constexpr" if test $ac_openmp = yes; then