This is for an R&D project and not (yet) intended for production.
- [X] Support edep-sim directly depending on eic-opticks
- [ ] Support 3rd party opticks plugin
git clone https://github.com/WireCell/edep-opticks-spack.git spack repo add edep-opticks-spack/edep_opticks/ spack install edepsim+opticks cxxstd=17
To use more cores and speed up the build:
spack install --jobs 32 edepsim+opticks cxxstd=17
How to set up a developer environment.
git clone --branch {version} --depth=2 https://github.com/spack/spack.git
source spack/share/spack/setup-env.sh
spack compiler find
spack bootstrap now
git clone https://github.com/WireCell/edep-opticks-spack.git
spack repo add edep-opticks-spack/edep_opticks/
spack install edepsim+opticks cxxstd=17
A Spack “view” is a tidy directory that symlinks in all files from all required packages and makes an ideal base for development.
mkdir hack && cd hack/
spack view --dependencies yes --exclude edepsim add -i local edepsim@master+opticks cxxstd=17
git clone https://github.com/ClarkMcGrew/edep-sim.git
./local/bin/cmake -S edep-sim -B edep-sim-build \
-DCMAKE_INSTALL_PREFIX=$PWD/local \
-DCMAKE_INSTALL_RPATH='$ORIGIN/../lib' \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON
./local/bin/cmake --build edep-sim-build
./local/bin/cmake --install edep-sim-build
./local/bin/edep-sim
Notes:
- We reuse the view directory also as our install directory.
- We add extra
CMAKE_INSTALL_*defs to setrpathin the binaries and avoidLD_LIBRARY_PATH.
So far we have not polluted our shell environment. Using direnv is one useful
way to manage shell environment tied to a directory. To use this, add the
following to your .bashrc or run it directly.
eval $(direnv hook bash)
Copy this into a .envrc file in the directory holding local/.
load_prefix "$PWD/local"
Next time you cd to the dev directory, run direnv allow once.
After this is done, edep-sim is in the path and can run.
edep-sim
t.b.d.