Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
240 views
in Technique[技术] by (71.8m points)

c++ - How do I utilise all the cores for nmake?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...