Jump to content
  • Advertisement
Sign in to follow this  
beebs1

Multithreaded Compilation / MSVS

This topic is 3459 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hiya, I remember a while back Microsoft introduced a 'multithreaded compilation' switch for the C++ compiler in VS. It would let you compile several source files in parallel. It doesn't seem to be available under the project settings, and my searches keep bringing up tutorials on multithreaded programming... Does anyone remember what the switch is or VS2009? My compilation times are hitting 15 minutes or more... :( Cheers, James

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by beebs1
Hiya,

I remember a while back Microsoft introduced a 'multithreaded compilation' switch for the C++ compiler in VS. It would let you compile several source files in parallel.

It doesn't seem to be available under the project settings, and my searches keep bringing up tutorials on multithreaded programming...

Does anyone remember what the switch is or VS2009? My compilation times are hitting 15 minutes or more... :(

Cheers,
James


From what i remember the "multithread" functionality is just a parallel build of multiple projects in the same solution (if they have no dependency relation). It does not need any configuration, it is enabled by default for any multicore machine.
Anyway 15 minutes is really a lot, what are you compiling?

Share this post


Link to post
Share on other sites
Multithreaded building of c/cpp files in one project was officially introduced in VS2008, although it also works in VS2005 (also in Express editions).

You should simply add /MP switch to custom C++ compilation options.

Share this post


Link to post
Share on other sites
Multithreaded I don't know, but there is a switch to make Visual Studio compile source files in multiple processes. The /MP switch. Add that into the Advanced section for compilation and see if that does the trick. There are some other compilation flags that aren't compatible with this one, but I use this for all my builds and it really speeds things up for the big ones.

More info: http://msdn.microsoft.com/en-us/library/bb385193.aspx

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!