[CMake] Help cmake to resolve link lines with multiple circular dependencies?
Eric Noulard
eric.noulard at gmail.com
Thu Apr 23 09:03:46 EDT 2009
2009/4/23 <Alexandre.Feblot at thomsonreuters.com>:
> I have some code with multiple circular dependencies. I rely on the
> transitive dependency mechanism to create the link line. Following is a
> short example of libs which can't be resolved properly.
>
> è My question is: if there a way to help cmake create a working link line.
>
[...]
> And here is the call graph of these functions: main -> lib1f1 -> lib2f1 ->
> lib3f1 -> lib1f2 -> lib3f2 -> lib1f3
>
> Using target_link_libraries(), I set that:
>
> - exe depends on lib1
> - lib1 depends on lib2, lib3
> - lib2 depends on lib3
> - lib3 depends on lib2
>
[...]
>
> 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))
Don't know how to do that but I did face some similar issue which I
didn't manage
to solve using CMake.
I was able to solve it on unix somehow easily but not on Windows because
of the dll_import/export thing.
Thus I'm pretty curious,
Do you currently compile your code on Windows using shared lib?
If yes how do you compile your code with your current build system?
--
Erk
More information about the CMake
mailing list