File indexing completed on 2025-01-31 09:21:47
0001
0002 msg="=== $BASH_SOURCE :"
0003
0004 info(){ cat << EOI
0005 $msg checking the environment
0006 OPTICKS_HOME : $OPTICKS_HOME
0007 CMAKE_PREFIX_PATH :
0008 $(echo $CMAKE_PREFIX_PATH | tr ":" "\n")
0009 The CMAKE_PREFIX_PATH is expected to contain about seven prefix directories including::
0010 OPTICKS_PREFIX : $OPTICKS_PREFIX
0011 OPTICKS_PREFIX/externals : $OPTICKS_PREFIX/externals
0012 Note that environment setup must be done in login scripts : .bashrc .bash_profile .opticks_config etc..
0013 Doing environment setup just in the current session will not work as scripts often invoke login scripts.
0014 EOI
0015 }
0016
0017 rc=0
0018 if [ -z "$OPTICKS_HOME" -o -z "$OPTICKS_PREFIX" -o -z "$CMAKE_PREFIX_PATH" ]; then
0019 echo $msg missing required envvars : your need to source .opticks_config
0020 rc=1
0021 fi
0022 if [ "$CMAKE_PREFIX_PATH" == ${CMAKE_PREFIX_PATH/$OPTICKS_PREFIX:/} ]; then
0023 echo $msg CMAKE_PREFIX_PATH does not contain the expected prefix : $OPTICKS_PREFIX : you need to invoke opticks-setup from .opticks_config
0024 rc=2
0025 fi
0026 if [ "$CMAKE_PREFIX_PATH" == ${CMAKE_PREFIX_PATH/$OPTICKS_PREFIX\/externals\:/} ]; then
0027 echo $msg CMAKE_PREFIX_PATH does not contain the expected prefix : $OPTICKS_PREFIX/externals : you need to invoke opticks-setup from .opticks_config
0028 rc=3
0029 fi
0030
0031 if [ $rc -ne 0 ]; then
0032 info
0033 echo $msg environment check FAILED : rc $rc
0034 else
0035 [ -n "$VERBOSE" ] && info
0036 echo $msg environment check PASSED : rc $rc
0037 fi
0038 exit $rc