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:<br>
<br>ADD_CUSTOM_TARGET(subbuild<br> COMMAND ${CMAKE_COMMAND} --build ${TARGET_DIR} -- -j${PARENT_CPUS}<br>)<br><br>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.)<br>
<br>Any insight is appreciated - this one has got me pretty stumped as to the "right way" to achieve this effect.<br><br>Thanks,<br>CY<br><br>