diff options
author | Michi Henning <michi@zeroc.com> | 2005-09-07 06:44:51 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2005-09-07 06:44:51 +0000 |
commit | 874a4e56e2a34579267eb9f1a01a56106b6bc37a (patch) | |
tree | df8d5800be0d94e794d171b65b6f34966ef6999b /cpp/src/slice2cppe/Main.cpp | |
parent | Bug 355 (diff) | |
download | ice-874a4e56e2a34579267eb9f1a01a56106b6bc37a.tar.bz2 ice-874a4e56e2a34579267eb9f1a01a56106b6bc37a.tar.xz ice-874a4e56e2a34579267eb9f1a01a56106b6bc37a.zip |
Bug 355.
Diffstat (limited to 'cpp/src/slice2cppe/Main.cpp')
-rw-r--r-- | cpp/src/slice2cppe/Main.cpp | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/cpp/src/slice2cppe/Main.cpp b/cpp/src/slice2cppe/Main.cpp index 39900a5f5a4..8553d059449 100644 --- a/cpp/src/slice2cppe/Main.cpp +++ b/cpp/src/slice2cppe/Main.cpp @@ -20,22 +20,23 @@ usage(const char* n) cerr << "Usage: " << n << " [options] slice-files...\n"; cerr << "Options:\n" - "-h, --help Show this message.\n" - "-v, --version Display the Ice version.\n" - "--header-ext EXT Use EXT instead of the default `h' extension.\n" - "--source-ext EXT Use EXT instead of the default `cpp' extension.\n" - "-DNAME Define NAME as 1.\n" - "-DNAME=DEF Define NAME as DEF.\n" - "-UNAME Remove any definition for NAME.\n" - "-IDIR Put DIR in the include file search path.\n" - "-E Print preprocessor output on stdout.\n" - "--include-dir DIR Use DIR as the header include directory in source files.\n" - "--output-dir DIR Create files in the directory DIR.\n" - "--dll-export SYMBOL Use SYMBOL for DLL exports.\n" - "--impl Generate sample implementations.\n" - "--depend Generate Makefile dependencies.\n" - "-d, --debug Print debug messages.\n" - "--ice Permit `Ice' prefix (for building Ice source code only)\n" + "-h, --help Show this message.\n" + "-v, --version Display the Ice version.\n" + "--header-ext EXT Use EXT instead of the default `h' extension.\n" + "--source-ext EXT Use EXT instead of the default `cpp' extension.\n" + "--add-header HDR[,GUARD] Add #include for HDR (with guard GUARD) to generated source file.\n" + "-DNAME Define NAME as 1.\n" + "-DNAME=DEF Define NAME as DEF.\n" + "-UNAME Remove any definition for NAME.\n" + "-IDIR Put DIR in the include file search path.\n" + "-E Print preprocessor output on stdout.\n" + "--include-dir DIR Use DIR as the header include directory in source files.\n" + "--output-dir DIR Create files in the directory DIR.\n" + "--dll-export SYMBOL Use SYMBOL for DLL exports.\n" + "--impl Generate sample implementations.\n" + "--depend Generate Makefile dependencies.\n" + "-d, --debug Print debug messages.\n" + "--ice Permit `Ice' prefix (for building Ice source code only)\n" ; // Note: --case-sensitive is intentionally not shown here! } @@ -60,6 +61,7 @@ main(int argc, char* argv[]) opts.addOpt("v", "version"); opts.addOpt("", "header-ext", IceUtil::Options::NeedArg, "h"); opts.addOpt("", "source-ext", IceUtil::Options::NeedArg, "cpp"); + opts.addOpt("", "add-header", IceUtil::Options::NeedArg, "", IceUtil::Options::Repeat); opts.addOpt("D", "", IceUtil::Options::NeedArg, "", IceUtil::Options::Repeat); opts.addOpt("U", "", IceUtil::Options::NeedArg, "", IceUtil::Options::Repeat); opts.addOpt("I", "", IceUtil::Options::NeedArg, "", IceUtil::Options::Repeat); @@ -99,6 +101,8 @@ main(int argc, char* argv[]) string headerExtension = opts.optArg("header-ext"); string sourceExtension = opts.optArg("source-ext"); + vector<string>extraHeaders = opts.argVec("add-header"); + if(opts.isSet("D")) { vector<string> optargs = opts.argVec("D"); @@ -199,7 +203,7 @@ main(int argc, char* argv[]) } else { - Gen gen(argv[0], icecpp.getBaseName(), headerExtension, sourceExtension, include, + Gen gen(argv[0], icecpp.getBaseName(), headerExtension, sourceExtension, extraHeaders, include, includePaths, dllExport, output, impl); if(!gen) { |