From a7cd9cec31952b932ab80fb50cddec28aab74736 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 24 Jul 2020 23:18:24 +0200 Subject: WIP --- wscript | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'wscript') diff --git a/wscript b/wscript index 72db83e2c..1c8fc4fd7 100644 --- a/wscript +++ b/wscript @@ -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 \n int main () {\n - ssh_session s = ssh_new ();\n + ssh_new ();\n return 0;\n } """, -- cgit v1.2.3