[PATCH v3 1/3] Allow gcov on Mac
Vladimir Davydov
vdavydov.dev at gmail.com
Tue Apr 10 13:49:47 MSK 2018
On Tue, Apr 10, 2018 at 11:31:44AM +0300, Vladislav Shpilevoy wrote:
> For this it is enough to remove HAVE_GCOV. It checks for gcov
> library existance, but the library is unused anyway.
>
> Enabled gcov can be run locally on Mac now.
> ---
> cmake/profile.cmake | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/cmake/profile.cmake b/cmake/profile.cmake
> index 278399155..c82fc0168 100644
> --- a/cmake/profile.cmake
> +++ b/cmake/profile.cmake
> @@ -1,14 +1,7 @@
> -check_library_exists (gcov __gcov_flush "" HAVE_GCOV)
> -
> set(ENABLE_GCOV_DEFAULT OFF)
> option(ENABLE_GCOV "Enable integration with gcov, a code coverage program" ${ENABLE_GCOV_DEFAULT})
>
> if (ENABLE_GCOV)
> - if (NOT HAVE_GCOV)
> - message (FATAL_ERROR
> - "ENABLE_GCOV option requested but gcov library is not found")
> - endif()
> -
I don't understand this. We call __gcov_flush() in tarantool_free() if
ENABLE_GCOV is set so we must check that this function exists and AFAIU
the check you're suggesting to remove does that...
> add_compile_flags("C;CXX"
> "-fprofile-arcs"
> "-ftest-coverage"
> @@ -18,8 +11,6 @@ if (ENABLE_GCOV)
> set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ftest-coverage")
> set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs")
> set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ftest-coverage")
> -
> - # add_library(gcov SHARED IMPORTED)
> endif()
>
> if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
More information about the Tarantool-patches
mailing list