1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 03:32:36 +00:00

Support build with coverage for components and test suite

This commit is contained in:
elsid 2018-07-08 20:27:46 +03:00
parent ef631a0961
commit 6afc1dc3a0
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40
2 changed files with 10 additions and 0 deletions

View File

@ -26,4 +26,9 @@ if (GTEST_FOUND AND GMOCK_FOUND)
if (UNIX AND NOT APPLE)
target_link_libraries(openmw_test_suite ${CMAKE_THREAD_LIBS_INIT})
endif()
if (BUILD_WITH_CODE_COVERAGE)
add_definitions(--coverage)
target_link_libraries(openmw_test_suite gcov)
endif()
endif()

View File

@ -242,6 +242,11 @@ if (UNIX AND NOT APPLE)
target_link_libraries(components ${CMAKE_THREAD_LIBS_INIT})
endif()
if (BUILD_WITH_CODE_COVERAGE)
add_definitions(--coverage)
target_link_libraries(components gcov)
endif()
# Make the variable accessible for other subdirectories
set(COMPONENT_FILES ${COMPONENT_FILES} PARENT_SCOPE)