Create a custom build matrix which passes -Werror to the clang build
via a make variable. (Using a configure variable does not currently
work, as some of our configure test programs generate warnings.)
Also set the language to C++ (so we use clang++ for the C++ test
programs and not g++ when compiling with clang), and turn on the
maintainer-mode checks for the Travis build.
-language: c
+language: c++
sudo: required
dist: trusty
-compiler:
- - clang
- - gcc
+matrix:
+ include:
+ - compiler: clang
+ env: MAKEVARS=CPPFLAGS=-Werror
+ - compiler: gcc
before_install:
- sudo apt-get update -qq
- sudo make install
- cd ../..
-script: cd src && autoreconf && ./configure --with-ldap && make && make check
+script: cd src && autoreconf && ./configure --enable-maintainer-mode --with-ldap && make $MAKEVARS && make check