File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -89,13 +89,15 @@ if(ZLIB_BUILD_STATIC)
8989 endforeach (ver RANGE 11 99)
9090
9191 find_program (GCOV_EXECUTABLE NAMES ${llvm_names} )
92+
9293 set (llvm_option "gcov" )
94+ set (compile_opts -rtlib=compiler_rt)
9395 endif (${CMAKE_C_COMPILER_ID} STREQUAL "Clang" )
9496
9597 add_executable (infcover infcover.c)
9698 target_link_libraries (infcover ZLIB::ZLIBSTATIC)
97- target_compile_options (infcover PRIVATE -coverage)
98- target_link_options (infcover PRIVATE -coverage)
99+ target_compile_options (infcover PRIVATE -- coverage ${compile_opts} )
100+ target_link_options (infcover PRIVATE -- coverage)
99101 target_compile_definitions (
100102 infcover PRIVATE $<$<BOOL :${HAVE___ATTR__VIS_HIDDEN} >:HAVE_HIDDEN>)
101103 add_test (NAME zlib-coverage COMMAND infcover)
You can’t perform that action at this time.
0 commit comments