[CMake] Help cmake to resolve link lines with multiple circulardependencies?

Alexandre.Feblot at thomsonreuters.com Alexandre.Feblot at thomsonreuters.com
Thu Apr 23 09:07:25 EDT 2009


Eric,

in fact we build static libraries.
And we currently use a custom build system with a "handmade" link line.

Alexandre

-----Original Message-----
From: Eric Noulard [mailto:eric.noulard at gmail.com] 
Sent: Thursday, 23 April 2009 15:04
To: Feblot, Alexandre (M Risk)
Cc: cmake at cmake.org
Subject: Re: [CMake] Help cmake to resolve link lines with multiple circulardependencies?

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


This email was sent to you by Thomson Reuters, the global news and information company.
Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Thomson Reuters.




More information about the CMake mailing list