我刚刚获得了一台新的四核电脑,并注意到nmake只使用1个进程。
我曾经使用make,它有开关-j4启动4个进程。 nmake等价物是什么?
根据下面的信息,我已经能够向我的qmake项目文件添加一个命令:
QMAKE_CXXFLAGS + = / MP
哪个有效地为我做了 非常感谢。
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.
最满意答案
根据MSDN , nmake没有这样的选择。
然而,您可以通过使用VC ++命令行编译器的/MP选项并同时传递多个文件来使编译器并行构建多个文件:
> cl /MP a.cpp b.cpp c.cpp但是请注意,大多数Makefile不像这样调用编译器 - 他们通常会为每个单独的源文件调用编译器,这将阻止/MP选项执行任何有用的操作。
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.cppHowever 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.
更多推荐
发布评论