From 21dfb2127f36096a1a9ae3f991424cb795276ade Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Thu, 27 Aug 2015 00:05:06 +0200 Subject: [PATCH] See if this gives us coverage support --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 27a88ddfe..90b10b7bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,13 @@ include_directories( core/synctex ) +option(BUILD_COVERAGE "Build the project with gcov support" OFF) + +if(BUILD_COVERAGE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov") +endif() + add_subdirectory( active ) add_subdirectory( ui ) add_subdirectory( shell )