File tree 1 file changed +17
-9
lines changed
1 file changed +17
-9
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/bash -e
1
+ #! /bin/bash -ev
2
2
#
3
3
# This scripts builds Coek in the `_build` directory to support local
4
4
# development and debugging.
5
5
#
6
6
# This uses Spack to install third-party dependencies in the `_spack` directory.
7
7
#
8
- with_python=" OFF"
9
- python_exe=" "
10
- spack_reinstall=0
11
- spack_dev=0
12
8
clang=0
13
9
debug=" OFF"
10
+ python_exe=" "
11
+ spack_dev=0
12
+ spack_env=" coekenv"
14
13
spack_home=` pwd` /_spack
14
+ spack_reinstall=0
15
+ with_python=" OFF"
15
16
with_valgrind=" "
16
17
while [[ $# -gt 0 ]]; do
17
18
case $1 in
18
19
--help)
19
- echo " build.sh [--help] [--clang] [--debug] [--python] [--python-exe <file>] [--spack-dev] [--spack-home <dir>] [--spack-reinstall] [--valgrind]"
20
+ echo " build.sh [--help] [--clang] [--debug] [--python] [--python-exe <file>] [--spack-dev] [--spack-env <env>] [--spack- home <dir>] [--spack-reinstall] [--valgrind]"
20
21
exit
21
22
;;
22
23
--clang)
@@ -27,6 +28,11 @@ while [[ $# -gt 0 ]]; do
27
28
debug=" ON"
28
29
shift
29
30
;;
31
+ --spack-env)
32
+ spack_env=" $2 "
33
+ shift
34
+ shift
35
+ ;;
30
36
--python)
31
37
with_python=" ON"
32
38
shift
108
114
. ${SPACK_HOME} /share/spack/setup-env.sh
109
115
spack repo add _spack_tpls/repo
110
116
spack repo list
111
- spack env create coekenv
112
- spack env activate coekenv
117
+ spack env create $spack_env
118
+ spack env activate $spack_env
113
119
spack add asl cppad fmt rapidjson catch2 highs $with_valgrind
114
120
spack install
115
121
spack env deactivate
@@ -126,5 +132,7 @@ echo "Building Coek"
126
132
echo " "
127
133
mkdir _build
128
134
cd _build
129
- cmake -DCMAKE_PREFIX_PATH=${SPACK_HOME} /var/spack/environments/coekenv /.spack-env/view -Dwith_debug=${debug} -Dwith_python=${with_python} $python_exe -Dwith_gurobi=$with_gurobi -Dwith_highs=ON -Dwith_cppad=ON -Dwith_fmtlib=ON -Dwith_rapidjson=ON -Dwith_catch2=ON -Dwith_tests=ON -Dwith_asl=ON -Dwith_openmp=OFF ..
135
+ cmake -DCMAKE_PREFIX_PATH=${SPACK_HOME} /var/spack/environments/${spack_env} /.spack-env/view -Dwith_debug=${debug} -Dwith_python=${with_python} $python_exe -Dwith_gurobi=$with_gurobi -Dwith_highs=ON -Dwith_cppad=ON -Dwith_fmtlib=ON -Dwith_rapidjson=ON -Dwith_catch2=ON -Dwith_tests=ON -Dwith_asl=ON -Dwith_openmp=OFF ..
130
136
make -j20
137
+ make install
138
+
You can’t perform that action at this time.
0 commit comments