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