Skip to content

Commit

Permalink
Move static toast build to package options
Browse files Browse the repository at this point in the history
  • Loading branch information
tskisner committed Jul 16, 2021
1 parent 205bee3 commit 08e017d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion configs/cori-gcc-gpu.pkgs
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ pysm
#pympit
#
# Install TOAST.
#toast
toast:static=yes
2 changes: 1 addition & 1 deletion configs/cori-gcc.pkgs
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ pysm
pympit
#
# Install TOAST.
toast
toast:static=yes
12 changes: 10 additions & 2 deletions pkgs/toast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,25 @@ fftw=""
ssparse=""
blas=""
lapack=""
static=""

staticflag=""
mklflag=""
if [ "x@MKL@" != "x" ]; then
blas="@MKL@/lib/intel64/libmkl_rt.so"
lapack="@MKL@/lib/intel64/libmkl_rt.so"
else
mklflag="-DMKL_DISABLED:BOOL=ON"
staticflag="-DTOAST_STATIC_DEPS:BOOL=ON"
fi

for opt in $pkgopts; do
chkfftw=$(echo $opt | sed -e "s/fftw=\(.*\)/\1/")
if [ "x$chkfftw" != "x$opt" ]; then
fftw="${chkfftw}"
fi
chkstatic=$(echo $opt | sed -e "s/static=\(.*\)/\1/")
if [ "x$chkstatic" != "x$opt" ]; then
static="${chkstatic}"
fi
chksparse=$(echo $opt | sed -e "s/suitesparse=\(.*\)/\1/")
if [ "x$chksparse" != "x$opt" ]; then
ssparse="${chksparse}"
Expand All @@ -53,6 +56,11 @@ for opt in $pkgopts; do
fi
done

staticflag=""
if [ "x$static" != "x" ]; then
staticflag="-DTOAST_STATIC_DEPS:BOOL=ON"
fi

fftw_root=""
if [ "x$fftw" != "x" ]; then
fftw_root="-DFFTW_ROOT=$fftw"
Expand Down

0 comments on commit 08e017d

Please sign in to comment.