From 71294535f4176c44c033561d407952d1d0bdd9bd Mon Sep 17 00:00:00 2001 From: Marc Laukien Date: Sat, 6 Oct 2001 16:21:05 +0000 Subject: IceUtil::Exception --- cpp/src/slice2cpp/Main.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'cpp/src/slice2cpp/Main.cpp') 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 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(); -- cgit v1.2.3