Skip to content

Commit

Permalink
handle gcc versions with brew
Browse files Browse the repository at this point in the history
  • Loading branch information
edoapra committed Oct 8, 2024
1 parent 8beba17 commit 0ac4769
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion travis/build_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion travis/nwchem.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0ac4769

Please sign in to comment.