Per the customizing Makefile email, I'd like to ask if a mechanism exists or
could be implemented to allow CMakeLists.txt files to define commands that
pass a CPU count to subcommands - e.g. something that allows the generators
to take a syntax along the lines of:

ADD_CUSTOM_TARGET(subbuild
     COMMAND ${CMAKE_COMMAND} --build ${TARGET_DIR} -- -j${PARENT_CPUS}
)

and generate makefiles that will take "make JOBS=3 subbuild" and have cmake
in turn launch "make -j3" in the target directory - in other words,
${PARENT_CPUS} would be a cue for the backend generator to add logic to pass
down parallel make settings to the subbuild command.  (Ideally -j3 could be
passed down, but it looks like make itself precludes that so some other
variable would have to be used at the top level.)

Any insight is appreciated - this one has got me pretty stumped as to the
"right way" to achieve this effect.

Thanks,
CY
_______________________________________________
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