The VS-IDE will write //{{NO_DEPENDENCIES}}
to resource header files.
This comment is actually a feature that prevents (unnecessary) rebuilding of cpp files that include the resource header.
But, like stated in the MSDN, this can lead to "undesirable side-effects".
In our project we do have the resource.h
included in the stdafx.h
for pre-compilation. Unfortunately the precompiled header is not rebuild, if the resource file changes...
If the NO_DEPENDENCIES is removed, it works (but it's written again, if resources are changed via IDE).
Is there a way to prevent the IDE from writing //{{NO_DEPENDENCIES}}
to the resource.h
file every time the file was changed?
I think the best way would be to exclude the resource.h
from the precompiled header file and re-include them in the needed .h and .cpp files. This way only the affected files would need to be (manually!) rebuild and not all files (which would happen, if the pch is recompiled).
Any comments?