diff options
author | Jose <jose@zeroc.com> | 2017-02-01 23:16:30 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2017-02-01 23:16:30 +0100 |
commit | ca131951f8d81ea3da13277172a24234b5c848ea (patch) | |
tree | 28b8d9ad6a09f550ef43f3b24df8048da8e70d7d /cpp/src/Slice/Ruby.cpp | |
parent | Added entries for support of try-with-resources/with statement in Java/Python (diff) | |
download | ice-ca131951f8d81ea3da13277172a24234b5c848ea.tar.bz2 ice-ca131951f8d81ea3da13277172a24234b5c848ea.tar.xz ice-ca131951f8d81ea3da13277172a24234b5c848ea.zip |
Add --no-warn option to Slice compilers
Diffstat (limited to 'cpp/src/Slice/Ruby.cpp')
-rw-r--r-- | cpp/src/Slice/Ruby.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/Slice/Ruby.cpp b/cpp/src/Slice/Ruby.cpp index 7861bcb8c0b..7bd4dd07d17 100644 --- a/cpp/src/Slice/Ruby.cpp +++ b/cpp/src/Slice/Ruby.cpp @@ -81,6 +81,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" ; } @@ -105,6 +106,7 @@ Slice::Ruby::compile(const vector<string>& argv) opts.addOpt("", "underscore"); opts.addOpt("", "all"); opts.addOpt("", "checksum"); + opts.addOpt("", "no-warn"); vector<string> args; try @@ -169,6 +171,8 @@ Slice::Ruby::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; @@ -311,7 +315,7 @@ Slice::Ruby::compile(const vector<string>& argv) // // Generate the Ruby mapping. // - generate(u, all, checksum, includePaths, out); + generate(u, all, checksum, includePaths, out, warningLevel); out.close(); } |