Skip to content

Commit

Permalink
adding macos sonoma
Browse files Browse the repository at this point in the history
  • Loading branch information
casper-boon committed Jan 31, 2024
1 parent 71fa73e commit 1d8a754
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ jobs:
git commit -m "Update MacOS binaries"
git push
macOS-M:
macOS-S:
# The type of runner that the job will run on
runs-on: macos-latest
runs-on: macos-14
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

Expand Down
55 changes: 35 additions & 20 deletions glm-source/build_glm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ case `uname` in
;;
esac

export CC=gcc
if [ "$OSTYPE" = "FreeBSD" ] ; then
export FC=flang
export CC=clang
export MAKE=gmake
else
export FC=gfortran
export CC=gcc
export MAKE=make
fi

ARGS=""
Expand All @@ -28,6 +30,9 @@ while [ $# -gt 0 ] ; do
--debug)
export DEBUG=true
;;
--mdebug)
export MDEBUG=true
;;
--fence)
export FENCE=true
;;
Expand All @@ -43,13 +48,16 @@ while [ $# -gt 0 ] ; do
--flang)
export FC=flang
;;
--no-gui)
export WITH_PLOTS=false
export WITH_XPLOTS=false
;;
*)
;;
esac
shift
done

export MAKE=make
if [ "$OSTYPE" = "Darwin" ] ; then
if [ "$HOMEBREW" = "" ] ; then
brew -v > /dev/null 2>&1
Expand All @@ -64,10 +72,6 @@ if [ "$OSTYPE" = "Darwin" ] ; then
export HOMEBREW=true
fi
fi
else
if [ "$OSTYPE" = "FreeBSD" ] ; then
export MAKE=gmake
fi
fi

# see if FC is defined, if not look for gfortran at least v8
Expand All @@ -91,25 +95,30 @@ if [ "$FC" = "" ] ; then
fi

if [ "$FC" = "ifort" ] ; then
start_sh="$(ps -p "$$" -o command= | awk '{print $1}')"
# ifort config scripts wont work with /bin/sh
# so we restart using bash
if [ "$start_sh" = "/bin/sh" ] ; then
echo Restart using bash because ifort cant use /bin/sh
/bin/bash $0 $ARGS
exit $?
if [ "$OSTYPE" = "Linux" ] ; then
start_sh="$(ps -p "$$" -o command= | awk '{print $1}')"
# ifort config scripts wont work with /bin/sh
# so we restart using bash
if [ "$start_sh" = "/bin/sh" ] ; then
echo Restart using bash because ifort cant use /bin/sh
/bin/bash $0 $ARGS
exit $?
fi
fi
if [ -d /opt/intel/oneapi ] ; then

if [ -x /opt/intel/setvars.sh ] ; then
. /opt/intel/setvars.sh
elif [ -d /opt/intel/oneapi ] ; then
. /opt/intel/oneapi/setvars.sh
else
if [ -d /opt/intel/bin ] ; then
. /opt/intel/bin/compilervars.sh intel64
fi
which ifort > /dev/null 2>&1
if [ $? != 0 ] ; then
echo ifort compiler requested, but not found
exit 1
fi
fi
which ifort > /dev/null 2>&1
if [ $? != 0 ] ; then
echo ifort compiler requested, but not found
exit 1
fi
fi

Expand Down Expand Up @@ -195,6 +204,12 @@ if [ "${AED}" = "true" ] ; then
${MAKE} || exit 1
DAEDRIPDIR=`pwd`
fi
if [ -d ${CURDIR}/../libaed-light ] ; then
echo build libaed-light
cd ${CURDIR}/../libaed-light
${MAKE} || exit 1
DAEDLGTDIR=`pwd`
fi
if [ -d ${CURDIR}/../libaed-dev ] ; then
echo build libaed-dev
cd ${CURDIR}/../libaed-dev
Expand Down Expand Up @@ -236,7 +251,7 @@ if [ "${DAEDDEVDIR}" != "" ] ; then
if [ -d ${DAEDDEVDIR} ] ; then
echo now build plus version
/bin/rm obj/aed_external.o
${MAKE} glm+ AEDBENDIR=$DAEDBENDIR AEDDMODIR=$DAEDDMODIR AEDRIPDIR=$DAEDRIPDIR AEDDEVDIR=$DAEDDEVDIR || exit 1
${MAKE} glm+ AEDBENDIR=$DAEDBENDIR AEDDMODIR=$DAEDDMODIR AEDRIPDIR=$DAEDRIPDIR AEDLGTDIR=$DAEDLGTDIR AEDDEVDIR=$DAEDDEVDIR || exit 1
fi
fi

Expand Down

0 comments on commit 1d8a754

Please sign in to comment.