[CMake] more targets to run in parallel
Andrea Crotti
andrea.crotti.0 at gmail.com
Fri Feb 17 10:35:43 EST 2012
So suppose I have a list of Python eggs, in the form.
- egg1
- egg2
- ..
What I would like to do is to have be able to do.
cmake .
make build_eggs
which would go over the list of the eggs and run in each of them
python setup.py bdist_egg -d <some_path>
The list of eggs is actually computed at run-time, so I created a custom
command and a custom target:
add_custom_command(OUTPUT ${INSTALLED_EGGS_LIST}
COMMAND "${PYTHON_EXECUTABLE} ${GEN_DEPENDENCY_SCRIPT}
${BUILD_APP_OPTIONS}"
)
add_custom_target(generate_dependency_file
DEPENDS ${INSTALLED_EGGS_LIST}
)
So now, is there a way to create one target for *each* egg in the list?
And then I also need also a way to have another target that actually
depends on all these other targets, is that possible?
I could have just one target to build them all, but then it would not be
able to actually run in parallel (with make -j), is that correct?
More information about the CMake
mailing list