[CMake] Problem with circular dependencies

David Cole david.cole at kitware.com
Thu May 28 18:18:55 EDT 2009


On Thu, May 28, 2009 at 6:06 PM, Tyler Roscoe <tyler at cryptio.net> wrote:

> Well as you concisely stated at the beginning of this discussion, you
> have a circular dependency. Software is bad at handling circular
> dependencies, so it is your job as the human to jump in and decide how
> to break it up. We have discussed a number of strategies for doing this.


I'm not going to question "why?" -- after all, you told us not to.... :-)

However, I will say that the solution to this is simply to eliminate the
circular dependency.

If, in fact, A cannot be linked without B and B cannot be linked without A,
then A and B are in reality a tightly-coupled single inseparable entity.
So... rather than struggling with this and trying to shove a square peg into
a round hole, simply refactor the square peg into a round peg and it will
fit nicely.

Maybe it is easier for me to say this than for you to actually do it, but
nevertheless, I do not think you can refute the logic that says : A and B
are, in reality, "AB" ..... so stop trying to treat them as separate
entities.

Merge/glue them together and nobody will have to think about this problem
again...

Just my opinion... not even 2 cents worth,
  :-)   David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090528/f6352a73/attachment.htm>


More information about the CMake mailing list