Reputation: 1198
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?
Upvotes: 1
Views: 283
Reputation: 9526
"...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.
Upvotes: 5