2

I have to compile more than 100 projects (VS 2012). All these projects use the "/MP"-switch to use multiple cores.

Now I want to compile it on one big machine (24 Cores). On this machine, I compile it in a batch with MSBUILD. I want to start 24 MSBuild-Processes, in which every MSBuild-Processs does not use more than one process.

Is it possible to make MSBuild ignore the /MP-Switch in the project without editing the project(s).

I tried the msbuild-parameter /m:1 but it seems to get ignored or the project-switch is preferred.

Biber
  • 709
  • 6
  • 19
  • 3
    One way of modifying project options without editing project files for C++ (which is what I assume this is about): https://stackoverflow.com/questions/15141429/how-to-set-preprocessordefinitions-as-a-task-propery-for-the-msbuild-task/17446623#17446623. the flag you need is `MultiProcessorCompilation`. Note that `/m:1` isn't related to C++ compilation, just msbuild. That being said: if you want to do this for performance, it might actually end up being slower, hard to tell. Interesting to test though :) – stijn Jun 27 '19 at 11:16

0 Answers0