We have large C++ project that we used to compile with the /MP switch to take advantage of multiple cores.
However, we recently brought in some code that uses #import on a couple of tlb's, and #import is incompatibile with /MP, which means we are back to single threaded builds and a lot more time to get coffee.
Any suggestions on how to get #import and /MP to play nice? Is there a tool that will statically generate the C++ headers from a #import as a pre-build step?
Update:
Following Matt's advice worked great. For anyone else stumbling over this in google:
- create a separate static lib project
- set up enough includes so you can put the
#import
statement in the lib project - make your main project dependent on the lib project (to ensure correct build order)
- add the lib project's temporary build folder to the include path for the main project
#include
the generated.tlh
files where you were doing the#import
- enable the
/MP
switch and lose the coffee break time...