From 8f8e9107c130366de96b2abd31b5bda0850aaa2e Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Thu, 20 Nov 2003 03:29:37 +0000 Subject: [PATCH] New option: -runtime Changed -c option to -noruntime. -c still works, but a warning is issued. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5352 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/Modules/main.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/SWIG/Source/Modules/main.cxx b/SWIG/Source/Modules/main.cxx index 256d792db..400be8fe1 100644 --- a/SWIG/Source/Modules/main.cxx +++ b/SWIG/Source/Modules/main.cxx @@ -54,7 +54,6 @@ extern String *ModuleName; static char *usage = (char*)"\ \nGeneral Options\n\ - -c - Produce raw wrapper code (omit support code)\n\ -c++ - Enable C++ processing\n\ -co - Check a file out of the SWIG library\n\ -D - Define a symbol (for conditional compilation)\n\ @@ -75,8 +74,10 @@ static char *usage = (char*)"\ -nodefault - Do not generate constructors/destructors\n\ -noexcept - Do not wrap exception specifiers\n\ -noextern - Do not generate extern declarations\n\ + -noruntime - Do not include SWIG runtime code\n\ -o - Set name of the output file to \n\ -outdir - Set language specific files output directory\n\ + -runtime - Make the runtime support code globally visible.\n\ -small - Compile in virtual elimination & compact mode\n\ -swiglib - Report location of SWIG library and exit\n\ -v - Run in verbose mode\n\ @@ -363,10 +364,16 @@ int SWIG_main(int argc, char *argv[], Language *l) { Wrapper_compact_print_mode_set(1); Wrapper_virtual_elimination_mode_set(1); Swig_mark_arg(i); - } else if (strcmp(argv[i],"-c") == 0) { + } else if ((strcmp(argv[i],"-noruntime") == 0) || (strcmp(argv[i],"-c") == 0)) { NoInclude=1; Preprocessor_define((DOH *) "SWIG_NOINCLUDE 1", 0); Swig_mark_arg(i); + if (strcmp(argv[i],"-c") == 0) { + Swig_warning(WARN_DEPRECATED_OPTC, "SWIG",1, "-c command line option is deprecated. Use -noruntime instead.\n"); + } + } else if ((strcmp(argv[i],"-runtime") == 0)) { + Preprocessor_define((String *) "SWIG_RUNTIME_MODE 1", 0); + Swig_mark_arg(i); } else if ((strcmp(argv[i],"-make_default") == 0) || (strcmp(argv[i],"-makedefault") == 0)) { GenerateDefault = 1; Swig_mark_arg(i);