forked from brettviren/wire-cell-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathwct-configure-for-view.sh
executable file
·67 lines (47 loc) · 1.45 KB
/
wct-configure-for-view.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
usage () {
cat <<EOF
Configure WCT source for a "view" providing external dependencies.
This script should be kept in the "waftools" git submodule of WCT.
But, it may be run from anywhwere:
./waftools/wct-configure-for-view.sh <path-to-view> [<path-to-install>]
- <path-to-view> :: the file system path to the top of the view directory.
- <path-to-install> :: optional location for installing WCT. It
defaults to installing into the view.
Note: A likely way to create a "view" directory is with Spack:
spack view add -i /opt/spack/views/wct-dev wirecell-toolkit
EOF
exit 1
}
view="$1"
if [ -z "$view" ] ; then
usage
fi
inst="${2:-$view}"
echo "Will 'wcb install' to $inst"
topdir=$(dirname $(dirname $(readlink -f $BASH_SOURCE)))
"$topdir/wcb" \
configure \
--with-jsoncpp="$view" \
--with-jsonnet="$view" \
--with-tbb="$view" \
--with-eigen-include="$view/include/eigen3" \
--with-root="$view" \
--with-fftw="$view" \
--boost-includes="$view/include" \
--boost-libs="$view/lib" \
--boost-mt \
--with-tbb=false \
--prefix="$inst"
#--with-fftw-include="$view/include" \
#--with-fftw-lib="$view/lib" \
cat <<EOF
# For runtime setup, copy-paste:
PATH=$inst/bin:$view/bin:\$PATH
export LD_LIBRARY_PATH=$inst/lib:$view/lib:\$LD_LIBRARY_PATH
# or if preferred:
source $view/bin/thisroot.sh
source $view/bin/geant4.sh
# and this may be needed
export ROOT_INCLUDE_PATH=$view/include
EOF