Skip to content

Fix standalone builds of public headers

Marco Clemencic requested to merge fix-standalone-headers-build into master

Gaudi CMake provides a mechanism to test the build of public headers in standalone mode, meant to ensure that the code doesn't have hidden dependencies on the particular context in which it is used. This test builds have been running for a while in lhcb-gaudi-head (see lhcb-core/LHCbNightlyConf!1027 (merged)) where problems were sorted out with the goal of enabling the test builds in lhcb-master.

The header PyAllenHelper.h fails compilation in standalone mode because it requires a header that has a different path at build time than when installed (during build we use InputProvider.h, but it gets installed as Allen/InputProvider.h).

The problem can be fixed in a number ways:

  • make Allen public headers accessible with the same name at build time and when installed (my favorite option)
  • install PyAllenHelper.h outside of gaudi_add_library so that it is not seen as a public header
  • skip all public headers standalone test builds for BinaryDumpers
  • since PyAllenHelper.h is only needed in allen.py, replace the public header as text in allen.py (the option implemented in this MR)

and probably I can come up with another few options.

In the attempt to clean up lhcb-gaudi-head I decided to give this a shot, but I'd prefer that Allen maintainers decide which approach they want before we enable standalone builds of public headers in lhcb-master.

Merge request reports