[Cmake] Subdirectory dependencies

Amitha Perera perera at cs.rpi.edu
Tue Dec 11 11:31:18 EST 2001


Hi all

Recently, someone made each subdirectory depend on the previous one,
in order to solve some multi-threaded issues. However, it has an
unfortunate side effect in that even when there are no dependencies in
the subdirectories, one subdirectory failing to build means the entire
build process halts. A solution may be to allow explicit dependency
information in the SUBDIR command, with the default behaviour as now:
   SUBDIR( a )
   SUBDIR( b )
   SUBDIR( c )
    ->   b depends on a, and c on b (and hence on a).
   SUBDIR( a )
   SUBDIR( b DEPENDS a )
   SUBDIR( c DEPENDS a )
    ->   b depends on a, c depends on a. If b fails, c can still
         build. b and c could be built in parallel.

Comments?

Amitha.



More information about the CMake mailing list