[Cmake] Subdirectory dependencies

Brad King brad.king at kitware.com
Tue Dec 11 14:53:02 EST 2001


> 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.
We started looking at putting a "-" in front of the rule to step down into
a subdirectory and run make so that the result value will be ignored, but
that prevents the error information from ever getting back up.  A simple
solution is to leave the automatic dependencies in there as they are,
which works for most purposes.  CMake takes care of all dependencies
automatically, so subdirectories and parallel builds should be no
different.  The dependencies it adds serve only to force multi-threaded
builds to go in the same order as a single-threaded build.

Developers can just run "make -i" if they really want to ignore errors.  
This should be used for dashboard builds anyway since a dashboard is
supposed to report all errors.

Non-developers should only be working with code that builds correctly, so
this shouldn't be an issue for them.

-Brad




More information about the CMake mailing list