aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMarius Gripsgard <marius@ubports.com>2020-08-15 01:04:38 +0200
committerMarius Gripsgard <marius@ubports.com>2020-08-15 01:04:38 +0200
commita17ce349a9185f22f73e20384547f6aae042bd78 (patch)
tree745f16d7319ef7cf9f3e9b6dce947758cf251e8a /cmake
parent3c9b1cef8c20c10b0aded37af6e231e78f3ddaae (diff)
downloadqmenumodel-a17ce349a9185f22f73e20384547f6aae042bd78.tar.gz
qmenumodel-a17ce349a9185f22f73e20384547f6aae042bd78.tar.bz2
qmenumodel-a17ce349a9185f22f73e20384547f6aae042bd78.zip
Use CoverageReport from cmake-extras
This gives us a much better coverage reports
Diffstat (limited to 'cmake')
-rw-r--r--cmake/lcov.cmake66
1 files changed, 0 insertions, 66 deletions
diff --git a/cmake/lcov.cmake b/cmake/lcov.cmake
deleted file mode 100644
index 152bbea..0000000
--- a/cmake/lcov.cmake
+++ /dev/null
@@ -1,66 +0,0 @@
-# - This module creates a new 'lcov' target which generates
-# a coverage analysis html output.
-# LCOV is a graphical front-end for GCC's coverage testing tool gcov. Please see
-# http://ltp.sourceforge.net/coverage/lcov.php
-#
-# Usage: you must add an option to your CMakeLists.txt to build your application
-# with coverage support. Then you need to include this file to the lcov target.
-#
-# Example:
-# IF(BUILD_WITH_COVERAGE)
-# SET(CMAKE_C_FLAGS "-g -O0 -Wall -fprofile-arcs -ftest-coverage")
-# SET(CMAKE_CXX_FLAGS "-g -O0 -Wall -fprofile-arcs -ftest-coverage")
-# SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage -lgcov")
-# include(${CMAKE_SOURCE_DIR}/cmake/lcov.cmake)
-# ENDIF(BUILD_WITH_COVERAGE)
-#=============================================================================
-# Copyright 2010 ascolab GmbH
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-set(REMOVE_PATTERN
- q*.h
- *.moc
- moc_*.cpp
- locale_facets.h
- new)
-
-## lcov target
-ADD_CUSTOM_TARGET(lcov)
-ADD_CUSTOM_COMMAND(TARGET lcov
- COMMAND mkdir -p coverage
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- )
-ADD_CUSTOM_COMMAND(TARGET lcov
- COMMAND lcov --directory . --zerocounters
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- )
-ADD_CUSTOM_COMMAND(TARGET lcov
- COMMAND make test
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- )
-ADD_CUSTOM_COMMAND(TARGET lcov
- COMMAND lcov --directory . --capture --output-file ./coverage/stap_all.info --no-checksum --compat-libtool
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- )
-ADD_CUSTOM_COMMAND(TARGET lcov
- COMMAND lcov --directory . -r ./coverage/stap_all.info ${REMOVE_PATTERN} --output-file ./coverage/stap.info
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- )
-ADD_CUSTOM_COMMAND(TARGET lcov
- COMMAND genhtml -o ./coverage --title "Code Coverage" --legend --show-details --demangle-cpp ./coverage/stap.info
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- )
-ADD_CUSTOM_COMMAND(TARGET lcov
- COMMAND echo "Open ${CMAKE_BINARY_DIR}/coverage/index.html to view the coverage analysis results."
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- )
-