mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:57:45 +00:00
Meta: Allow collecting code coverage on Lagom
This commit is contained in:
parent
7fbc8bf719
commit
9966feab4d
2 changed files with 11 additions and 0 deletions
|
@ -34,3 +34,13 @@ add_linker_flag_if_supported(LINKER:--gdb-index)
|
|||
if (NOT ENABLE_FUZZERS)
|
||||
add_linker_flag_if_supported(LINKER:-Bsymbolic-non-weak-functions)
|
||||
endif()
|
||||
|
||||
if (ENABLE_LAGOM_COVERAGE_COLLECTION)
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang$" AND NOT ENABLE_FUZZERS)
|
||||
add_compile_options(-fprofile-instr-generate -fcoverage-mapping)
|
||||
add_link_options(-fprofile-instr-generate)
|
||||
else()
|
||||
message(FATAL_ERROR
|
||||
"Collecting code coverage is unsupported in this configuration.")
|
||||
endif()
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue