From 0ac47694d97add689e739c7ff33ea310adfbae89 Mon Sep 17 00:00:00 2001 From: edoapra Date: Tue, 8 Oct 2024 16:15:29 -0700 Subject: [PATCH] handle gcc versions with brew --- travis/build_env.sh | 2 +- travis/nwchem.bashrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/travis/build_env.sh b/travis/build_env.sh index 409141d670..75ee2f7d96 100755 --- a/travis/build_env.sh +++ b/travis/build_env.sh @@ -66,7 +66,7 @@ fi echo gfortran is $(gfortran -v) echo gfortran-"$mygccver" is $(gfortran-"$mygccver" -v) fi - if [[ "$FC" != "gcc" ]] && [[ "$FC" == "gcc*" ]]; then + if [[ "$CC" != "gcc" ]] && [[ "$CC" == "gcc*" ]]; then #install non default gfortran, ie gcc-9 #get version mygccver=$(echo "$CC"|cut -d - -f 2) diff --git a/travis/nwchem.bashrc b/travis/nwchem.bashrc index 995dad138e..6f0683cea7 100644 --- a/travis/nwchem.bashrc +++ b/travis/nwchem.bashrc @@ -76,7 +76,7 @@ if [[ "$FC" == "ifort" ]] || [[ "$FC" == "ifx" ]] ; then echo gfortran is $(gfortran -v) echo gfortran-"$mygccver" is $(gfortran-"$mygccver" -v) fi - if [[ "$FC" != "gcc" ]] && [[ "$FC" == "gcc*" ]]; then + if [[ "$CC" != "gcc" ]] && [[ "$CC" == "gcc*" ]]; then mygccver=$(echo "$CC"|cut -d - -f 2) HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew reinstall gcc@"$mygccver" || true export PATH=$HOMEBREW_CELLAR/../opt/gcc@"$mygccver"/bin:$PATH