Closed mennodeij closed 2 years ago
I have traced this down to the fact that we bundle MPI with the installation, and find_package(MPI)
will add include paths that are in the old location. For now SKIP_MPI=YES
solves the problem.
OK - glad you found a solution. Improving "relocatability" is a gathering storm on several of my projects, and frankly I do not understand sufficient aspects as much as I would like. I'm closing the ticket, but will happily reopen if you can see a way to improve things.
The way I understand it is to use shared libraries and RPATH
, but the details can still be finicky.
I notice that when I build pFUnit and install it at some location, then relocate the installation to another location, the CMake pFUnitConfig*.cmake files still contain the old location and using relocated pFUnit in the target application fails with:
PFUNIT could not be found because dependency GFTL could not be found.
or when GFTL is found
It would be nice if this just worked. CMake is set up to support relocating installations with package config files.