I have a VC project file that I'm building from command line using MSBuild. I want to specify the /MP
flag without editing the project file. Is that possible?
I've tried set CL=/MP
prior to calling MSBuild, but it has no effect.
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- How to know full paths to DLL's from .csproj f
- Importing NuGet references through a local project
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- How to show location of errors, references to memb
- Warning : HTML 1300 Navigation occured?
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- How to track MongoDB requests from a console appli
This can be accomplished by accessing the
CL_MPCount
Visual Studio option:The above instructs the compiler to perform a maximum of 2 parallel compilation tasks. The
/m:2
flag allowsMSBuild
to build two projects in parallel. The net result is that we have a maximum of 4cl.exe
processes running in parallel.UPDATE: The
CL_MPCount=2
flag gets passed on tocl.exe
as/MP2
. This allows parallel compilation of 2.cpp
files within the same project.You need a property that you can override from the command line. Open the .vcxproj file in a text editor, Notepad will do. Locate the "Globals" property group and add a property named, say, "Turbo"
And use the property to specify the compile option. Since it can only work in the Release build:
And run MSBuild: