FairMQ icon indicating copy to clipboard operation
FairMQ copied to clipboard

Exported static build target references private header-only dependency

Open dennisklein opened this issue 3 years ago • 1 comments

When building FairMQ with -DBUILD_SHARED_LIBS=OFF and then consuming the exported FairMQ::FairMQ target, there is a reference to the header-only private FairMQ dependency asiofi::asiofi which is not meaningful (reported by @ironMann, thx!):

2021-05-06@20:54:13:DEBUG:DataDistribution:FairRoot:0: CMake Error at base/MQ/CMakeLists.txt:37 (add_library):
2021-05-06@20:54:13:DEBUG:DataDistribution:FairRoot:0:   Target "BaseMQ" links to target "asiofi::asiofi" but the target was not
2021-05-06@20:54:13:DEBUG:DataDistribution:FairRoot:0:   found.  Perhaps a find_package() call is missing for an IMPORTED target, or
2021-05-06@20:54:13:DEBUG:DataDistribution:FairRoot:0:   an ALIAS target is missing?

dennisklein avatar May 07 '21 11:05 dennisklein

Reason: https://gitlab.kitware.com/cmake/cmake/-/issues/15415#note_333595 Possible workaround: https://gitlab.kitware.com/cmake/cmake/-/issues/15415#note_634114

dennisklein avatar May 07 '21 11:05 dennisklein

This will become obsolete as we plan to make a future header-only release of FairMQ.

dennisklein avatar Feb 28 '23 16:02 dennisklein