I enabled PCH for one project. Added all commonly used headers(from C++ std lib and boost) into stdafx.h
, added stdafx.cpp
and included stdafx.h
there. I selected Create
in the properties of stdafx.cpp
and selected Use
in the project settings. Also I added stdafx.h
in the /FI
option - to avoid including stdafx.h
in every unit.
When I rebuild the whole project, it firstly complies stdafx.cpp
and the quickly the other *.cpp
files - it's OK, and it seems to be working. But if I change a file and then build the project, it takes lots lots of time to recompile that single file, comparably with rebuilding the whole project, so it seems that PCH doesn't work, or it rebuilds PCH file, or what?
What do I do wrong?