How do I utilise all the cores for nmake?

后端 未结 8 1973
忘了有多久
忘了有多久 2020-12-13 00:00

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 t

8条回答
  •  醉酒成梦
    2020-12-13 00:29

    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.

提交回复
热议问题