From 44fac41f8ed222d3e6b023101c53ab1c6684656b Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Wed, 30 May 2018 10:13:56 +0200 Subject: [PATCH] Allow warnings for cxx --- travis/build_total.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/travis/build_total.py b/travis/build_total.py index a802c71ac99..7e4c7584cd5 100755 --- a/travis/build_total.py +++ b/travis/build_total.py @@ -23,7 +23,7 @@ def call(args): exit('subprocess.call error:\n\tcode %d\n\targs %s' % (status, arg_str)) -def build(source_dir, install_dir, test, c_flags="", test_flags=None): +def build(source_dir, install_dir, test, c_flags, cxx_flags, test_flags=None): build_dir = os.path.join(source_dir, "build") if not os.path.isdir(build_dir): os.makedirs(build_dir) @@ -208,7 +208,8 @@ def compile_ecl(self, basedir, install_dir): test = (self.repository == 'ecl') c_flags = "-Werror=all" - build(source_dir, install_dir, test, c_flags=c_flags, test_flags=self.test_flags) + cxx_flags = "-Werror -Wno-unused-result" + build(source_dir, install_dir, test, c_flags, cxx_flags, test_flags=self.test_flags) def compile_res(self, basedir, install_dir): if self.repository == 'res': @@ -216,15 +217,20 @@ def compile_res(self, basedir, install_dir): else: source_dir = os.path.join(basedir, "libres") test = (self.repository in ('ecl', 'res')) + # TODO add c_flags = "-Werror=all" - build(source_dir, install_dir, test, test_flags=self.test_flags) + c_flags = "" + cxx_flags = "" + build(source_dir, install_dir, test, c_flags, cxx_flags, test_flags=self.test_flags) def compile_ert(self, basedir, install_dir): if self.repository == 'ert': source_dir = basedir else: source_dir = os.path.join(basedir, "ert") - build(source_dir, install_dir, True, test_flags=self.test_flags) + c_flags = "" + cxx_flags = "" + build(source_dir, install_dir, True, c_flags, cxx_flags, test_flags=self.test_flags) def main():