简体   繁体   English

IncrediBuild 在一个线程中编译 Visual Studio 2010/2012 解决方案的一些项目

[英]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.

相关问题 如何使用Visual Studio 2012和Windows SDK 7.1编译VC ++ 2010项目 - How to compile VC++ 2010 projects using Visual Studio 2012 and Windows SDK 7.1 具有多个项目的visual studio解决方案无法编译 - visual studio solution with multiple projects doesnt compile 同一解决方案中不同项目之间的引用(Visual Studio 2012) - Reference between different projects in the same solution (Visual Studio 2012) 使用cmake和visual studio在一个解决方案中的几个项目 - Several projects in one solution with cmake and visual studio 在Visual Studio 2012上使用Direct X 2010年6月SDK进行编译 - Compile using Direct X June 2010 SDK on Visual Studio 2012 无法编译64位Visual Studio 2010项目 - Can't compile 64 bits Visual Studio 2010 projects Visual Studio:解决方案中的某些项目不会生成.exe文件 - Visual Studio: some projects in solution don't generate .exe files c ++ visual studio 2008问题,在一个解决方案中有两个项目 - c++ visual studio 2008 issue with two projects in one solution 如何将项目放在 Visual Studio 解决方案中的一个文件夹中 - How to put projects in one folder in a Visual Studio solution Visual Studio 2010项目到Visual Studio 2012 - Visual Studio 2010 project to Visual Studio 2012
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM