I would like to increase assembly parallelism using MSBuild in the following scenario:
There are three C ++ projects (goals). The first is a static library called A , the second is a dynamic library called B , which depends on A , and the third is the C executable, which depends on B All projects contain simple source code, without generating headers or other frauds.
There is nothing in this configuration that should exclude the possibility of compiling all translation blocks in parallel, since only real dependencies are in communication time. However, the standard way to configure links and dependencies in MSBuild forces everything to build A before it even starts creating anything in B , etc. This unnecessarily serializes some of the build processes.
Projects and a common solution should remain accessible to the βaverageβ developer, which means that project support and build customization must be fully implemented in the Visual Studio user interface (new libraries and executables may depend on pre-existing property sheets, but this should not be required edit .vcxproj files of new projects manually or manually write MSBuild XML files).
My current thought is to move all the code from B and C to separate static libraries called B' and C' . Then B will depend on both A and B' , which allows them to compile in parallel. Similarly, since C ultimately depends on A , B' and C' , they can all be compiled in parallel. The only remaining sequential processes would be the linker steps, as expected. This is a little more cumbersome and non-idiomatic than we would like, although this is not the end of the world.
I would really like to be able to create dependencies for the project link step, which also do not act as dependencies for the compilation phase of the project. On most other build systems, I am familiar with this trivial, if not implied. Is this possible in MSBuild projects for C ++, given the requirements for ease of use of Visual Studio; if so, how?