VS2008 中的 Multiproc 构建
我记得在某处读过有关 VS2008 中多进程构建的文章,只是我现在找不到这篇文章了。 有谁知道如何打开它,或者即使这是可能的?
I remember reading somewhere about multiproc builds in VS2008, only I can't find the article now. Does anyone know how to turn this on, or even if it is possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 VS2008 中并行化构建有两种方法。
第一个是并行运行多个项目构建。 该设置位于“工具”->“选项”->“项目和解决方案”->“构建和运行”中,称为“并行项目构建的最大数量”。 请注意,每个项目一次只会构建一个文件。
第二种是在单个项目中一次编译多个文件。 对于 C++,这是通过设置
/MP
编译器来完成的标志。 请注意,此功能与预编译标头的交互相当奇怪,您必须跳过一些步骤才能将两者结合起来。There are two ways to parallelize a build in VS2008.
The first is to run several project builds in parallel. The setting is in Tools->Options->Projects and Solutions->Build and Run, called "Maximum number of parallel project builds". Note that each project will only build one file at a time.
The second is to compile multiple files at a time within a single project. With C++, this is done by setting the
/MP
compiler flag. Note that this feature interacts rather oddly with precompiled headers, and you'll have to jump through some hoops to combine the two.我怀疑您是在询问新的(针对 VS 2008)多进程 VC++ 构建功能。 请参阅此。
此功能存在于旧版本的 VC++ 中,但没有记录。 这不是我们已经拥有了一段时间的多项目建筑。
I suspect you're asking about the new (for VS 2008) multi-proc VC++ build feature. See this.
This feature was present in older versions of VC++, but was not documented. This is not the multi project building we've had for some time.