sly2j / nanocernlib

A minimal linux version of the old cernlib containing almost all cernlib routines.
5 stars 6 forks source link

Reordered linking - plase don't merge blindly #7

Open kkauder opened 1 year ago

kkauder commented 1 year ago

I found while hacking up PEPSI by hand https://gitlab.com/eic/mceg/pepsi/-/commit/84ca2fd52e8e0ff3a84da73c768a2eb12e1efdde that repetition isn't enough.

It may actually not even be needed. If that's the case, l. 39,

set(NANOCERNLIB_LIBRARIES ${NANOCERNLIB_LIBRARIES} ${NANOCERNLIB_LIBRARIES})

can be deleted too.

But I don't have enough test cases to be comfortable just pulling this change in. Opinions?

kkauder commented 1 year ago

There's more to it, actually. I built BeAGLE using all four libraries and it quietly overrode my LHAPDF linking. I need to specifically only use -lnanocernlib_mathlib -lnanocernlib_packlib. Or changing the order with lhapdf probably. But either way, it should be a bit more fine-grained than cmake delivering all four in one lump.

sly2j commented 1 year ago

Maybe we could export some extra targets for those cases? I can't really test your changes (no time right now) but it does seem reasonable to me at first glance