Skip to content
Snippets Groups Projects
Commit 4e68a258 authored by Ian Bell's avatar Ian Bell
Browse files

One more update to code coverage

parent f1b63f39
No related branches found
No related tags found
No related merge requests found
......@@ -103,12 +103,13 @@ else()
endif()
if (TEQP_COVERAGE)
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_BINARY_DIR}" CACHE INTERNAL "This path")
# See also http://stackoverflow.com/a/16536401 (a detailed guide on using gcov with cmake)
include(CodeCoverage)
SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
setup_target_for_coverage(teqp_coverage catch_tests coverage)
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_BINARY_DIR}" CACHE INTERNAL "This path")
# See also http://stackoverflow.com/a/16536401 (a detailed guide on using gcov with cmake)
include(CodeCoverage)
append_coverage_compiler_flags()
setup_target_for_coverage_gcovr_html(
NAME teqp_coverage
EXECUTABLE catch_tests
BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
endif()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment