cotire icon indicating copy to clipboard operation
cotire copied to clipboard

no support for multi-core builds for Visual Studio

Open kolomenkin opened this issue 9 years ago • 1 comments

Hi,

Documentation states cotire supports multi-core builds for Visual Studio. But I don't see this even in examples.

You need to add /MP compiler flag for each source or whole project in order to enable compilation of few C++ files at the same time.

"/MP (Build with Multiple Processes)": https://msdn.microsoft.com/en-us/library/bb385193.aspx

For some reason /MP is always off by default in MSVC and you need to enable it manually.

You may be also interested in additional multi processor options: https://msdn.microsoft.com/en-us/library/dn655038.aspx https://msdn.microsoft.com/en-us/library/dn631956.aspx

But /MP is the most important one.

I can prepare a pull request if needed.

kolomenkin avatar Dec 28 '16 11:12 kolomenkin

I'm not sure this should be owned by Cotire. The /MP switch is added by the project developers (for instance, I add it /MP to my MSVC project driven by CMake), but I don't think Cotire should automatically add the flag (that's asking for trouble).

The documentation isn't wrong per-say. Adding Cotire to an MSVC build that uses /MP doesn't cause any issues; it is compatible, it just doesn't set it up automatically. Perhaps the documentation should be more clear about this.

andyleejordan avatar Mar 09 '17 20:03 andyleejordan