I know this is an old thread but because it's one of the first things that came up on Google on this topic I wanted to provide an answer.
For SUBDIRS projects the given answer is partially correct. To prevent the subprojects building in parallel to each other at all, just use CONFIG+=ordered. To prevent only some subprojects from building in parallel, use "depends" like so:
bproj.depends = aproj
bproj.depends = aproj
To copy to clipboard, switch view to plain text mode
Still, sometimes you need to prevent a given subproject from building its files in parallel. For example, I have some template heavy code where compiling each file takes all the system memory. I want to make just that subproject build serially. This is where GNU Make's "NOTPARALLEL" is useful. This gets qmake to add it to the Makefile:
unix {
notparalleltarget.target = .NOTPARALLEL
QMAKE_EXTRA_TARGETS += notparalleltarget
}
unix {
notparalleltarget.target = .NOTPARALLEL
QMAKE_EXTRA_TARGETS += notparalleltarget
}
To copy to clipboard, switch view to plain text mode
Bookmarks