views:

239

answers:

1

How would it be possible to configure VC++/Solution/Projects to rebuild all but the precompiled headers?

+1  A: 

At first i thought it might be possible by initially building your project (Creating the PCH file), then going into the stdafx.cpp properties (the file that is typically the one that causes the PCH to get built) and setting it to be excluded from the build.

But that isn't workable because the PDB file is linked to the pre-compiled file internally - if you then clean/rebuild your project (after excluding the stdafx.cpp) the PDB will get recreated and then the compiler will complain that the PCH doesn't match the PDB build.

Perhaps you could explain why it is you want to do this?

Ruddy
Well, it just doesn't seem to make much sense building the unchanged PCH from scratch every time I trigger a rebuild. I asked out of pure curiosity. Thought maybe there was an easy solution I haven't found. Thanks for your answer!
Marcin Seredynski