How do I utilise all the cores for nmake?

Phil Hannent picture Phil Hannent · Mar 2, 2009 · Viewed 41.8k times · Source

I just got a new quad core computer and noticed that nmake is only using 1 process.

I used to use make which had the switch -j4 for launching 4 processes. What is the nmake equivalent?

[edit] Based on the information below I have been able to add a command to my qmake project file:

QMAKE_CXXFLAGS += /MP

Which effectively did it for me. Many thanks.

Answer

Violet Giraffe picture Violet Giraffe · May 12, 2014

Another generic, non-Qt-related way to tell nmake to use all the cores is to set environmental variable CL to /MP:

set CL=/MP
nmake

will use all the CPU cores.