Lines Matching +full:gcov +full:- +full:exec
1 # This file is part of CMake-codecov.
4 # 2015-2017 RWTH Aachen University, Federal Republic of Germany
8 # Written by Alexander Haase, alexander.haase@rwth-aachen.de
21 # Search for Gcov which is used by Lcov.
22 find_package(Gcov)
64 set(GENHTML_CPPFILT_FLAG "--demangle-cpp")
67 # enable no-external flag for lcov, if available.
70 execute_process(COMMAND ${GENINFO_BIN} --help OUTPUT_VARIABLE GENINFO_HELP)
73 set(FLAG "--no-external")
109 COMMAND ${LCOV_BIN} --quiet -a ${OUTFILE}.raw --output-file ${OUTFILE}
110 --base-directory ${PROJECT_SOURCE_DIR} ${LCOV_EXTRA_FLAGS}
111 COMMAND ${LCOV_BIN} --quiet -r ${OUTFILE} ${LCOV_REMOVE_PATTERNS}
112 --output-file ${OUTFILE} ${LCOV_EXTRA_FLAGS}
114 COMMENT "Post-processing ${FILE_REL}"
124 if (NOT TARGET lcov-capture-init)
125 add_custom_target(lcov-capture-init)
127 endif (NOT TARGET lcov-capture-init)
137 # have to determine which gcov binary to use.
152 # If no gcov binary was found, coverage data can't be evaluated.
170 --quiet --base-directory ${PROJECT_SOURCE_DIR} --initial
171 --gcov-tool ${GCOV_BIN} --output-filename ${OUTFILE}
180 set(LCOV_EXTRA_FLAGS "--initial")
182 add_custom_target(${TNAME}-capture-init ALL DEPENDS ${OUTFILE})
184 # add geninfo file generation to global lcov-geninfo target
185 add_dependencies(lcov-capture-init ${TNAME}-capture-init)
205 add_custom_target(lcov-geninfo-init ALL DEPENDS ${OUTFILE}
206 lcov-capture-init
215 if (NOT TARGET lcov-capture)
216 add_custom_target(lcov-capture)
218 endif (NOT TARGET lcov-capture)
228 # have to determine which gcov binary to use.
243 # If no gcov binary was found, coverage data can't be evaluated.
262 COMMAND test -f "${TDIR}/${FILE}.gcda"
263 && ${GCOV_ENV} ${GENINFO_BIN} --quiet --base-directory
264 ${PROJECT_SOURCE_DIR} --gcov-tool ${GCOV_BIN}
265 --output-filename ${OUTFILE} ${GENINFO_EXTERN_FLAG}
268 DEPENDS ${TNAME} ${TNAME}-capture-init
276 add_custom_target(${TNAME}-geninfo DEPENDS ${OUTFILE})
278 # add geninfo file generation to global lcov-capture target
279 add_dependencies(lcov-capture ${TNAME}-geninfo)
286 add_custom_target(${TNAME}-genhtml
287 COMMAND ${GENHTML_BIN} --quiet --sort --prefix ${PROJECT_SOURCE_DIR}
288 --baseline-file ${LCOV_DATA_PATH_INIT}/${TNAME}.info
289 --output-directory ${LCOV_HTML_PATH}/${TNAME}
290 --title "${CMAKE_PROJECT_NAME} - target ${TNAME}"
292 DEPENDS ${TNAME}-geninfo ${TNAME}-capture-init
310 add_custom_target(lcov-geninfo DEPENDS ${OUTFILE} lcov-capture)
314 # <TARGET>-geninfo and <TARGET>-genhtml for each target. It will also be
320 COMMAND ${GENHTML_BIN} --quiet --sort
321 --baseline-file ${LCOV_DATA_PATH_INIT}/all_targets.info
322 --output-directory ${LCOV_HTML_PATH}/all_targets
323 --title "${CMAKE_PROJECT_NAME}" --prefix "${PROJECT_SOURCE_DIR}"
325 DEPENDS lcov-geninfo-init lcov-geninfo
334 # instead of calling <TARGET>-genhtml for each target (to create an own report
336 # all targets, so you have to call <TARGET>-geninfo to generate the info files
337 # the targets you'd like to have in your report or lcov-geninfo for generating
338 # info files for all targets before calling lcov-genhtml.
340 if (NOT TARGET lcov-genhtml)
341 add_custom_target(lcov-genhtml
343 --quiet
344 --output-directory ${LCOV_HTML_PATH}/selected_targets
345 --title \"${CMAKE_PROJECT_NAME} - targets `find
346 ${LCOV_DATA_PATH_CAPTURE} -name \"*.info\" ! -name
347 \"all_targets.info\" -exec basename {} .info \\\;`\"
348 --prefix ${PROJECT_SOURCE_DIR}
349 --sort
351 `find ${LCOV_DATA_PATH_CAPTURE} -name \"*.info\" ! -name
354 endif (NOT TARGET lcov-genhtml)