Install gcc-4.8 in travis matrix and test both 4.6 & 4.8

This commit is contained in:
Jason Turner 2014-03-25 08:12:07 -06:00
parent e8fcb3f68b
commit 0213039ee7
2 changed files with 11 additions and 4 deletions

View File

@ -1,15 +1,22 @@
language: cpp
compiler:
- gcc
env:
- GCC_VER=4.6
- GCC_VER=4.8
before_install:
- sudo pip install cpp-coveralls
- sudo pip install cpp-coveralls
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update
- sudo apt-get install -qq g++-4.8
- if [ "$GCC_VER" = "4.8" ]; then export CXX="g++-4.8" CC="gcc-4.8" GCOV="gcov-4.8"; export CXX="g++-4.6" CC="gcc-4.6" GCOV="gcov-4.6"; else fi
script:
- cmake -D ENABLE_COVERAGE:BOOL=TRUE -D CMAKE_BUILD_TYPE:STRING=Debug .
- make -j2
- make test
- mkdir gcov
- find CMakeFiles/ -name "*.gc*" -exec mv {} gcov/ \;
- gcov -d -o gcov gcov/*.gcda
- $GCOV -d -o gcov gcov/*.gcda
- coveralls -n -E ".*\.cpp"
notifications:
recipients:

View File

@ -88,8 +88,8 @@ if (CMAKE_COMPILER_IS_GNUCC)
endif()
if (ENABLE_COVERAGE)
add_definitions(-fprofile-arcs -ftest-coverage)
SET(EXTRA_LINKER_FLAGS ${EXTRA_LINKER_FLAGS} "-fprofile-arcs -ftest-coverage")
add_definitions(--coverage -O0)
SET(EXTRA_LINKER_FLAGS ${EXTRA_LINKER_FLAGS} "--coverage")
# SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "-fprofile-arcs -ftest-coverage")
endif()