From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 10 Apr 2018 13:49:47 +0300 From: Vladimir Davydov Subject: Re: [PATCH v3 1/3] Allow gcov on Mac Message-ID: <20180410104947.zuodblo2j2o5ilra@esperanza> References: <8e2a74bb3e83159c0e300638a5b7891b05edacc3.1523349020.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8e2a74bb3e83159c0e300638a5b7891b05edacc3.1523349020.git.v.shpilevoy@tarantool.org> To: Vladislav Shpilevoy Cc: tarantool-patches@freelists.org, kshcherbatov@tarantool.org List-ID: 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")