Add missing command line options to documentation
Options were taken from the output of running swig -help.
This commit is contained in:
parent
9defd8e033
commit
849512f565
2 changed files with 121 additions and 53 deletions
|
|
@ -103,63 +103,131 @@ To run SWIG, use the <tt>swig</tt> command with options and a filename like this
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="shell"><pre>
|
<div class="shell"><pre>
|
||||||
swig [ <em>options</em> ] filename
|
swig [ options ] filename
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
where <tt>filename</tt> is a SWIG interface file or a C/C++ header file.
|
where <tt>filename</tt> is a SWIG interface file or a C/C++ header file.
|
||||||
Below is a subset of <em>options</em> that can be used.
|
Full help can be seen by running <tt>swig -help</tt>.
|
||||||
|
Below is the common set of options that can be used.
|
||||||
Additional options are also defined for each target language. A full list
|
Additional options are also defined for each target language. A full list
|
||||||
can be obtained by typing <tt>swig -help</tt> or <tt>swig
|
can be obtained by running <tt>swig
|
||||||
<em>-<lang></em> -help</tt> for language <em><lang></em> specific options.
|
<em>-<lang></em> -help</tt> for language <em><lang></em> specific options,
|
||||||
|
for example, <tt>swig -ruby -help</tt> for Ruby.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="shell"><pre>
|
<div class="shell"><pre>
|
||||||
-allegrocl Generate ALLEGROCL wrappers
|
Supported Target Language Options
|
||||||
-chicken Generate CHICKEN wrappers
|
-allegrocl - Generate ALLEGROCL wrappers
|
||||||
-clisp Generate CLISP wrappers
|
-chicken - Generate CHICKEN wrappers
|
||||||
-cffi Generate CFFI wrappers
|
-clisp - Generate CLISP wrappers
|
||||||
-csharp Generate C# wrappers
|
-cffi - Generate CFFI wrappers
|
||||||
-d Generate D wrappers
|
-csharp - Generate C# wrappers
|
||||||
-go Generate Go wrappers
|
-d - Generate D wrappers
|
||||||
-guile Generate Guile wrappers
|
-go - Generate Go wrappers
|
||||||
-java Generate Java wrappers
|
-guile - Generate Guile wrappers
|
||||||
-javascript Generate Javascript wrappers
|
-java - Generate Java wrappers
|
||||||
-lua Generate Lua wrappers
|
-javascript - Generate Javascript wrappers
|
||||||
-modula3 Generate Modula 3 wrappers
|
-lua - Generate Lua wrappers
|
||||||
-mzscheme Generate Mzscheme wrappers
|
-modula3 - Generate Modula 3 wrappers
|
||||||
-ocaml Generate Ocaml wrappers
|
-mzscheme - Generate Mzscheme wrappers
|
||||||
-octave Generate Octave wrappers
|
-ocaml - Generate Ocaml wrappers
|
||||||
-perl Generate Perl wrappers
|
-octave - Generate Octave wrappers
|
||||||
-php7 Generate PHP7 wrappers
|
-perl - Generate Perl wrappers
|
||||||
-pike Generate Pike wrappers
|
-php7 - Generate PHP7 wrappers
|
||||||
-python Generate Python wrappers
|
-pike - Generate Pike wrappers
|
||||||
-r Generate R (aka GNU S) wrappers
|
-python - Generate Python wrappers
|
||||||
-ruby Generate Ruby wrappers
|
-r - Generate R (aka GNU S) wrappers
|
||||||
-scilab Generate Scilab wrappers
|
-ruby - Generate Ruby wrappers
|
||||||
-sexp Generate Lisp S-Expressions wrappers
|
-scilab - Generate Scilab wrappers
|
||||||
-tcl Generate Tcl wrappers
|
-sexp - Generate Lisp S-Expressions wrappers
|
||||||
-uffi Generate Common Lisp / UFFI wrappers
|
-tcl - Generate Tcl wrappers
|
||||||
-xml Generate XML wrappers
|
-uffi - Generate Common Lisp / UFFI wrappers
|
||||||
|
-xml - Generate XML wrappers
|
||||||
|
|
||||||
-c++ Enable C++ processing
|
Experimental Target Language Options
|
||||||
-cppext <em>ext</em> Change file extension of C++ generated files to <em>ext</em>
|
|
||||||
(default is cxx)
|
|
||||||
-D<em>symbol</em> Define a preprocessor symbol
|
|
||||||
-Fmicrosoft Display error/warning messages in Microsoft format
|
|
||||||
-Fstandard Display error/warning messages in commonly used format
|
|
||||||
-help Display all options
|
|
||||||
-I<em>dir</em> Add a directory to the file include path
|
|
||||||
-l<em>ifile</em> Include SWIG library file <ifile>
|
|
||||||
-module <em>name</em> Set the name of the SWIG module
|
|
||||||
-o <em>outfile</em> Set name of C/C++ output file to <outfile>
|
|
||||||
-oh <em>headfile</em> Set name of C++ output header file for directors to <headfile>
|
|
||||||
-outcurrentdir Set default output dir to current dir instead of input file's path
|
|
||||||
-outdir <em>dir</em> Set language specific files output directory
|
|
||||||
-pcreversion Display PCRE version information
|
|
||||||
-swiglib Report location of SWIG library and exit
|
|
||||||
-version Display SWIG version number
|
|
||||||
|
|
||||||
|
General Options
|
||||||
|
-addextern - Add extra extern declarations
|
||||||
|
-c++ - Enable C++ processing
|
||||||
|
-co <file> - Check <file> out of the SWIG library
|
||||||
|
-copyctor - Automatically generate copy constructors wherever possible
|
||||||
|
-cpperraswarn - Treat the preprocessor #error statement as #warning (default)
|
||||||
|
-cppext <ext> - Change file extension of generated C++ files to <ext>
|
||||||
|
(default is cxx)
|
||||||
|
-copyright - Display copyright notices
|
||||||
|
-debug-classes - Display information about the classes found in the interface
|
||||||
|
-debug-module <n>- Display module parse tree at stages 1-4, <n> is a csv list of stages
|
||||||
|
-debug-symtabs - Display symbol tables information
|
||||||
|
-debug-symbols - Display target language symbols in the symbol tables
|
||||||
|
-debug-csymbols - Display C symbols in the symbol tables
|
||||||
|
-debug-lsymbols - Display target language layer symbols
|
||||||
|
-debug-tags - Display information about the tags found in the interface
|
||||||
|
-debug-template - Display information for debugging templates
|
||||||
|
-debug-top <n> - Display entire parse tree at stages 1-4, <n> is a csv list of stages
|
||||||
|
-debug-typedef - Display information about the types and typedefs in the interface
|
||||||
|
-debug-typemap - Display typemap debugging information
|
||||||
|
-debug-tmsearch - Display typemap search debugging information
|
||||||
|
-debug-tmused - Display typemaps used debugging information
|
||||||
|
-directors - Turn on director mode for all the classes, mainly for testing
|
||||||
|
-dirprot - Turn on wrapping of protected members for director classes (default)
|
||||||
|
-D<symbol> - Define a symbol <symbol> (for conditional compilation)
|
||||||
|
-E - Preprocess only, does not generate wrapper code
|
||||||
|
-external-runtime [file] - Export the SWIG runtime stack
|
||||||
|
-fakeversion <v>- Make SWIG fake the program version number to <v>
|
||||||
|
-fcompact - Compile in compact mode
|
||||||
|
-features <list>- Set global features, where <list> is a comma separated list of
|
||||||
|
features, eg -features directors,autodoc=1
|
||||||
|
If no explicit value is given to the feature, a default of 1 is used
|
||||||
|
-fastdispatch - Enable fast dispatch mode to produce faster overload dispatcher code
|
||||||
|
-Fmicrosoft - Display error/warning messages in Microsoft format
|
||||||
|
-Fstandard - Display error/warning messages in commonly used format
|
||||||
|
-fvirtual - Compile in virtual elimination mode
|
||||||
|
-help - Display help
|
||||||
|
-I- - Don't search the current directory
|
||||||
|
-I<dir> - Look for SWIG files in directory <dir>
|
||||||
|
-ignoremissing - Ignore missing include files
|
||||||
|
-importall - Follow all #include statements as imports
|
||||||
|
-includeall - Follow all #include statements
|
||||||
|
-l<ifile> - Include SWIG library file <ifile>
|
||||||
|
-macroerrors - Report errors inside macros
|
||||||
|
-makedefault - Create default constructors/destructors (the default)
|
||||||
|
-M - List all dependencies
|
||||||
|
-MD - Is equivalent to `-M -MF <file>', except `-E' is not implied
|
||||||
|
-MF <file> - Generate dependencies into <file> and continue generating wrappers
|
||||||
|
-MM - List dependencies, but omit files in SWIG library
|
||||||
|
-MMD - Like `-MD', but omit files in SWIG library
|
||||||
|
-module <name> - Set module name to <name>
|
||||||
|
-MP - Generate phony targets for all dependencies
|
||||||
|
-MT <target> - Set the target of the rule emitted by dependency generation
|
||||||
|
-nocontract - Turn off contract checking
|
||||||
|
-nocpperraswarn - Do not treat the preprocessor #error statement as #warning
|
||||||
|
-nodefault - Do not generate default constructors nor default destructors
|
||||||
|
-nodefaultctor - Do not generate implicit default constructors
|
||||||
|
-nodefaultdtor - Do not generate implicit default destructors
|
||||||
|
-nodirprot - Do not wrap director protected members
|
||||||
|
-noexcept - Do not wrap exception specifiers
|
||||||
|
-nofastdispatch - Disable fast dispatch mode (default)
|
||||||
|
-nopreprocess - Skip the preprocessor step
|
||||||
|
-notemplatereduce - Disable reduction of the typedefs in templates
|
||||||
|
-O - Enable the optimization options:
|
||||||
|
-fastdispatch -fvirtual
|
||||||
|
-o <outfile> - Set name of C/C++ output file to <outfile>
|
||||||
|
-oh <headfile> - Set name of C++ output header file for directors to <headfile>
|
||||||
|
-outcurrentdir - Set default output dir to current dir instead of input file's path
|
||||||
|
-outdir <dir> - Set language specific files output directory to <dir>
|
||||||
|
-pcreversion - Display PCRE version information
|
||||||
|
-small - Compile in virtual elimination and compact mode
|
||||||
|
-swiglib - Report location of SWIG library and exit
|
||||||
|
-templatereduce - Reduce all the typedefs in templates
|
||||||
|
-v - Run in verbose mode
|
||||||
|
-version - Display SWIG version number
|
||||||
|
-Wall - Remove all warning suppression, also implies -Wextra
|
||||||
|
-Wallkw - Enable keyword warnings for all the supported languages
|
||||||
|
-Werror - Treat warnings as errors
|
||||||
|
-Wextra - Adds the following additional warnings: 202,309,403,405,512,321,322
|
||||||
|
-w<list> - Suppress/add warning messages, eg -w401,+321 - see Warnings.html
|
||||||
|
-xmlout <file> - Write XML version of the parse tree to <file> after normal processing
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ static const char *usage2 = (const char *) "\
|
||||||
-Fmicrosoft - Display error/warning messages in Microsoft format\n\
|
-Fmicrosoft - Display error/warning messages in Microsoft format\n\
|
||||||
-Fstandard - Display error/warning messages in commonly used format\n\
|
-Fstandard - Display error/warning messages in commonly used format\n\
|
||||||
-fvirtual - Compile in virtual elimination mode\n\
|
-fvirtual - Compile in virtual elimination mode\n\
|
||||||
-help - This output\n\
|
-help - Display help\n\
|
||||||
-I- - Don't search the current directory\n\
|
-I- - Don't search the current directory\n\
|
||||||
-I<dir> - Look for SWIG files in directory <dir>\n\
|
-I<dir> - Look for SWIG files in directory <dir>\n\
|
||||||
-ignoremissing - Ignore missing include files\n\
|
-ignoremissing - Ignore missing include files\n\
|
||||||
|
|
@ -130,14 +130,14 @@ static const char *usage3 = (const char *) "\
|
||||||
";
|
";
|
||||||
|
|
||||||
static const char *usage4 = (const char *) "\
|
static const char *usage4 = (const char *) "\
|
||||||
-O - Enable the optimization options: \n\
|
-O - Enable the optimization options:\n\
|
||||||
-fastdispatch -fvirtual \n\
|
-fastdispatch -fvirtual\n\
|
||||||
-o <outfile> - Set name of C/C++ output file to <outfile>\n\
|
-o <outfile> - Set name of C/C++ output file to <outfile>\n\
|
||||||
-oh <headfile> - Set name of C++ output header file for directors to <headfile>\n\
|
-oh <headfile> - Set name of C++ output header file for directors to <headfile>\n\
|
||||||
-outcurrentdir - Set default output dir to current dir instead of input file's path\n\
|
-outcurrentdir - Set default output dir to current dir instead of input file's path\n\
|
||||||
-outdir <dir> - Set language specific files output directory to <dir>\n\
|
-outdir <dir> - Set language specific files output directory to <dir>\n\
|
||||||
-pcreversion - Display PCRE version information\n\
|
-pcreversion - Display PCRE version information\n\
|
||||||
-small - Compile in virtual elimination & compact mode\n\
|
-small - Compile in virtual elimination and compact mode\n\
|
||||||
-swiglib - Report location of SWIG library and exit\n\
|
-swiglib - Report location of SWIG library and exit\n\
|
||||||
-templatereduce - Reduce all the typedefs in templates\n\
|
-templatereduce - Reduce all the typedefs in templates\n\
|
||||||
-v - Run in verbose mode\n\
|
-v - Run in verbose mode\n\
|
||||||
|
|
@ -155,9 +155,9 @@ Options can also be defined using the SWIG_FEATURES environment variable, for ex
|
||||||
$ export SWIG_FEATURES\n\
|
$ export SWIG_FEATURES\n\
|
||||||
$ swig -python interface.i\n\
|
$ swig -python interface.i\n\
|
||||||
\n\
|
\n\
|
||||||
is equivalent to: \n\
|
is equivalent to:\n\
|
||||||
\n\
|
\n\
|
||||||
$ swig -Wall -python interface.i \n\
|
$ swig -Wall -python interface.i\n\
|
||||||
\n\
|
\n\
|
||||||
Arguments may also be passed in a file, separated by whitespace. For example:\n\
|
Arguments may also be passed in a file, separated by whitespace. For example:\n\
|
||||||
\n\
|
\n\
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue