Skip to content

Commit

Permalink
Allow warnings for cxx
Browse files Browse the repository at this point in the history
  • Loading branch information
joakim-hove committed May 30, 2018
1 parent 1e8ae31 commit 44fac41
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions travis/build_total.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -208,23 +208,29 @@ 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':
source_dir = basedir
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():
Expand Down

0 comments on commit 44fac41

Please sign in to comment.