BabylonNative icon indicating copy to clipboard operation
BabylonNative copied to clipboard

Enable parallelism for cmake generated projects building on windows platforms.

Open chrisfromwork opened this issue 5 years ago • 2 comments

It looks like improved tools exist for parallel building that an be enabled at the project level: https://devblogs.microsoft.com/cppblog/improved-parallelism-in-msbuild/

I'm opening this issue to track suggestions here: https://github.com/BabylonJS/BabylonReactNative/pull/144#discussion_r564120706

chrisfromwork avatar Jan 26 '21 01:01 chrisfromwork

https://stackoverflow.com/questions/32894051/how-to-do-parallel-cmake-externalproject-builds#:~:text=When%20building%20a%20CMake%20project%20%28e.g.%20on%20Windows%29%2C,is%20not%20passed%20through%20to%20its%20build%20command.

@chrisfromwork It looks like it's possible for people to do this for themselves at config time. Is that sufficient, or do we believe this should be integrated more deeply into our provided offerings?

syntheticmagus avatar Jun 08 '21 20:06 syntheticmagus

@syntheticmagus I don't think your link is talking about the same thing as @chrisfromwork's link.

There are 3 types of parallelism when building on Windows that I'm aware of.

  1. Tell the VC++ compiler to use multiple processors (/MP)
  2. Tell MSBuild to use multiple processors (the /m switch).
  3. The one that @chrisfromwork mentioned is different than both of these but it appears to work together with 1.

None of these are guaranteed to make the build faster as they all depend on the build dependencies and the code base. It would be good to measure the performance to know whether it actually helps or not.

bghgary avatar Jun 08 '21 22:06 bghgary