summaryrefslogtreecommitdiff
path: root/cpp/src/slice2objc/Main.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2017-02-01 23:16:30 +0100
committerJose <jose@zeroc.com>2017-02-01 23:16:30 +0100
commitca131951f8d81ea3da13277172a24234b5c848ea (patch)
tree28b8d9ad6a09f550ef43f3b24df8048da8e70d7d /cpp/src/slice2objc/Main.cpp
parentAdded entries for support of try-with-resources/with statement in Java/Python (diff)
downloadice-ca131951f8d81ea3da13277172a24234b5c848ea.tar.bz2
ice-ca131951f8d81ea3da13277172a24234b5c848ea.tar.xz
ice-ca131951f8d81ea3da13277172a24234b5c848ea.zip
Add --no-warn option to Slice compilers
Diffstat (limited to 'cpp/src/slice2objc/Main.cpp')
-rw-r--r--cpp/src/slice2objc/Main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/slice2objc/Main.cpp b/cpp/src/slice2objc/Main.cpp
index 24ac096d92c..7877c072ca0 100644
--- a/cpp/src/slice2objc/Main.cpp
+++ b/cpp/src/slice2objc/Main.cpp
@@ -80,6 +80,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"
;
// Note: --case-sensitive is intentionally not shown here!
}
@@ -105,6 +106,7 @@ compile(const vector<string>& argv)
opts.addOpt("", "ice");
opts.addOpt("", "underscore");
opts.addOpt("", "case-sensitive");
+ opts.addOpt("", "no-warn");
bool validate = find(argv.begin(), argv.end(), "--validate") != argv.end();
@@ -173,6 +175,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] << ": no input file" << endl;
@@ -285,7 +289,8 @@ compile(const vector<string>& argv)
{
try
{
- Gen gen(argv[0], icecpp->getBaseName(), include, includePaths, output, dllExport);
+ Gen gen(argv[0], icecpp->getBaseName(), include, includePaths, output, dllExport,
+ warningLevel);
if(!gen)
{
u->destroy();