mirror of
https://github.com/swaywm/sway.git
synced 2026-04-28 06:46:26 -04:00
Simplify code coverage implementation
This commit is contained in:
parent
074238e9f4
commit
8758a2bd04
5 changed files with 30 additions and 196 deletions
|
|
@ -1,5 +1,3 @@
|
|||
find_package(A2X REQUIRED)
|
||||
|
||||
function(configure_test)
|
||||
set(options)
|
||||
set(oneValueArgs NAME SUBPROJECT)
|
||||
|
|
@ -25,7 +23,7 @@ function(configure_test)
|
|||
list(APPEND CONFIGURE_TEST_WRAPPERS "malloc" "calloc" "realloc" "free")
|
||||
|
||||
if (enable-coverage)
|
||||
add_compile_options(-g -O0 --coverage -fprofile-arcs -ftest-coverage)
|
||||
add_definitions(-g -O0 --coverage -fprofile-arcs -ftest-coverage)
|
||||
endif()
|
||||
|
||||
list(LENGTH CONFIGURE_TEST_WRAPPERS WRAPPED_COUNT)
|
||||
|
|
@ -51,10 +49,5 @@ function(configure_test)
|
|||
|
||||
if (enable-coverage)
|
||||
target_link_libraries(${CONFIGURE_TEST_NAME}_test gcov)
|
||||
setup_target_for_coverage(
|
||||
${CONFIGURE_TEST_NAME}_cov
|
||||
${CONFIGURE_TEST_NAME}_test
|
||||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/coverage
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue