forked from enlightenment/efl
autotools: fix code coverage on OSX
OSX uses clang as a default compiler instead of gcc. Gcov does not exist for clang, but clang has an alternative which requires additional compilier and linker flags. Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
2d338afb7c
commit
aca6fc8c36
|
@ -327,8 +327,10 @@ EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
|
|||
if test "${want_coverage}" = "yes" ; then
|
||||
AC_CHECK_PROG([have_lcov], [lcov], [yes], [no])
|
||||
if test "x${have_lcov}" = "xyes" ; then
|
||||
EFLALL_COV_CFLAGS="${EFLALL_COV_CFLAGS} -fprofile-arcs -ftest-coverage"
|
||||
EFLALL_COV_LIBS="${EFLALL_COV_LIBS} -lgcov"
|
||||
AC_SEARCH_LIBS([gcov], [_gcov_init])
|
||||
EFL_CHECK_COMPILER_FLAGS([EFLALL], [-fprofile-arcs -ftest-coverage])
|
||||
EFL_CHECK_COMPILER_FLAGS([EFLALL], [-fprofile-instr-generate -fcoverage-mapping])
|
||||
EFL_CHECK_LINKER_FLAGS([EFLALL], [-fprofile-instr-generate -fcoverage-mapping])
|
||||
if test "x${prefer_assert}" = "xno"; then
|
||||
EFLALL_COV_CFLAGS="${EFLALL_COV_CFLAGS} -DNDEBUG"
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue