There are some ways to improve VC++ project compile time.
Firstly, through using #pragma once directive and #ifdef guard.
Although, #pragma once is not standard, it can be recognized in MS VC++ compiler. Furthermore, it does not try to open itself, whereas #ifdef guard opens header file once, and then, if the symbol is defined, not load.
However, when I apply #pragma once in my project, I couldn't find distinct different result.
Before applying #pragma once, I was using #ifdef guard only, the build time was approximately 3 minute more.
After applying that, although the build time was shortened about several seconds, I'm not sure if there was any chance.
Second method is forwarding declaration. It means, if you just use pointer or reference of class as a class member in your header file, you don't need to include the header file which is declared the class.
And using 'impl' pattern is another well-known method, but if goal is just decreasing compile time, it may be cumbersome work in terms of additional writing code.
First of all, to turn of
'/MP' switch is the most fastest and simplest method to improve build speed. '/MP' means 'build with multiple processes. In vs2010, the MP switch is turn off in default because it conflicts /Gm(Enable Minimum Rebuild).
When I turned on /MP switch, my project's compile time was shortened over 3 minutes to under one minute.