forked from brettviren/wire-cell-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathwct-configure-for-ups.sh
executable file
·69 lines (52 loc) · 1.75 KB
/
wct-configure-for-ups.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
64
65
66
67
68
#!/bin/bash
usage () {
cat <<EOF
Configure WCT source for building against a UPS products.
wct-configure-for-ups.sh install_directory
This assumes the UPS environment for the dependent products is
already "setup".
If install_directory is outside of UPS control then you can stop
reading now.
If the install_directory is the string "ups" then the source will be
configured to install into $WIRECELL_FQ_DIR.
That may point to a pre-existing "wirecell" UPS product. If it does,
reusing it will install files on top of any pre-exising ones without
check so be careful.
To make a fresh "wirecell" UPS produce area one can "declare" it like:
$ ups declare wirecell <version> \
-f \$(ups flavor) \
-q e14:prof \
-r wirecell/<version> \
-z /path/to/install/products \
-U ups \
-m wirecell.table
You'll have to provide the wirecell.table yourself, likely by copying
it from an existing "wirecell" UPS product.
Then, the calling environment can be munged like:
$ setup wirecell <version> -q e14:prof
UPS is such a great and simple system! /s
EOF
exit
}
install_dir="$1" ; shift
if [ "$install_dir" = "ups" ] ; then
install_dir="$WIRECELL_FQ_DIR"
fi
# force to pick up GCC from PATH
wct_cc=${CC:-gcc}
wct_cxx=${CXX:-g++}
wct_fort=${FORT:-gfortran}
env CC=$wct_cc CXX=$wct_cxx FC=wct_fort \
./wcb configure \
--with-tbb=no \
--with-jsoncpp="$JSONCPP_FQ_DIR" \
--with-jsonnet="$JSONNET_FQ_DIR" \
--with-eigen-include="$EIGEN_DIR/include/eigen3" \
--with-root="$ROOT_FQ_DIR" \
--with-fftw="$FFTW_FQ_DIR" \
--with-fftw-include="$FFTW_INC" \
--with-fftw-lib="$FFTW_LIBRARY" \
--boost-includes="$BOOST_INC" \
--boost-libs="$BOOST_LIB" \
--boost-mt \
--prefix="$install_dir"