[Cmake] Dependency handling problems with 1.8

Amitha Perera perera at cs . rpi . edu
Wed, 1 Oct 2003 14:00:55 -0400


Hi all

CMake 1.8 gives errors on dependency handling in what (we think) are
reasonable situations.

Consider:

(toplevel CMakeLists.txt)
   SUBDIRS( a )
   SUBDIRS( b )

(a/CMakeLists.txt)
   ADD_LIBRARY( a ... )
   SUBDIRS( gui )

(a/gui/CMakeLists.txt)
   ADD_LIBRARY( a_gui ... )
   TARGET_LINK_LIBRARIES( a_gui a b )

(b/CMakeLists.txt)
   ADD_LIBRARY( b ... )
   TARGET_LINK_LIBRARIES( b a )

Here, the dependency tree is simple, well-defined, and acyclic:
   liba <-- libb <-- liba_gui

However, CMake issues an error that "b" is seen in a TARGET_LINK
before it is seen in an ADD_LIBRARY. Further, it issues a dire warning
that "this may break the dependency handling".

CMake 1.6 did not have this problem. Does someone know why this
warning was introduced, and how we can go about making it go away?

Thanks,
Amitha.