Closed jenshnielsen closed 8 years ago
This can't work in general on linux because it's not possible to extend the rpath. CMake get's round this but first inserting a string of : the same length as the install rpath and then changing it at install time this only really works with one rpath thou.
get rpath info on linux
objdump -a -x /home/cceajhn/miniconda3/envs/dcprogs/lib/python3.5/site-packages/dcprogs/likelihood/_likelihood.so | grep RPATH
I.e.
(dcprogs)cceajhn@login07:~/devel/HJCFIT/HJCFIT/build(develop) $ objdump -a -x likelihood/liblikelihood.so | grep RPATH
RPATH :::::::::::::::::::::::::::::::::::::::::
(dcprogs)cceajhn@login07:~/devel/HJCFIT/HJCFIT/build(develop) $ objdump -a -x /home/cceajhn/miniconda3/envs/dcprogs/lib/liblikelihood.so | grep RPATH
RPATH /home/cceajhn/miniconda3/envs/dcprogs/lib
(dcprogs)cceajhn@login07:~/devel/HJCFIT/HJCFIT/build(develop) $ objdump -a -x likelihood/_likelihood.so | grep RPATH
RPATH /home/cceajhn/miniconda3/envs/dcprogs/lib:/home/cceajhn/devel/HJCFIT/HJCFIT/build/likelihood:
(dcprogs)cceajhn@login07:~/devel/HJCFIT/HJCFIT/build(develop) $ objdump -a -x /home/cceajhn/miniconda3/envs/dcprogs/lib/python3.5/site-packages/dcprogs/likelihood/_likelihood.so | grep RPATH
RPATH /home/cceajhn/miniconda3/envs/dcprogs/lib
This is a follow up to #126 and gets rid of setting LD_LIBRARY_PATH for the tests.
It's not as nice as I would like since there seems to be no good way of setting a new rpath for the fake install. The solution here is a bit of a hack since it reruns CMake twice in the fake install script to set and unset the CMAKE_INSTALL_RPATH