From e64a264100d64e39378f9c4884bfb95540873ba9 Mon Sep 17 00:00:00 2001 From: edoapra Date: Thu, 16 Mar 2023 13:20:05 -0700 Subject: [PATCH] update --- src/config/strip_compiler.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/config/strip_compiler.sh b/src/config/strip_compiler.sh index 0c4d68e437..6378bb601e 100755 --- a/src/config/strip_compiler.sh +++ b/src/config/strip_compiler.sh @@ -1,8 +1,11 @@ #/usr/bin/env bash # ifeq ($(shell basename -- $(FC)| cut -d \- -f 1),nvfortran) -if [[ -z $_FC ]]; then - echo $(basename -- $1 | cut -d \- -f 1 | sed 's/[0-9]*//g') -else +#gcc or gfortran? +if [[ "$1" == *fortran* ]] && [[ ! -z $_FC ]]; then echo $_FC +elif [[ "$1" == *cc* ]] && [[ ! -z $_CC ]]; then + echo $_CC +else + echo $(basename -- $1 | cut -d \- -f 1 | sed 's/[0-9]*//g') fi