On 01/27/10 09:07, Mathias Bauer wrote:
Jussi Pakkanen wrote:
Yes, sure. If and only if you have target_link_libraries(some_exe
some_library) then the linker invocation for some_exe will have
'-lsome_library'. Whether or not it was built accidentally, CMake will
not link the exe against the library.

Cool.

Mathias, I'm not sure I understand your excitement here. ;) What ultimately has to happen if lib2 depends on lib1 is that the command line used to link lib2 mentions lib1 to link against (e.g., something like "-llib1" on Unix).

With our current approach, this is a two-level mechanism, where some makefile.mk contains a line SHL2STDLIBS+=$(LIB1LIB) and additionally some build.lst contains the corresponding module dependency.

Every sane build system that has a global view of things would certainly only require this to be a one-level mechanism, where the user-provided information that lib2 needs to link against lib1 (the "SHL1STDLIBS+=$(LIB1LIB)" part in our current system) is sufficient for the build system to automatically derive the corresponding dependencies (that lib1 needs to be built before lib2 can be linked).

Or what am I missing?

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to