]> granicus.if.org Git - libatomic_ops/commitdiff
Travis CI: Test compilation of C tests as C++ ones
authorIvan Maidanski <ivmai@mail.ru>
Thu, 8 Feb 2018 22:14:51 +0000 (01:14 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 8 Feb 2018 22:14:51 +0000 (01:14 +0300)
.travis.yml

index 539fb18805e21cd2db11cab87e086241e83d1672..9d8573f35623357fb0c8ce9477822903623fb082 100644 (file)
@@ -262,6 +262,11 @@ matrix:
     - CSA_CHECK=true
     - MAKEFILE_TARGET=all
     - CFLAGS_EXTRA="-D AO_TRACE_MALLOC -D HAVE_MMAP -D VERBOSE"
+  - os: linux
+    compiler: gcc
+    env:
+    - CC_FOR_CHECK=g++
+    - MAKEFILE_TARGET=all
   - os: linux
     addons:
       apt:
@@ -511,6 +516,9 @@ script:
     make -j $MAKEFILE_TARGET CC=$CC CFLAGS_EXTRA="$CFLAGS_EXTRA"
             LDFLAGS="$LDFLAGS";
   fi
+- if [[ "$CC_FOR_CHECK" != "" ]]; then
+    make check CC=$CC_FOR_CHECK CFLAGS_EXTRA="$CFLAGS_EXTRA";
+  fi
 - if [ -f tests/test_atomic.log ]; then cat tests/test_atomic*.log; fi
 - if [[ "$CSA_CHECK" == true ]]; then
     ${CC} --analyze -Xanalyzer -analyzer-output=text -Werror -I src