0

We have multiple C++ projects in our solution that all support different configurations (I'll omit some uninteresting ones here):

  1. Shared (Debug, DebugMD)
  2. A (DebugMD)
  3. B (Debug)

Both A and B depend on Shared, but A depends on Shared (DebugMD) and B depends on Shared (Debug).

We have one solution configuration Debug, that builds:

  • Shared (Debug)
  • A (DebugMD)
  • B (Debug)

However, this configuration breaks A, because we don't build Shared (DebugMD). Is it possible to build Shared (Debug) and Shared (DebugMD) within the same solution configuration (without batch builds)?


I've read Can I build multiple configurations of a project within one solution configuration?, but this only seems to work for .net projects (or at least I couldn't get it working for .vcxprojs).

Timo
  • 9,269
  • 2
  • 28
  • 58
  • Have you considered a Batch Build ( Build menu->Batch Build? – JohnCz Jan 19 '22 at 19:18
  • @JohnCz Batch build isn't an option. I don't want to have to batch build for the solution to build correctly. – Timo Jan 20 '22 at 07:59
  • The principle in the link you mention (add a custom target which builds the project with another configuration) is the same for C++, you just need a different way to invoke the target. There are quite a lot of possibilities, some answered here: https://stackoverflow.com/questions/13727351/what-happened-to-beforebuild-and-other-targets-in-vs2012 – stijn Jan 20 '22 at 11:18

0 Answers0