Skip to content

Commit

Permalink
fix(cmake): define ENABLE_GCOV when build with --enable_gcov (#793)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyifan27 authored Mar 17, 2021
1 parent 2ebdfce commit e2bf7c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ if(ENABLE_GCOV)
message(STATUS "Appending code coverage compiler flags: ${COVERAGE_COMPILER_FLAGS}")

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov")
add_definitions(-DENABLE_GCOV=1)
endif()

# Users don't have to configure CMAKE_INSTALL_PREFIX unless they want to customize
Expand Down

0 comments on commit e2bf7c7

Please sign in to comment.