c++ – Visual Studio: Possibility to persist PCH files on rebuild to reduce build time
PCH can not be reused. It should not be committed to source control, just like other build artifacts. It should be recreated not only on rebuilds or clean builds, but also every time any included header file changes or project settings change.
Commitment to somehow preserve and/or reuse precompiled header makes no sense. Its generation should take roughly the same amount of time as compilation of a single translation unit. So generation of precompiled header shouldn’t contribute significant amount of time to overall build time unless something is terribly wrong with included header files causing its compilation to take unreasonable amount of time.
Read more here: Source link
