Skip to content

Commit

Permalink
Merge pull request #56 from eile/master
Browse files Browse the repository at this point in the history
Pass ARGS to ctest for tests target
  • Loading branch information
tribal-tec committed Nov 11, 2013
2 parents 82aab15 + a27e8c3 commit 98cf9aa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CommonCTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
message(STATUS "Need lcov >= 1.10 for gcc ${GCC_COMPILER_VERSION}, found lcov ${LCOV_VERSION}")
set(LCOV)
endif()
if($ENV{TRAVIS})
message(STATUS "Disable code coverage on Travis, causes build timeouts")
set(LCOV)
endif()

if(LCOV AND GENHTML)
set(COVERAGE ON)
Expand Down Expand Up @@ -74,7 +78,7 @@ foreach(FILE ${TEST_FILES})
endforeach(FILE ${TEST_FILES})

add_custom_target(runtests
COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS ${ALL_TESTS}
COMMAND ${CMAKE_CTEST_COMMAND} \${ARGS} DEPENDS ${ALL_TESTS}
COMMENT "Running all unit tests")

if(COVERAGE)
Expand All @@ -84,7 +88,7 @@ if(COVERAGE)
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
DEPENDS runtests)
add_custom_target(lcov-remove
COMMAND ${LCOV} -q --remove lcov.info 'tests/*' '/usr/*' '/opt/*' --output-file lcov2.info
COMMAND ${LCOV} -q --remove lcov.info 'tests/*' '/usr/*' '/opt/*' '*.l' 'CMake/test/*' '*/install/*' '/Applications/Xcode.app/*' '${CMAKE_BINARY_DIR}/*' --output-file lcov2.info
COMMENT "Cleaning up code coverage counters"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
DEPENDS lcov-gather)
Expand Down

0 comments on commit 98cf9aa

Please sign in to comment.