views:

143

answers:

1

I'm using Visual Studio 2008 on my main build system. I've been playing with Visual Studio 2010 on another one. It appears that the tool still only wants to use one core when compiling unless you specify the /MP switch in the compiler switches (see http://stackoverflow.com/questions/1422601/how-do-i-turn-on-multi-cpu-core-c-compiles-in-the-visual-studio-ide-2008). I have to do this for every project. Is there a way to make VS always do this?

+1  A: 

Your can create a property sheet that all of your projects include, and set the /MP flag in that property sheet.

In Visual Studio 2010, you could put it in the Microsoft.Cpp.Win32.user property sheet, which is included in new projects by default (it has the old Visual C++ directories and other default settings defined in it). I don't know that modifying the default property sheet is really a good idea, but it's certainly an option.

James McNellis
From this http://msdn.microsoft.com/en-us/library/3z7t21ew%28v=VS.90%29.aspx it looks like I still have to go into each project and tell it to inherit the property sheet.
dwj
@dwj: You would, yes. Note also what I just added about Visual C++ 2010.
James McNellis
@James: Modifying included templates always makes me nervous; I forget to do it if I reinstall! Thanks for the pointers; I was really hoping MS either made /MP the default or allowed it to always be turned on for a given developer/environment.
dwj
@dwj: Sadly, no, and it doesn't sound like that will change too soon: http://connect.microsoft.com/VisualStudio/feedback/details/467801/enable-mp-by-default-in-c-compiler
James McNellis
+1000 great answer
Sam Post