fix travis

This commit is contained in:
Thomas Fussell 2015-11-21 10:57:45 -05:00
parent e9891cb814
commit e2eb98e8c9
2 changed files with 6 additions and 2 deletions

View File

@ -40,8 +40,8 @@ script:
after_success: after_success:
- if [ "$COMPILER" = "g++-4.9" ]; then rm -rf ./* ; fi - if [ "$COMPILER" = "g++-4.9" ]; then rm -rf ./* ; fi
- if [ "$COMPILER" = "g++-4.9" ]; then cmake -G "Unix Makefiles" -D SHARED=1 -D BUILD_TESTS=1 -D CMAKE_CXX_COMPILER=$COMPILER -D CMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage" ../cmake ; fi - if [ "$COMPILER" = "g++-4.9" ]; then cmake -G "Unix Makefiles" -D DEBUG=1 -D COVERAGE=1 -D SHARED=0 -D STATIC=1 -D BUILD_TESTS=1 -D CMAKE_CXX_COMPILER=$COMPILER ../cmake ; fi
- if [ "$COMPILER" = "g++-4.9" ]; then make ; fi - if [ "$COMPILER" = "g++-4.9" ]; then make VERBOSE=1 ; fi
- if [ "$COMPILER" = "g++-4.9" ]; then cd .. && ./bin/xlnt.test ; fi - if [ "$COMPILER" = "g++-4.9" ]; then cd .. && ./bin/xlnt.test ; fi
- if [ "$COMPILER" = "g++-4.9" ]; then coveralls --exclude bin --exclude build --exclude cmake --exclude docs --exclude include --exclude lib --exclude samples --include source --exclude tests --exclude third-party --gcov-options '\-lp' --gcov 'gcov-4.9' ; fi - if [ "$COMPILER" = "g++-4.9" ]; then coveralls --exclude bin --exclude build --exclude cmake --exclude docs --exclude include --exclude lib --exclude samples --include source --exclude tests --exclude third-party --gcov-options '\-lp' --gcov 'gcov-4.9' ; fi

View File

@ -13,6 +13,10 @@ option(BUILD_EXAMPLES "Build examples" OFF)
option(BUILD_TESTS "Build tests runner" OFF) option(BUILD_TESTS "Build tests runner" OFF)
option(COVERAGE "Create coverage files" OFF) option(COVERAGE "Create coverage files" OFF)
if(COVERAGE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
endif()
if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles") if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
if(DEBUG) if(DEBUG)
set(CMAKE_BUILD_TYPE "Debug") set(CMAKE_BUILD_TYPE "Debug")