[CMake] ADD_SUBDIRECTORY

George Neill georgen at neillnet.com
Thu Dec 20 11:47:00 EST 2007


Hi Brandon,

> Because having a subdirectory doesn't imply that you're going to do
> anything there.  It could just be an intermediate part of your source
> tree.  Perhaps the CMakeLists.txt in that subdirectory merely contains
> more ADD_SUBDIRECTORY commands.

In the example I provided, I tried to depicted that case.

I guess by issuing the ADD_SUBDIRECTORY() ( along with a PROJECT() ) I
am implicitly saying there's going to be a collection of stuff built
under this project.  It makes sense (to me) CMake could automatically
generate a psuedo-target (synonomous with a "make all" for a
subproject I suppose).

Just an idea!   It would have saved me (and a co-worker) a few minutes
yesterday.  :)

TIA,
George.


More information about the CMake mailing list