Skip to content

Auto Remove GCDA Files #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ if(NOT_SUBPROJECT)
if(NOT MSVC)
target_compile_options(errors_test PRIVATE --coverage -O0 -fno-exceptions)
target_link_options(errors_test PRIVATE --coverage)

get_target_property(errors_test_SOURCES errors_test SOURCES)
foreach(SOURCE ${errors_test_SOURCES})
set(GCDA ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/errors_test.dir/${SOURCE}.gcda)
add_custom_command(
TARGET errors_test PRE_LINK
COMMAND ${CMAKE_COMMAND} -E rm -f ${GCDA}
)
endforeach()
endif()

catch_discover_tests(errors_test)
Expand Down
9 changes: 9 additions & 0 deletions components/format/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ if(NOT_SUBPROJECT)
if(NOT MSVC)
target_compile_options(errors_format_test PRIVATE --coverage -O0 -fno-exceptions)
target_link_options(errors_format_test PRIVATE --coverage)

get_target_property(errors_format_test_SOURCES errors_format_test SOURCES)
foreach(SOURCE ${errors_format_test_SOURCES})
set(GCDA ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/errors_format_test.dir/${SOURCE}.gcda)
add_custom_command(
TARGET errors_format_test PRE_LINK
COMMAND ${CMAKE_COMMAND} -E rm -f ${GCDA}
)
endforeach()
endif()

catch_discover_tests(errors_format_test)
Expand Down