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
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to