diff options
author | Rodney Dawes <rodney.dawes@canonical.com> | 2017-02-08 04:37:24 +0000 |
---|---|---|
committer | Bileto Bot <ci-train-bot@canonical.com> | 2017-02-08 04:37:24 +0000 |
commit | 7d52a7a008b0281f702d236cbc74f180328a9114 (patch) | |
tree | 5b0d10c6736e47674c53e2e2b9d9791fb7d3081a /cmake | |
parent | 396d3bebd994f204f0052f015360009d3bd1493f (diff) | |
parent | 47be95adcf9600979cbe0b3bb3269a6b9041efb2 (diff) | |
download | ayatana-indicator-sound-7d52a7a008b0281f702d236cbc74f180328a9114.tar.gz ayatana-indicator-sound-7d52a7a008b0281f702d236cbc74f180328a9114.tar.bz2 ayatana-indicator-sound-7d52a7a008b0281f702d236cbc74f180328a9114.zip |
Use coverage support from cmake-extras.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Coverage.cmake | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/cmake/Coverage.cmake b/cmake/Coverage.cmake deleted file mode 100644 index 22a0d29..0000000 --- a/cmake/Coverage.cmake +++ /dev/null @@ -1,37 +0,0 @@ -if (CMAKE_BUILD_TYPE MATCHES coverage) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage") - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} --coverage") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage") - - find_program(GCOVR_EXECUTABLE gcovr HINTS ${GCOVR_ROOT} "${GCOVR_ROOT}/bin") - if (NOT GCOVR_EXECUTABLE) - message(STATUS "Gcovr binary was not found, can not generate XML coverage info.") - else () - message(STATUS "Gcovr found, can generate XML coverage info.") - add_custom_target (coverage-xml - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMAND "${GCOVR_EXECUTABLE}" --exclude="test.*" --exclude="obj.*" -x -r "${CMAKE_SOURCE_DIR}" - --object-directory=${CMAKE_BINARY_DIR} -o coverage.xml) - endif() - - find_program(LCOV_EXECUTABLE lcov HINTS ${LCOV_ROOT} "${GCOVR_ROOT}/bin") - find_program(GENHTML_EXECUTABLE genhtml HINTS ${GENHTML_ROOT}) - if (NOT LCOV_EXECUTABLE) - message(STATUS "Lcov binary was not found, can not generate HTML coverage info.") - else () - if(NOT GENHTML_EXECUTABLE) - message(STATUS "Genthml binary not found, can not generate HTML coverage info.") - else() - message(STATUS "Lcov and genhtml found, can generate HTML coverage info.") - add_custom_target (coverage-html - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMAND "${LCOV_EXECUTABLE}" --capture --output-file "${CMAKE_BINARY_DIR}/coverage.info" --no-checksum --directory "${CMAKE_BINARY_DIR}" - COMMAND "${LCOV_EXECUTABLE}" --remove "${CMAKE_BINARY_DIR}/coverage.info" '/usr/*' --output-file "${CMAKE_BINARY_DIR}/coverage.info" - COMMAND "${LCOV_EXECUTABLE}" --remove "${CMAKE_BINARY_DIR}/coverage.info" '${CMAKE_BINARY_DIR}/*' --output-file "${CMAKE_BINARY_DIR}/coverage.info" - COMMAND "${LCOV_EXECUTABLE}" --remove "${CMAKE_BINARY_DIR}/coverage.info" '${CMAKE_SOURCE_DIR}/tests/*' --output-file "${CMAKE_BINARY_DIR}/coverage.info" - COMMAND "${GENHTML_EXECUTABLE}" --prefix "${CMAKE_BINARY_DIR}" --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info - ) - endif() - endif() -endif() |