Skip to content

Commit b007a22

Browse files
committed
Revert changes, add exclusion
1 parent 2e929fd commit b007a22

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmake/modules/coverage-lcov.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
1818
# workaround lcov and clang --coverage have a version mismatch
1919
set(GCOV_TOOL --gcov-tool ${CMAKE_BINARY_DIR}/scripts/llvm-gcov.sh)
2020
# these autogenerated file in build/* causes error when using llvm-cov gcov (should be fine with gcc),
21-
# finally, CallSite.h should not be measured (extracted from LLVM 10 code base)
22-
set(GCOV_WORKAROUND --ignore-errors unused --rc branch_coverage=1 --rc derive_function_end_line=0 --exclude *mpi_interceptor_rt.c --exclude */Version.cpp)
21+
set(GCOV_WORKAROUND --rc branch_coverage=1 --rc derive_function_end_line=0 --exclude *mpi_interceptor_rt.c --exclude */Version.cpp)
22+
if(${LLVM_VERSION_MAJOR} GREATER_EQUAL 18)
23+
# LCOV version dependent but suffices for Action CI
24+
set(GCOV_WORKAROUND --erase-functions __cxx_global_var_init " ${GCOV_WORKAROUND}")
25+
endif()
2326
endif()
2427

2528
add_custom_target(

0 commit comments

Comments
 (0)