I want the preprocessor to read in the includes of local headers, but ignore the includes of system headers. To put it another way, how do I get the preprocessor to skip ov
With clang you can do e.g.:
clang -Imyinclude -P -E -nostdinc -nobuiltininc main.cpp
There does not seem to be a way to preserve the system #include lines it cannot find though.
#include
This doesn't work for gcc, as its preprocessor will stop when using -nostdinc and it can't find an #included header file.
-nostdinc
#included