I have a very large codebase (read: thousands of modules) that has code shared across numerous projects that all run on different operating systems with different C++ compil
Create a special folder for missing headers, and make that folder to be searched last
(that is compliler specific - last item in "INCLUDES" environment variable, something like that)
Then if some header1.h can be missing, create in that folder a stub
header1.h:
#define header1_is_missing
Now you can always write
#include
#ifdef header1_is_missing
// there is no header1.h
#endif