diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-07-24 23:18:24 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-07-24 23:18:24 +0200 |
| commit | a7cd9cec31952b932ab80fb50cddec28aab74736 (patch) | |
| tree | 041018e7b337d9f9ceb7d1e651af0a0424b21f8b /wscript | |
| parent | 73ebb92e9df01ba7afb97121b6e2cef6ca13a18e (diff) | |
Diffstat (limited to 'wscript')
| -rw-r--r-- | wscript | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -75,6 +75,7 @@ def options(opt): opt.add_option('--variant', help='build variant (swaroop-studio, swaroop-theater)', choices=['swaroop-studio', 'swaroop-theater']) opt.add_option('--use-lld', action='store_true', default=False, help='use lld linker') opt.add_option('--enable-disk', action='store_true', default=False, help='build dcpomatic2_disk tool; requires Boost process, lwext4 and nanomsg libraries') + opt.add_option('--warnings-are-errors', action='store_true', default=False, help='build with -Werror') def configure(conf): conf.load('compiler_cxx') @@ -113,6 +114,9 @@ def configure(conf): '-Wno-parentheses', '-D_FILE_OFFSET_BITS=64']) + if conf.options.warnings_are_errors: + conf.env.append_value('CXXFLAGS', '-Werror') + if conf.options.force_cpp11: conf.env.append_value('CXXFLAGS', ['-std=c++11', '-DBOOST_NO_CXX11_SCOPED_ENUMS']) @@ -325,7 +329,7 @@ def configure(conf): conf.check_cc(fragment=""" #include <libssh/libssh.h>\n int main () {\n - ssh_session s = ssh_new ();\n + ssh_new ();\n return 0;\n } """, |
