Provide -cppext as a general command line option

Provide -cppext as a general command line option for setting the
extension used for generated C++ files (previously it was specific
to the PHP backend).  Deprecate the equivalent -suffix option
provided by the Ocaml backend, but continue to support that for
now.
This commit is contained in:
Olly Betts 2015-01-08 10:54:37 +13:00
commit cd16059c66
5 changed files with 20 additions and 11 deletions

View file

@ -44,7 +44,6 @@
static const char *usage = "\
PHP Options (available with -php)\n\
-cppext <ext> - Change C++ file extension to <ext> (default is cpp)\n\
-noproxy - Don't generate proxy classes.\n\
-prefix <prefix> - Prepend <prefix> to all class names in PHP wrappers\n\
\n";
@ -221,15 +220,6 @@ public:
} else {
Swig_arg_error();
}
} else if (strcmp(argv[i], "-cppext") == 0) {
if (argv[i + 1]) {
SWIG_config_cppext(argv[i + 1]);
Swig_mark_arg(i);
Swig_mark_arg(i + 1);
i++;
} else {
Swig_arg_error();
}
} else if ((strcmp(argv[i], "-noshadow") == 0) || (strcmp(argv[i], "-noproxy") == 0)) {
shadow = 0;
Swig_mark_arg(i);