c++visual-studio-2008compiler-constructionbuild

How to optimize building speed in visual studio 2008


Could someone give me tips to increase building speed in visual studio 2008?
I have a large project with many module with full source. Every single time it's built, every files are rebuilt, some of them were not changed. Can i prevent these file to be rebuilt? I turned the property "Enable Minimum rebuild" /Gm on but the compiler threw this warning

Command line warning D9030 : '/Gm' is incompatible with multiprocessing; ignoring /MP switch

Every tips to increase building speed will help me much. Thanks,


Solution

  • One simple way is to compile in debug mode(aka zero optimizations), this of course is only for internal testing.

    you can also use precompiled headers* to speed up processing, or break off 'unchanging' segments into static libs, removing those from the recompile.

    *with /MP you need to create the precompiled header before doing multiprocess compilation, as /MP can read but not write according to MSDN