[CMake] subdirs and depenency handling

Brad King brad.king at kitware.com
Tue May 10 13:25:42 EDT 2005


Alexander Neundorf wrote:
> Still it feels to me strange to have to mix a single SUBDIRS() command 
> with several ADD_SUBDIRECTORY() commands, since both do almost the same 
> thing, with some subtle differences you wouldn't think of in the first 
> moment. 

It is up to the listfile author whether to use one command or the other 
or both.  We plan to write all new code using only ADD_SUBDIRECTORY once 
a CMake release has the command.

> Couldn't this be somehow integrated in the SUBDIRS() command, maybe 
> combined with SET_DIRECTORY_PROPERTIES() or something like that ? 

No, because the ADD_SUBDIRECTORY command processes the subdirectory as 
soon as it is executed.  SUBDIRS just adds the directories to a list to 
be processed later.  This is a core functionality difference that cannot 
be tweaked with a property.

-Brad


More information about the CMake mailing list