您的位置:首页 > 其它

How do I utilise all the cores for nmake?

2017-02-25 18:32 330 查看

1

According to MSDN, there’s no such option for nmake.

You can however make the compiler build multiple files in parallel by using the
/MP
option with the VC++ command line compiler and passing multiple files at the same time:

cl /MP a.cpp b.cpp c.cpp


However note that most Makefiles don’t call the compiler like this - they usual invoke the compiler separate for each individual source file, which would prevent the
/MP
option from doing anything useful.

2

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.

原文:

How do I utilise all the cores for nmake?

‘NMake Makefiles’ generate does not support parallel builds (/MP)?
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: