Precompiled header and MSBuild

I have a pre-compiled header that needs to be included on top of every .cpp in my project. I am afraid that I will spend a lot of time explaining and fixing this in my colleagues' code.

Is there an MSBuild way I can do for #include "stdafx.h"

the top of all my .cpp files so you don't have to do it manually?

+3


source to share


1 answer


You have compiler option / FI pathname

which actually add #include "pathname"

to the first line of the file.



Note: The equivalent for gcc is -include path

.

+5


source







All Articles