mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-31 00:45:36 +00:00
Support build with coverage for components and test suite
This commit is contained in:
parent
ef631a0961
commit
6afc1dc3a0
2 changed files with 10 additions and 0 deletions
|
@ -26,4 +26,9 @@ if (GTEST_FOUND AND GMOCK_FOUND)
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE)
|
||||||
target_link_libraries(openmw_test_suite ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(openmw_test_suite ${CMAKE_THREAD_LIBS_INIT})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (BUILD_WITH_CODE_COVERAGE)
|
||||||
|
add_definitions(--coverage)
|
||||||
|
target_link_libraries(openmw_test_suite gcov)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -242,6 +242,11 @@ if (UNIX AND NOT APPLE)
|
||||||
target_link_libraries(components ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(components ${CMAKE_THREAD_LIBS_INIT})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (BUILD_WITH_CODE_COVERAGE)
|
||||||
|
add_definitions(--coverage)
|
||||||
|
target_link_libraries(components gcov)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Make the variable accessible for other subdirectories
|
# Make the variable accessible for other subdirectories
|
||||||
set(COMPONENT_FILES ${COMPONENT_FILES} PARENT_SCOPE)
|
set(COMPONENT_FILES ${COMPONENT_FILES} PARENT_SCOPE)
|
||||||
|
|
Loading…
Reference in a new issue