trying to get coverage in travis

This commit is contained in:
Hans Dembinski 2016-05-07 01:08:55 -04:00
parent 4ace3158c2
commit d222ab74e8
2 changed files with 9 additions and 11 deletions

View File

@ -30,13 +30,8 @@ before_install:
# Install packages
install:
- conda install --yes numpy nose
# Coverage packages are on my binstar channel
# - conda install --yes -c dan_blanchard python-coveralls nose-cov
- pip install --user cpp-coveralls
# before_script:
# - export PATH=$HOME/.local/bin:$PATH
# - pip install numpy --user `whoami`
# - conda install --yes -c dan_blanchard python-coveralls nose-cov
script:
cd build && cmake . -DCOVERAGE=ON && make -j2 && make test

View File

@ -28,14 +28,17 @@ else()
add_definitions(-O3 -fomit-frame-pointer -mtune=generic)
endif()
if(COVERAGE)
message(STATUS "Coverage build enabled")
add_definitions(-coverage)
endif()
include_directories(../include ${Boost_INCLUDE_DIRS})
set(LIBRARIES stdc++ m ${Boost_LIBRARIES})
if(COVERAGE)
message(STATUS "Coverage build enabled")
add_definitions(--coverage)
set(CMAKE_EXE_LINKER_FLAGS --coverage)
set(CMAKE_SHARED_LINKER_FLAGS --coverage)
# set(LIBRARIES ${LIBRARIES} gcov)
endif()
# core library
add_library(boost_histogram SHARED
../src/axis.cpp