[CMake] multiple cmake files in one directory

Tyler Roscoe tyler at cryptio.net
Tue Sep 22 16:20:56 EDT 2009


On Tue, Sep 22, 2009 at 08:34:36PM +0200, Jeroen Dierckx wrote:
> What we do in our build system is using file(GLOB to get all .cmake
> files in a "targets" directory, and including those. That way, to add
> additional targets, all the developers have to do is add a .cmake file
> to that directory.

This is not a recommended practice. If you do it this way, CMake can't
notice if new lists files have been created (or removed) and thus cannot
trigger a rebuild of the CMake binary tree when it should.

tyler


More information about the CMake mailing list