forked from Exiv2/exiv2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Compiles and runs * Created gcovr reports in separate directory * Improved style and degree of coverage * Added error check for existence of gcovr * CI test fixes
- Loading branch information
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
if(BUILD_WITH_COVERAGE) | ||
|
||
find_program (GCOVR gcovr) | ||
|
||
if(GCOVR) | ||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/coverage_output ) | ||
add_custom_command(OUTPUT _run_gcovr_parser | ||
POST_BUILD | ||
COMMAND ${GCOVR} --root ${CMAKE_SOURCE_DIR} --object-dir=${CMAKE_BINARY_DIR} --html --html-details -o coverage_output/coverage.html | ||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
) | ||
add_custom_target (coverage DEPENDS _run_gcovr_parser) | ||
endif() | ||
|
||
endif(BUILD_WITH_COVERAGE) |