Enable coveralls measurement

pull/1067/head
Kim Kulling 2016-11-16 12:24:55 +01:00
parent 76794f4aa7
commit 53d6adeb53
3 changed files with 11 additions and 6 deletions

View File

@ -20,10 +20,10 @@ env:
global: global:
- PV=r8e PLATF=linux-x86_64 NDK_HOME=${TRAVIS_BUILD_DIR}/android-ndk-${PV} PATH=${PATH}:${NDK_HOME} - PV=r8e PLATF=linux-x86_64 NDK_HOME=${TRAVIS_BUILD_DIR}/android-ndk-${PV} PATH=${PATH}:${NDK_HOME}
matrix: matrix:
- LINUX=1 TRAVIS_NO_EXPORT=YES - LINUX=1 TRAVIS_NO_EXPORT=YES ASSIMP_COVERALLS=ON
- LINUX=1 TRAVIS_NO_EXPORT=NO - LINUX=1 TRAVIS_NO_EXPORT=NO ASSIMP_COVERALLS=ON
- LINUX=1 SHARED_BUILD=ON - LINUX=1 SHARED_BUILD=ON ASSIMP_COVERALLS=ON
- LINUX=1 SHARED_BUILD=OFF - LINUX=1 SHARED_BUILD=OFF ASSIMP_COVERALLS=ON
- ANDROID=1 - ANDROID=1
language: cpp language: cpp

View File

@ -76,6 +76,11 @@ OPTION ( ASSIMP_BUILD_TESTS
"If the test suite for Assimp is built in addition to the library." "If the test suite for Assimp is built in addition to the library."
ON ON
) )
OPTION ( ASSIMP_COVERALLS
"Eańable this to measure test coverage."
OFF
)
IF(MSVC) IF(MSVC)
set (CMAKE_PREFIX_PATH "D:\\libs\\devil") set (CMAKE_PREFIX_PATH "D:\\libs\\devil")
OPTION( ASSIMP_INSTALL_PDB OPTION( ASSIMP_INSTALL_PDB
@ -173,7 +178,7 @@ ELSEIF( CMAKE_COMPILER_IS_MINGW )
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -Wno-long-long -pedantic -std=c++11" ) SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -Wno-long-long -pedantic -std=c++11" )
ENDIF() ENDIF()
if (COVERALLS) if (ASSIMP_COVERALLS)
include(Coveralls) include(Coveralls)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")

View File

@ -122,7 +122,7 @@ ENDIF( WIN32 )
target_link_libraries( unit assimp ${platform_libs} ) target_link_libraries( unit assimp ${platform_libs} )
add_subdirectory(headercheck) add_subdirectory(headercheck)
if (COVERALLS) if (ASSIMP_COVERALLS)
set(COVERAGE_SRCS ${assimp_src} ${TEST_SRCS} ) set(COVERAGE_SRCS ${assimp_src} ${TEST_SRCS} )
# Create the coveralls target. # Create the coveralls target.