From 1b1186c9d9553d5d3579d63fe6a07e32c67904d9 Mon Sep 17 00:00:00 2001 From: MintoDA1 <51412913+MintoDA1@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:07:23 -0400 Subject: [PATCH] Added the setting of environment variables to the set_compiler script --- buildscripts/set_compilers.sh | 5 ++++- .../{set_environment.sh => set_environment_macos.sh} | 0 2 files changed, 4 insertions(+), 1 deletion(-) rename buildscripts/{set_environment.sh => set_environment_macos.sh} (100%) diff --git a/buildscripts/set_compilers.sh b/buildscripts/set_compilers.sh index 85495b40d..70dd9f71e 100755 --- a/buildscripts/set_compilers.sh +++ b/buildscripts/set_compilers.sh @@ -13,6 +13,8 @@ # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # You should have received a copy of the GNU General Public License along with Swiftest. # If not, see: https://www.gnu.org/licenses. +SCRIPT_DIR=$(realpath $(dirname $0)) +ROOT_DIR=$(realpath ${SCRIPT_DIR}/..) case "$OS" in Linux|MacOSX|Intel) ;; @@ -25,15 +27,16 @@ case "$OS" in esac set -a -# Only replace compiler definitions if they are not already set case $OS in Linux) + . ${SCRIPT_DIR}/set_environment_linux.sh FC=$(command -v gfortran) CC=$(command -v gcc) CXX=$(command -v g++) CPP=$(command -v cpp) ;; MacOSX) + . ${SCRIPT_DIR}/set_environment_macos.sh FC=${HOMEBREW_PREFIX}/bin/gfortran-12 CFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} -Wno-deprecated-non-prototype -arch ${ARCH}" FCFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} -arch ${ARCH}" diff --git a/buildscripts/set_environment.sh b/buildscripts/set_environment_macos.sh similarity index 100% rename from buildscripts/set_environment.sh rename to buildscripts/set_environment_macos.sh