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 )