Recently I have faced with a problem of realization of multithreaded build in Qt Creator 2.0 in Windows. I found thread in Qt-creator mailing list which says, that the flag "-jx", specified in make params in Qt Creator, in Windows doesn't work, because "The problem seems to be that child processes don't get the parent arguments (as on Linux)."
But time - the most valuable resource and I don't want to spend it for recompilation at debugging and refactoring, I found a solution. The main idea is to run mingw32-make from .bat-file with the necessary parameters.
First of all we must set environment variable with path to mingw and specify include/lib folders (if they doesn't set by default)
Then we call mingw32-make.exe with following parameters:
-j4 — set number of jobs/threads to 4
-C % CD% — change to project dir before doing anything. "% CD%" sets automaticaly by Qt Creator
!!!remove space between % and CD. I used it because parser translate them as one symbol
-f Makefile.%1 — I used standard Debug/Release targets in QtCreator, so qmake creates two makefiles: Makefile.Debug and Makefile.Release. %1 - first argument which recieve build target name
Further in the "Build steps" section in the "Override make.exe" field in QtCreator we must specify path to our .bat-file. (e.g. C:\make.bat) and in the "make arguments" field we must specify target name.
We must set "Override make.exe" and make params in all build targets!
My .bat-file code:
Don't forget to remove space between % and CD!
Paths to mingw can differ.
C:\Qt\2010.04\mingw\bin\mingw32-make.exe -j4 -C % CD% -f Makefile.%1