mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-24 06:28:12 +08:00
Add code coverage support. (#378)
This commit is contained in:
8
cmake/ftxui_coverage.cmake
Normal file
8
cmake/ftxui_coverage.cmake
Normal file
@@ -0,0 +1,8 @@
|
||||
function(ftxui_check_coverage library)
|
||||
if (FTXUI_ENABLE_COVERAGE)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
|
||||
target_compile_options(${library} INTERFACE --coverage -O0 -g)
|
||||
target_link_libraries(${library} INTERFACE --coverage)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
Reference in New Issue
Block a user