Skip to content

Commit

Permalink
travis: for linux clang builds, use -Werror
Browse files Browse the repository at this point in the history
Somehow, autoconf thinks that the gcc in the Ubuntu "precise" image
that we use in Travis builds does not support C99 (i.e., the
AC_PROG_CC_C99 test comes back with "unsupported").  Hence, when we
use C99 constructs without the --std=c99 flag on the command line, it
results in a warning, and therefore -Werror fails.

Hence, we only use -Werror with clang on Linux.

Signed-off-by: Jeff Squyres <[email protected]>
  • Loading branch information
jsquyres committed Dec 9, 2016
1 parent 662283c commit 1b8b05d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ before_install:
install:
- ./autogen.sh
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then LIBRARY_CONFIGURE_ARGS="$LIBFABRIC_CONFIGURE_ARGS --enable-usnic"; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "gcc" ]]; then ./configure $LIBFABRIC_CONFIGURE_ARGS --enable-debug && make -j2; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && "`basename $CC`" == "clang" ]]; then ./configure CFLAGS="-Werror $CFLAGS" $LIBFABRIC_CONFIGURE_ARGS --enable-debug && make -j2; fi
- ./configure --prefix=$PREFIX --enable-direct=sockets --enable-udp=no --enable-psm=no --enable-gni=no --enable-psm2=no --enable-verbs=no --enable-usnic=no --enable-rxm=no --enable-rxd=no && make -j2
- ./configure --enable-sockets=dl --disable-udp --disable-rxm --disable-rxd --disable-verbs --disable-usnic --prefix=$PREFIX && make -j2 && make install && make test
- rm -rf $PREFIX
Expand Down

0 comments on commit 1b8b05d

Please sign in to comment.