[CMake] Project as a target
Tyler Roscoe
tyler at cryptio.net
Wed Apr 15 11:10:41 EDT 2009
On Wed, Apr 15, 2009 at 10:06:59AM +0200, Marcel Loose wrote:
> bigproject
> projectA
> subA1
> subA2
> projectB
> subB1
>
> I would like to be able to build any of these projects stand-alone (e.g.
> 'make projectA'). This is possible wrt. dependencies. However, CMake
> doesn't generate targets for projects (at least not that I'm aware of).
Correct. Targets are created by
add_[library|executable|custom_target]().
> Should I use add_custom_target() and add_dependencies() to create these
> project targets, or is there another (better) way to do this?
add_custom_target() + add_dependencies() is what I use.
hth,
tyler
More information about the CMake
mailing list