仓库源文站点原文


layout: post title: gcov lcov + cmake date: 2019-12-16 16:26 +0800 categories:


CMakeList

SET(CMAKE_CXX_FLAGS_DEBUG "-g -O0 --coverage -fprofile-arcs -ftest-coverage ${CMAKE_CXX_FLAGS_DEBUG}")

after build, check

CMakeFiles/xxx.dir/*.gcno

run test

lcov -c -o test.info -d .

genhtml test.info -o result

python -m http.server 4000