How can I do a parallel build in Visual Studio 2010?

前端 未结 6 1796
太阳男子
太阳男子 2020-12-23 12:18

How can I get VS 2010 to run more than one C++ compile process at a time? I mean building object modules in parallel; I\'m not interested in building more than one project a

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-23 13:18

    Here is what I did

    1) Go to Tools->Options than under "Project And Solutions"->"Build And Run" for me it had the number of cores. Although at first i thought this was all i needed to do but it isnt

    2) Right click your project and select properties. Under "configuration properties"->"C/C++"->"Command Line" enter /MP4 where 4 is the number of cores you have. You'll get a warning about flags not being compatible so we have another step

    3) Go to Under "configuration properties"->"C/C++"->"Code Generation" there is "Enable minimum rebuild". Change that to no.

    Rebuild and you should see multiple CL processes in your task manager.

提交回复
热议问题