Zitat von alexandre.feb...@thomsonreuters.com:
Using target_link_libraries(), I set that:
- exe depends on lib1
- lib1 depends on lib2, lib3
- lib2 depends on lib3
- lib3 depends on lib2
And the generated link line is : lib1 lib2 lib3 lib1 lib2 lib3.
Of course, this fails with an undefined symbol lib1f3 first declared in
lib3/f2.c.
So, is there a way to help cmake resolve this link line without changing
the lib1,2,3 code (because my project has too many of such circular
dependencies to make such corrections possible. (I'm still evaluating if
we can switch to our build system to cmake))
Did you think about merging lib2 and lib3 into one library? Circular
dependencies between them simply means that they cannot live without
each other, so you can as well make them one piece. If that's not
wanted, redesign the code. That's why it's usually called dependency
_tree_.
HS
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake