Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Added the setting of environment variables to the set_compiler script
Browse files Browse the repository at this point in the history
  • Loading branch information
MintoDA1 authored and MintoDA1 committed Sep 25, 2023
1 parent 3a5cddb commit 1b1186c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion buildscripts/set_compilers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
;;
Expand All @@ -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}"
Expand Down
File renamed without changes.

0 comments on commit 1b1186c

Please sign in to comment.