VS2010 : How to run devenv to not parallelize the build
I use devenv.exe to pass it a sln file and use /Rebuild switch, internally the devenv.exe spins u开发者_如何学Cp multiple msbuild's. I have a need to run unparalleled build, with only one thread of msbuild. Surely, I can use directly msbuild.exe with /M set to 1, but I have a specific requirement to use devenv.exe.
Is there any way by a command line switch or by using some environment variable which will allow me to do aforementioned.
Thanks in advance.
So you want it to compile slower?
In your project file under C/C++ General you'll see a Multi-processor Compilation. Set that to No. Else remove the /MP switch from the commandline to cl.exe depending how you are compiling.
I tried the above solution and it did not work. Here's the correct solution I found from this duplicate topic:
How to do a parallel build in Visual Studio 2010
1. Tools -> Options
2. Projects and Solutions\VC++ Project Settings
3. Maximum concurrent C++ compilations
4. Set it to 1 (or the desired number)
精彩评论