Skip to content
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

Support Unity builds by adding a header guard and changing a few function names #746

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmcarcell
Copy link
Member

@jmcarcell jmcarcell commented Mar 7, 2025

See Unity builds. To enable unity builds just add -DCMAKE_UNITY_BUILD=ON to the cmake command.

Some timings on my machine, only one run, building without optimizations and with Ninja:

Task Normal Unity
Build EDM4hep (with add_subdirectory) 22.4 s 8 s
Build podio+EDM4hep (with add_subdirectory) 47.5 s 20.3 s
Touch Frame.h and rebuild (podio+EDM4hep) 10.8 s 12.4 s
Touch ROOTReader.cc and rebuild (podio+EDM4hep) 1.6 s 3.9 s
Touch read_events.h and rebuild (EDM4hep) 1.4 s 1.4 s

Not great for development but interesting for builds from scratch at little cost, one include guard and different names for some functions, which may be better for debugging and setting breakpoints.

BEGINRELEASENOTES

  • Support Unity builds Add missing include guards and make sure some functions such as createBuffer have a different name for each collection.

ENDRELEASENOTES

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant