Bugfix (Mac OS): Added Clang as a compiler option to bashrc

This commit is contained in:
Vanja Skuric 2017-04-13 13:04:54 +02:00
parent 4fad65ce7c
commit 2c7566802e

View file

@ -160,10 +160,11 @@ done
: ${WM_OSTYPE:=POSIX}; export WM_OSTYPE
# Compiler: set to Gcc or Icc (for Intel's icc)
# Compiler: set to Gcc, Icc (for Intel's icc) or Clang
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: ${WM_COMPILER:=Gcc}; export WM_COMPILER
#: ${WM_COMPILER:=Icc}; export WM_COMPILER
#: ${WM_COMPILER:=Clang}; export WM_COMPILER
export WM_COMPILER_ARCH=
export WM_COMPILER_LIB_ARCH=
@ -366,7 +367,7 @@ Darwin)
echo "Using Macports binaries"
fi
export WM_USE_MACPORT=1
export WM_USE_MACPORT=0
export WM_BASE_COMPILER=`echo $WM_COMPILER | tr -d "[:digit:]"`
export WM_MACPORT_MPI_VERSION=`echo $WM_COMPILER | tr "[:upper:]" "[:lower:]"`
export WM_MACPORT_VERSION=`echo $WM_MACPORT_MPI_VERSION | tr -d "[:alpha:]" | sed -e "s/\(.\)\(.\)/\1\.\2/"`
@ -434,9 +435,15 @@ Darwin)
export WM_CXX="g++-mp-$WM_MACPORT_VERSION"
export WM_FC="gfortran-mp-$WM_MACPORT_VERSION"
elif [ "$WM_BASE_COMPILER" == "Clang" ]
then
if [ "$WM_USE_MACPORT" == "1" ]
then
export WM_CC="clang-mp-$WM_MACPORT_VERSION"
export WM_CXX="clang++-mp-$WM_MACPORT_VERSION"
else
export WM_CC="clang"
export WM_CXX="clang++"
fi
# Seems like there is no Fortran-frontend for LLVM at thistime
elif [ "$WM_BASE_COMPILER" == "Dragonegg" ]
then