1
votes

I'm using a precompiled headers in my project. precompile.h includes both *.h files I created and many *.h files from libraries that I never rebuild.

My question is that every time I edit one of my *.h files, it compiles the whole precompile.h file. This takes about 5 mins. (compiling after editing only a cpp file only takes 1 second.)

I know this is how precompiled headers work, but is there anyway to separate my header files, so that compiler only compiles my files?

1

1 Answers

5
votes

"...every time i edit one of my .h files..." - this suggests that you should move out these headers from precompiled header. Precompiled headers should include only headers that rarely change.