[英]IncrediBuild compile some projects of Visual Studio 2010/2012 solution in one thread
We try to upgrade our VS2008 solution consist of ~20 projects to VS2010, but there is a problem with building some of them.我们尝试将包含约 20 个项目的 VS2008 解决方案升级到 VS2010,但是构建其中一些项目存在问题。 I tried different versions of VS(2010, 2012, 2013. even with vc90 compiler version) / IncrediBuild(4.61, 5.0, 6.1) / Windows(7, 8) but nothing helps.
我尝试了不同版本的 VS(2010, 2012, 2013. 即使使用 vc90 编译器版本) / IncrediBuild(4.61, 5.0, 6.1) / Windows(7, 8) 但没有任何帮助。 All possible options of projects and Incredi were changed too.
项目和 Incredi 的所有可能选项也已更改。 Custom build rules and steps doesn't set for these projects.
未为这些项目设置自定义构建规则和步骤。 Please, tell me someone what can I do to solve the problem.
请告诉我我能做些什么来解决这个问题。
I couldn't load images yet, so this is a link to build graph screenshot .我还无法加载图像,所以这是构建图形屏幕截图的链接。
Upd : I've tried to compile solution in VS2013 without IncrediBuild, but with /MP option, and have got identically the same - some files of project were compiled sequentiallly and in the same order, so Incredi is innocent and the problem only in our project and how the VS works with it.更新:我尝试在不使用 IncrediBuild 的情况下在 VS2013 中编译解决方案,但是使用 /MP 选项,并且得到了相同的结果 - 项目的某些文件是按顺序以相同的顺序编译的,因此 Incredi 是无辜的,问题仅在我们的项目以及 VS 如何使用它。
The latest public version of IncrediBuild introduced a feature which is exactly what you are asking for - truly out-of-order \\ optimized parallelization. IncrediBuild 的最新公共版本引入了一项功能,这正是您所要求的 - 真正无序\\优化的并行化。 This new feature, allows IncrediBuild to execute Visual Studio tasks in parallel even in scenarios where Visual Studio does not know how to do that.
这一新功能允许 IncrediBuild 并行执行 Visual Studio 任务,即使在 Visual Studio 不知道如何执行的情况下也是如此。 Meaning that with IncrediBuild, every task that is not REALLY dependent on a previous task, will be executed in parallel to it.
这意味着使用 IncrediBuild,每个不真正依赖于先前任务的任务都将与其并行执行。
So in a scenario as described above, although filling the fixed output object file names results in Visual Studio (and MSBuild) compiling these files in a sequential manner, IncrediBuild will compile them in parallel.因此,在上述场景中,尽管填充固定输出对象文件名会导致 Visual Studio(和 MSBuild)以顺序方式编译这些文件,但 IncrediBuild 将并行编译它们。
In addition to that, in a scenario where project B depends on project A, Visual Studio will only compile sources from project B AFTER linking of A is done (although most of the time Project B compilations don't depend on project A compilations, only the link steps of these projects depend upon each other), IncrediBuild will be able to compile both project A and project B in parallel, following by a link of A and a link for B.除此之外,在项目 B 依赖于项目 A 的情况下,Visual Studio 只会在 A 的链接完成后编译来自项目 B 的源代码(尽管大多数时候项目 B 编译不依赖于项目 A 编译,只有这些项目的链接步骤相互依赖),IncrediBuild 将能够并行编译项目 A 和项目 B,然后是 A 的链接和 B 的链接。
Hope this shed some light on the topic.希望这对这个话题有所启发。
Disclaimer: the writer is CTO at IncrediBuild免责声明:作者是 IncrediBuild 的 CTO
So, the problem was that some of cpp-files had fixed output object file names.因此,问题在于某些 cpp 文件具有固定的输出目标文件名。 When these parameters were cleared compilation for them begun parallel.
当这些参数被清除时,它们开始并行编译。 But in VS2008 everything was fine even with such parameters properties
但是在 VS2008 中,即使有这样的参数属性,一切都很好
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.