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 /python/modules/IcePy/Slice.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 'python/modules/IcePy/Slice.cpp')
-rw-r--r-- | python/modules/IcePy/Slice.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/modules/IcePy/Slice.cpp b/python/modules/IcePy/Slice.cpp index b1544ebf5f0..937d2ae344c 100644 --- a/python/modules/IcePy/Slice.cpp +++ b/python/modules/IcePy/Slice.cpp @@ -74,6 +74,7 @@ IcePy_loadSlice(PyObject* /*self*/, PyObject* args) opts.addOpt("", "underscore"); opts.addOpt("", "checksum"); opts.addOpt("", "all"); + opts.addOpt("", "no-warn"); vector<string> files; try @@ -132,6 +133,8 @@ IcePy_loadSlice(PyObject* /*self*/, PyObject* args) all = opts.isSet("all"); checksum = opts.isSet("checksum"); + int warningLevel = opts.isSet("no-warn") ? 0 : 1; + bool ignoreRedefs = false; bool keepComments = true; @@ -169,7 +172,7 @@ IcePy_loadSlice(PyObject* /*self*/, PyObject* args) // It must be the first or second line. // out << "# -*- coding: utf-8 -*-\n"; - generate(u, all, checksum, includePaths, out); + generate(u, all, checksum, includePaths, out, warningLevel); u->destroy(); string code = codeStream.str(); |