New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CMake] Use an object library for STIR_REGISTRIES #1141
Conversation
Using an object library means that the registries get compiled only once, therefore speeding up the build process quite a lot. It's also easier to use when building a project that uses STIR as we just need to depend on STIR_LIBRARIES. However, we do set the STIR_REGISTRIES variable empty at export, such that external libraries can still use add_executable(bla ${STIR_REGISTRIES})
ca37ed1
to
79112cc
Compare
This worked and resulted in great speed-up. Sadly, it doesn't work for SIRF as its executables now do not have the stir registries at all. The reason is that (I also have some linking errors with the current STIR commit related to HDF5, but not sure if these are related) |
We still need to use the STIR_REGISTRIES variable as target_link_libraries does not use object libraries transitively.
The previous commit re-enables the requirement to use |
Currently, the exported |
f864003
to
2c8adf2
Compare
This is finished (aside from release notes). @danieldeidda @markus-jehl @robbietuk @NikEfth could you try this one out please? Especially if you have something that uses |
Just tested it and it works fine, as far as I can tell. |
Using an object library means that the registries get compiled only once, therefore speeding up the build process quite a lot.
It's also easier to use when building a project that uses STIR as we just need to depend on
STIR_LIBRARIES
. However, we do set the STIR_REGISTRIES variable empty at export, such that external libraries can still useFixes #83