[CMake] Unix makefiles feature request

Robert Bielik robert.bielik at xponaut.se
Wed Jun 24 10:58:59 EDT 2009


Ok, apologies if this is already implemented, just haven't seen it.

When making "Unix Makefiles", then link.txt script have archive files (static libraries) listed in the
order they appear in the TARGET_LINK_LIBRARIES directive.

The GCC linker (LD) has the peculiarity that if symbols are defined in library A and library B needs them, but
B is given on the LD command line after library A, linking will fail with unresolved dependencies.

LD supports the directive --start-group/--end-group to get around this issue, see (http://sourceware.org/binutils/docs/ld/Options.html#Options)

Question is then: Can I direct CMake to enclose static libraries on the command line of LD with --start-group/--end-group?

TIA
/Rob


More information about the CMake mailing list