summaryrefslogtreecommitdiff
path: root/cpp/src/slice2html/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2html/Main.cpp')
-rw-r--r--cpp/src/slice2html/Main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/slice2html/Main.cpp b/cpp/src/slice2html/Main.cpp
index ae2bfaa75ff..7b5a6562968 100644
--- a/cpp/src/slice2html/Main.cpp
+++ b/cpp/src/slice2html/Main.cpp
@@ -85,6 +85,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"
;
}
@@ -112,6 +113,7 @@ compile(const vector<string>& argv)
opts.addOpt("d", "debug");
opts.addOpt("", "ice");
opts.addOpt("", "underscore");
+ opts.addOpt("", "no-warn");
bool validate = find(argv.begin(), argv.end(), "--validate") != argv.end();
vector<string> args;
@@ -220,6 +222,8 @@ compile(const vector<string>& argv)
bool underscore = opts.isSet("underscore");
+ int warningLevel = opts.isSet("no-warn") ? 0 : 1;
+
if(args.empty())
{
consoleErr << argv[0] << ": error: no input file" << endl;
@@ -290,7 +294,7 @@ compile(const vector<string>& argv)
try
{
Slice::generate(p, output, header, footer, indexHeader, indexFooter, imageDir, logoURL,
- searchAction, indexCount, summaryCount);
+ searchAction, indexCount, summaryCount, warningLevel);
}
catch(const Slice::FileException& ex)
{