Skip to content

Commit

Permalink
Several changes to build script
Browse files Browse the repository at this point in the history
1. Update the _spack_tpls directory if it exists.  This is probably what
        most users want.

2. Try to add compilers ... which may be missing from the user's spack
        configuration
  • Loading branch information
whart222 committed Jun 19, 2024
1 parent db064fc commit da3e4b8
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,21 @@ echo "SPACK_HOME=${SPACK_HOME}"
if [[ "${spack_reinstall}" -eq 1 ]]; then
\rm -Rf ${SPACK_HOME}
fi
if [[ "$spack_dev" -eq 0 ]]; then
\rm -Rf _spack_tpls
git clone https://github.com/or-fusion/or-fusion-spack-repo.git _spack_tpls
else
git clone [email protected]:or-fusion/or-fusion-spack-repo.git _spack_tpls
if test -d _spack_tpls; then
cd _spack_tpls
git checkout dev
git pull
cd ..
else
if [[ "$spack_dev" -eq 0 ]]; then
\rm -Rf _spack_tpls
git clone https://github.com/or-fusion/or-fusion-spack-repo.git _spack_tpls
else
git clone [email protected]:or-fusion/or-fusion-spack-repo.git _spack_tpls
cd _spack_tpls
git checkout dev
git pull
cd ..
fi
fi
\rm -Rf _build
#
Expand Down Expand Up @@ -112,10 +118,13 @@ else
echo ""
git clone https://github.com/spack/spack.git ${SPACK_HOME}
. ${SPACK_HOME}/share/spack/setup-env.sh
echo "Adding _spack_tpls"
spack repo remove _spack_tpls/repo | true
spack repo add _spack_tpls/repo
spack repo list
spack env create $spack_env
spack env activate $spack_env
spack compiler find
spack add asl fmt rapidjson catch2 highs $with_valgrind
spack install
spack env deactivate
Expand Down

0 comments on commit da3e4b8

Please sign in to comment.