summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2cpp/Main.cpp')
-rw-r--r--cpp/src/slice2cpp/Main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp
index 7378da1b118..83b19b943c9 100644
--- a/cpp/src/slice2cpp/Main.cpp
+++ b/cpp/src/slice2cpp/Main.cpp
@@ -88,6 +88,7 @@ usage(const string& n)
" deprecated: use instead [[\"ice-prefix\"]] metadata.\n"
"--underscore Allow underscores in Slice identifiers\n"
" deprecated: use instead [[\"underscore\"]] metadata.\n"
+ "--no-warn Disable all warnings.\n"
;
}
@@ -117,6 +118,7 @@ compile(const vector<string>& argv)
opts.addOpt("", "ice");
opts.addOpt("", "underscore");
opts.addOpt("", "checksum");
+ opts.addOpt("", "no-warn");
bool validate = find(argv.begin(), argv.end(), "--validate") != argv.end();
vector<string> args;
@@ -197,6 +199,8 @@ compile(const vector<string>& argv)
bool checksum = opts.isSet("checksum");
+ int warningLevel = opts.isSet("no-warn") ? 0 : 1;
+
if(args.empty())
{
consoleErr << argv[0] << ": error: no input file" << endl;
@@ -329,7 +333,7 @@ compile(const vector<string>& argv)
try
{
Gen gen(icecpp->getBaseName(), headerExtension, sourceExtension, extraHeaders, include,
- includePaths, dllExport, output, implCpp98, implCpp11, checksum, ice);
+ includePaths, dllExport, output, implCpp98, implCpp11, checksum, ice, warningLevel);
gen.generate(u);
}
catch(const Slice::FileException& ex)