Skip to content

Commit

Permalink
Modified MAC_install-exodus and added script to set environmental var…
Browse files Browse the repository at this point in the history
…iables

Modified MAC_install-exodus to include Mac compilers and added script to set environmental variables if needed.
  • Loading branch information
ehinrichs committed Jan 18, 2024
1 parent 7244cbb commit 152170a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
22 changes: 22 additions & 0 deletions MAC_EnvironmentalVar.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# Set Up Mac Specific Environmental Variables
#
#=====================================================

fortran_var=$(find /opt/local/bin/gfortran-mp-*)
cc_var=$(find /opt/local/bin/gcc-mp-*)
cpp_var=$(find /opt/local/bin/g++-mp-*)

echo "Environmental Variables set"

FC="$fortran_var"
find ${FC}
export FC="$fortran_var"

CC="$cc_var"
find ${CC}
export CC="$cc_var"

CXX="$cpp_var"
find ${CXX}
export CXX="$cpp_var"
16 changes: 16 additions & 0 deletions MAC_install-exodus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ SEACAS_INSTALL_DIR=${SEACAS_INSTALL_DIR:-"$(pwd)/TPLs/"}
# EXO_COMMIT_HASH=${EXO_COMMIT_HASH:-v2021-10-11}
# =================================================

# ==== MAC SPECIFIC COMPILER EXPORTS ===============
export PATH="/opt/local/libexec/gnubin:/opt/local/bin:/opt/local/sbin:$PATH"
export COMPILER=MacPorts
fortran_var=$(find /opt/local/bin/gfortran-mp-*)
cc_var=$(find /opt/local/bin/gcc-mp-*)
cpp_var=$(find /opt/local/bin/g++-mp-*)

FC="$fortran_var"
export FC="$fortran_var"

CC="$cc_var"
export CC="$cc_var"

CXX="$cpp_var"
export CXX="$cpp_var"

# ==== GET SOURCE ================================
mkdir -p ${SEACAS_INSTALL_DIR}
cd ${SEACAS_INSTALL_DIR}
Expand Down

0 comments on commit 152170a

Please sign in to comment.