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:
parent
ef631a0961
commit
6afc1dc3a0
@ -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()
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user