[CMake] transitive linkage of OBJECT library targets

hex hex7c3 at gmail.com
Wed May 22 03:57:30 EDT 2019


Without cycling dependencies you can do something like this:

/add_executable(test_object_lib_nesting main.cpp)//
//
//target_link_libraries(test_object_lib_nesting//
//    second_object_lib//
//    first_object_lib//
//)/

> The problem I have that the linker command line will have only the
> second.cpp.o for linking the first.cpp.o will not be added as link
> object to the exe. Causing missing symbols on exe linkage.
>
> How to transitively resolve and link "nested" Object library targets ?.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190522/2d6e7645/attachment.html>


More information about the CMake mailing list