From 9c89bda8c704715d6ab65ba54a327b3d4ef1766e Mon Sep 17 00:00:00 2001 From: Simone Rizzo Date: Thu, 16 Jan 2025 00:30:41 +0100 Subject: [PATCH] Accept extensions other than .cpp in nvq++ Signed-off-by: Simone Rizzo --- tools/nvqpp/nvq++.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/nvqpp/nvq++.in b/tools/nvqpp/nvq++.in index ae0aabdd3a..36e2a69506 100644 --- a/tools/nvqpp/nvq++.in +++ b/tools/nvqpp/nvq++.in @@ -587,7 +587,7 @@ while [ $# -ne 0 ]; do *.o | *.so | *.bundle) OBJS="${OBJS} $1" ;; - *.cpp | *.cc) + *.cpp | *.cc | *.cxx | *.c++) SRCS="${SRCS} $1" ;; *.a | *.dylib) @@ -746,7 +746,8 @@ if ${SHOW_VERSION} && [ -z "$SRCS" ] && [ -z "$OBJS" ]; then fi for i in ${SRCS}; do - file=$(basename -s .cc -s .cpp $i) + file_with_suffix=$(basename $i) + file=${file_with_suffix%%.*} # If LIBRARY_MODE explicitly requested, then # simply compile with the classical compiler.