mirror of
https://github.com/libssh2/libssh2.git
synced 2026-01-27 00:18:12 +03:00
cmake: make clean-coverage target portable
By using cmake's built-in commands instead of expecting the shell to support `rm -rf`. Closes #1647
This commit is contained in:
@@ -167,8 +167,13 @@ add_custom_target(coverage
|
||||
COMMAND gcovr --root "${PROJECT_SOURCE_DIR}" --exclude tests/* --html-details
|
||||
--output "${CMAKE_CURRENT_BINARY_DIR}/coverage/index.html")
|
||||
|
||||
add_custom_target(clean-coverage
|
||||
COMMAND rm -rf "${CMAKE_CURRENT_BINARY_DIR}/coverage")
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.17)
|
||||
add_custom_target(clean-coverage COMMAND ${CMAKE_COMMAND} -E rm -rf --
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/coverage")
|
||||
else()
|
||||
add_custom_target(clean-coverage COMMAND ${CMAKE_COMMAND} -E remove_directory
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/coverage")
|
||||
endif()
|
||||
|
||||
libssh2_add_target_to_copy_dependencies(
|
||||
TARGET copy_test_dependencies
|
||||
|
||||
Reference in New Issue
Block a user