FTXUI/cmake/ftxui_coverage.cmake

9 lines
322 B
CMake
Raw Permalink Normal View History

2022-04-17 21:47:20 +08:00
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()