mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09:00
Rework the coverage build
This reworks it to avoid a need to special build type and adding the flags only to the targets that need it (skipping testing wrappers which break with them). It also updates the CodeCoverage module from the following URL: https://github.com/bilke/cmake-modules/blob/master/CodeCoverage.cmake Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -12,6 +12,9 @@ add_library(testserver STATIC
|
||||
test_server.c
|
||||
default_cb.c
|
||||
sftpserver_cb.c)
|
||||
if (WITH_COVERAGE)
|
||||
append_coverage_compiler_flags_to_target(testserver)
|
||||
endif (WITH_COVERAGE)
|
||||
|
||||
set(LIBSSH_SERVER_TESTS
|
||||
# torture_server_kbdint
|
||||
@@ -29,10 +32,10 @@ if (UNIX AND NOT WIN32)
|
||||
add_executable(test_server ${server_SRCS})
|
||||
target_compile_options(test_server PRIVATE ${DEFAULT_C_COMPILE_FLAGS})
|
||||
target_link_libraries(test_server
|
||||
testserver
|
||||
ssh::ssh
|
||||
${ARGP_LIBRARIES}
|
||||
util)
|
||||
PRIVATE testserver ssh::ssh ${ARGP_LIBRARIES} util)
|
||||
if (WITH_COVERAGE)
|
||||
append_coverage_compiler_flags_to_target(test_server)
|
||||
endif (WITH_COVERAGE)
|
||||
endif ()
|
||||
|
||||
endif (WITH_SERVER AND UNIX AND NOT WIN32)
|
||||
|
||||
Reference in New Issue
Block a user