[CMake] Only build a subset of all targets in ALL_BUILD

wedekind wedekind at caesar.de
Tue Aug 23 06:33:21 EDT 2005


Hello all,

I am using CMake 2.2 and dart2. I have a source tree which contains a number
of components which are somehow dependent on each other. I have created
CMakeLists.txt files for each component and if I want to build all
components, using the ALL_BUILD or INSTALL target, everything is fine :)

But what if I only want to build a subset of all components? I want to
choose the components to build and let cmake find out the dependent targets
that must also be build in order to build the chosen components. Only those
components will be built that are really necessary, not all. I do not want
to traverse into each subdir "by hand" and build the component, but I want
to build the ALL_BUILD or INSTALL target as usual which now should only
build the selected (and dependent) components.

I need this behaviour to build sub-releases or AddOn- or bugfix-releases of
our software. I could of course write a script which traverses into all
subdirs and builds the components, but I only want _one_ buildlog of the
whole build which can be submitted to the dart2-server. So I want to do this
with cmake.

Cheers

Marco




More information about the CMake mailing list