File tree Expand file tree Collapse file tree 6 files changed +43
-18
lines changed
Expand file tree Collapse file tree 6 files changed +43
-18
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ if [ -d "$FIREMODELS/hypre" ]; then
3232 cd $FIREMODELS /hypre
3333 if [[ " $( git tag -l " v2.32.0" ) " == " v2.32.0" ]]; then
3434 echo " Checking out v2.32.0"
35- $( git checkout v2.32.0)
35+ git checkout v2.32.0
3636 fi
3737 cd $FIREMODELS /hypre/src/cmbuild
3838 export HYPRE_VERSION=$( git describe)
@@ -42,7 +42,7 @@ if [ -d "$FIREMODELS/hypre" ]; then
4242 ./$CONFMAKE
4343 # get back from detached HEAD state
4444 cd $FIREMODELS /hypre
45- $( git checkout master)
45+ git checkout master
4646 cd $dir
4747 export HYPRE_HOME=$FIREMODELS /libs/hypre/$HYPRE_VERSION
4848 echo " Hypre library:" $FIREMODELS /libs/hypre/$HYPRE_VERSION
Original file line number Diff line number Diff line change @@ -17,10 +17,13 @@ cmake_args=(
1717
1818# Add OSX deployment target if building for macOS
1919if [[ " $FDS_BUILD_TARGET " == * " osx" * ]]; then
20- cmake_args+=(-DCMAKE_OSX_DEPLOYMENT_TARGET=" 10.0" )
20+ if [ " $( uname -m) " == " x86_64" ]; then
21+ cmake_args+=(-DCMAKE_OSX_DEPLOYMENT_TARGET=" 10.6" )
22+ else
23+ cmake_args+=(-DCMAKE_OSX_DEPLOYMENT_TARGET=" 13.0" )
24+ fi
2125fi
2226
23-
2427# Run cmake with the arguments
2528cmake ../ " ${cmake_args[@]} "
2629
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ if [ -d "$FIREMODELS/sundials" ]; then
3333 cd $FIREMODELS /sundials
3434 if [[ " $( git tag -l " v6.7.0" ) " == " v6.7.0" ]]; then
3535 echo " Checking out v6.7.0"
36- $( git checkout v6.7.0)
36+ git checkout v6.7.0
3737 fi
3838 mkdir $FIREMODELS /sundials/BUILDDIR
3939 cd $FIREMODELS /sundials/BUILDDIR
@@ -46,7 +46,7 @@ if [ -d "$FIREMODELS/sundials" ]; then
4646 ./$CONFMAKE
4747 # get back from detached HEAD state
4848 cd $FIREMODELS /sundials
49- $( git checkout main)
49+ git checkout main
5050 cd $dir
5151 export SUNDIALS_HOME=$FIREMODELS /libs/sundials/$SUNDIALS_VERSION
5252 echo " Sundials library:" $FIREMODELS /libs/sundials/$SUNDIALS_VERSION
Original file line number Diff line number Diff line change @@ -16,7 +16,11 @@ cmake_args=(
1616
1717# Add OSX deployment target if building for macOS
1818if [[ " $FDS_BUILD_TARGET " == * " osx" * ]]; then
19- cmake_args+=(-DCMAKE_OSX_DEPLOYMENT_TARGET=" 10.0" )
19+ if [ " $( uname -m) " == " x86_64" ]; then
20+ cmake_args+=(-DCMAKE_OSX_DEPLOYMENT_TARGET=" 10.6" )
21+ else
22+ cmake_args+=(-DCMAKE_OSX_DEPLOYMENT_TARGET=" 13.0" )
23+ fi
2024fi
2125
2226# Run cmake with the arguments
Original file line number Diff line number Diff line change 11# PARSE OPTIONS FOR CLEAN LIBRARY BUILDS ####################################
22
3+ # Set FIREMODELS environment variable if it is not already exists.
4+ if [ -z " ${FIREMODELS} " ]; then
5+ export FIREMODELS=" $( readlink -f " $( pwd) /../../../" ) "
6+ fi
7+
8+ echo " FIREMODELS=$FIREMODELS "
9+
310clean_hypre=false
411clean_sundials=false
512ARG=" "
4047# FINISHED WITH CLEANING OPTIONS ###########################################
4148
4249# Decide compilers
43- echo " Before setting tpt comp"
4450source ../Scripts/set_thirdparty_compilers.sh
4551
4652# build hypre
Original file line number Diff line number Diff line change 11echo " FDS build target = $FDS_BUILD_TARGET "
22
33# For following variables 1- indicate availble through
4- # environment variable CCCOMP, CXXCOMP , and FCCOMP
4+ # environment variable FIREMODELS_CC, FIREMODELS_CXX , and FIREMODELS_FC
55set_CC=0
66set_CXX=0
77set_FC=0
88
9- if [ -n " $CCCOMP " ]; then
10- CC=$CCCOMP
11- set_CC=1
9+ if [ -n " $FIREMODELS_CC " ]; then
10+ CC=$FIREMODELS_CC
11+ if command -v $CC & > /dev/null; then
12+ set_CC=1
13+ else
14+ echo " The compiler specified by the FIREMODELS_CC environment variable ($CC ) is not available on this system. Searching for an alternative compiler."
15+ fi
1216fi
1317
14- if [ -n " $CXXCOMP " ]; then
15- CXX=$CXXCOMP
16- set_CXX=1
18+ if [ -n " $FIREMODELS_CXX " ]; then
19+ CXX=$FIREMODELS_CXX
20+ if command -v $CXX & > /dev/null; then
21+ set_CXX=1
22+ else
23+ echo " The compiler specified by the FIREMODELS_CXX environment variable ($CXX ) is not available on this system. Searching for an alternative compiler."
24+ fi
1725fi
1826
19- if [ -n " $FCCOMP " ]; then
20- FC=$FCCOMP
21- set_FC=1
27+ if [ -n " $FIREMODELS_FC " ]; then
28+ FC=$FIREMODELS_FC
29+ if command -v $FC & > /dev/null; then
30+ set_FC=1
31+ else
32+ echo " The compiler specified by the FIREMODELS_FC environment variable ($FC ) is not available on this system. Searching for an alternative compiler."
33+ fi
2234fi
2335
2436
You can’t perform that action at this time.
0 commit comments