-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathexample.opticks_config
55 lines (42 loc) · 2.18 KB
/
example.opticks_config
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
# ~/.opticks_config
# ~/.bash_profile > ~/.bashrc > ~/.opticks_config
# https://simoncblyth.bitbucket.io/opticks/docs/install.html#bash-shell-setup-with-opticks-config
export OPTICKS_HOME=$HOME/opticks
opticks-(){ [ -r $OPTICKS_HOME/opticks.bash ] && . $OPTICKS_HOME/opticks.bash && opticks-env $* ; }
opticks-
o(){ opticks- ; cd $(opticks-home) ; git status ; }
oo(){ opticks- ; cd $(opticks-home) ; om- ; om-- ; }
t(){ typeset -f $* ; }
oed(){ vi $BASH_SOURCE && ofu ; } # edit this file
ofu(){ source $BASH_SOURCE ; } # source this file
# PATH envvars control the externals that opticks/CMake or pkg-config will find
unset CMAKE_PREFIX_PATH
unset PKG_CONFIG_PATH
# mandatory envvars in buildenv
export OPTICKS_PREFIX=/usr/local/opticks
export OPTICKS_CUDA_PREFIX=/usr/local/cuda
export OPTICKS_OPTIX_PREFIX=/usr/local/optix
export OPTICKS_COMPUTE_CAPABILITY=70
## hookup paths to access "foreign" externals, not yet existing dirs just give warnings
opticks-prepend-prefix /usr/local/opticks_externals/clhep_2440
opticks-prepend-prefix /usr/local/opticks_externals/xercesc
opticks-prepend-prefix /usr/local/opticks_externals/g4_1042
opticks-prepend-prefix /usr/local/opticks_externals/boost
## NB these directory paths are examples, you need to change them to suit your foreign
## installs. The paths do however correspond to the defaults used by the
## opticks-foreign-install bash function with the directories defined underneath
## ${OPTICKS_PREFIX}_externals.
##
## NB changing any directory paths demands an opticks-full rebuild
## This is enforced by $OPTICKS_PREFIX/bin/opticks-setup.sh which
## is generated by opticks-full with opticks-setup-generate.
opticks-check-prefix
[ $? -ne 0 ] && echo ABORT && sleep 1000000000
# opticks-setup sets the path envvars for using Opticks executables.
# To avoid output on starting every terminal session the output is redirected to /dev/null
# Remove this redirection to see any error messages.
opticks-setup > /dev/null
[ $? -ne 0 ] && echo ERROR running opticks-setup && sleep 1000000000
# PYTHONPATH is needed to allow python scripts to "import opticks"
# without this some of the opticks-t tests will fail
export PYTHONPATH=$(dirname $OPTICKS_HOME)