Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I turn on multi-CPU/Core C++ compiles in the Visual Studio IDE (2008)?

Tags:

I have a Visual Studio 2008 C++ project that has support for using multiple CPUs/cores when compiling. In the VCPROJ file I see this:

<Tool
    Name="VCCLCompilerTool"
    AdditionalOptions="/MP"
    ...

I can't find where that was turned added via the IDE and I want to set up another project that uses all of my cores during compilation.

I found tons of references to the MSDN /MP page but that is for using the command line; I have yet to find any references to setting that with the IDE. How do I do that?

EDIT: To clarify, the two projects are completely separate and are not in the same VCPROJ file. I wanted to turn on support for multiple cores during the C++ compilation phase.

like image 617
dwj Avatar asked Sep 14 '09 16:09

dwj


People also ask

Does compiling use multiple cores?

And for 1000 files, each core of the processor can happily compile one file at a time, keeping all cores totally busy. Tip: "make" uses multiple cores if you give it the right command line option. Without that it will compile one file after the other on a 16 core system.

Does Visual Studio benefit from multiple cores?

Visual Studio has the option of choosing number of maximum parallel builds - they use as many CPU cores as you wish. However, you shouldn't really focus too much on this option when deciding which CPU to buy.


2 Answers

To enable /MP option you could add it to Project Settings->C/C++->Command Line|Additional options. This is the only way to switch it on in vcproj.

like image 107
Kirill V. Lyadvinsky Avatar answered Nov 04 '22 01:11

Kirill V. Lyadvinsky


Tools > Options > Projects and Solutions > Build and Run > maximum number of parallel project builds

like image 35
Warren Young Avatar answered Nov 04 '22 01:11

Warren Young