[CMake] Recursive dependencies and static libraries

Hendrik Sattler post at hendrik-sattler.de
Fri Nov 7 06:43:42 EST 2008


Jed Brown schrieb:
>>>> The FindPkgConfig.cmake module looks broken too, it assumes that
>>>>
>>>>   -L/A -la -L/B -lb
>>>>
>>>> is equivalent to
>>>>
>>>>   -L/A -L/B -la -lb
>>>>
>>> I don't see where the above would fail.
> 
> This can also fail, but I should have written
> 
>   -L/B -L/A -la -lb
> 
> since the existing modules are doing two things wrong.  When the
> compiler parses the link line, it builds a stack of libraries to search.
> This stack must be searched incrementally.

I'd ask the author of B first, why the H*** he has to use the same
library name that is already used by A, especially since he uses A.
That is broken in itself because if you install A and B with the same
prefix, B is broken.
If you really need such specific linker behaviour (and who tells you
that all linkers behave like this?), you actually already messed up.

HS


More information about the CMake mailing list