diff options
author | Marc Laukien <marc@zeroc.com> | 2001-10-06 16:21:05 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-10-06 16:21:05 +0000 |
commit | 71294535f4176c44c033561d407952d1d0bdd9bd (patch) | |
tree | f5067365849f934c14ff75add1e13f06384ade6e /cpp/src/slice2cpp/Main.cpp | |
parent | fixes (diff) | |
download | ice-71294535f4176c44c033561d407952d1d0bdd9bd.tar.bz2 ice-71294535f4176c44c033561d407952d1d0bdd9bd.tar.xz ice-71294535f4176c44c033561d407952d1d0bdd9bd.zip |
IceUtil::Exception
Diffstat (limited to 'cpp/src/slice2cpp/Main.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Main.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp index b277edeadfa..5ae2b4b44ee 100644 --- a/cpp/src/slice2cpp/Main.cpp +++ b/cpp/src/slice2cpp/Main.cpp @@ -27,6 +27,7 @@ usage(const char* n) "-UNAME Remove any definition for NAME.\n" "-IDIR Put DIR in the include file search path.\n" "--include-dir DIR Use DIR as the header include directory.\n" + "--output-dir DIR Create files in the directory DIR.\n" "--dll-export SYMBOL Use SYMBOL for DLL exports.\n" "-d, --debug Print debug messages.\n" ; @@ -38,6 +39,7 @@ main(int argc, char* argv[]) string cpp("cpp"); vector<string> includePaths; string include; + string output; string dllExport; bool debug = false; @@ -107,6 +109,22 @@ main(int argc, char* argv[]) } argc -= 2; } + else if (strcmp(argv[idx], "--output-dir") == 0) + { + if (idx + 1 >= argc) + { + cerr << argv[0] << ": argument expected for`" << argv[idx] << "'" << endl; + usage(argv[0]); + return EXIT_FAILURE; + } + + output = argv[idx + 1]; + for (int i = idx ; i + 2 < argc ; ++i) + { + argv[i] = argv[i + 2]; + } + argc -= 2; + } else if (strcmp(argv[idx], "--dll-export") == 0) { if (idx + 1 >= argc) @@ -196,7 +214,7 @@ main(int argc, char* argv[]) } else { - Gen gen(argv[0], base, include, includePaths, dllExport); + Gen gen(argv[0], base, include, includePaths, dllExport, output); if (!gen) { unit->destroy(); |