I am not an expert at SWIG, but I look at both the documentation for the latest version and the source code (in particular, at Source/Modules/main.cxx , where command line arguments are read), it is clear that such a parameter does not exist (not even hidden).
On the other hand, if you feel that you can easily change the source code to do this.
You can add a new command line option to the main.cxx file to add file names for exclusion, and then compare those names to find a match. You can add a global function to the Source/Preprocessor/preprocessor.h file, which is already included in main.cxx .
The code for the -includeall parameter is in Source/Preprocessor/cpp.c This file also has a global variable called include_all , which is set to 1 when the analog argument is given on the command line (it will help you find where such an option is executed).
Now in the Preprocessor_parse(...) function you can find where the header files are analyzed (starting from line 1715 for version 3.0.12):
s1 = cpp_include(fn, sysfile); if (s1) { }
You will be interested in the String *Swig_last_file(void) function, which will return the file name of the header line just processed.
s1 = cpp_include(fn, sysfile); if (s1) { int found = 0; String* filename = Swig_last_file(); if (!found) { } Delete(s1); }
I know this is not a complete solution, but hope can help you achieve your desired behavior.
source share