diff options
author | Rodney Dawes <rodney.dawes@canonical.com> | 2017-02-10 17:08:56 +0000 |
---|---|---|
committer | Bileto Bot <ci-train-bot@canonical.com> | 2017-02-10 17:08:56 +0000 |
commit | e012ca961ab230034856a64e4d24ce5db57ead6c (patch) | |
tree | 7bc93c71a46cf01b3ad153015e3c3d6f2e307549 /CMakeLists.txt | |
parent | 7a9c9e064e2f26a863a4474d0ae5d83e3c5b27ff (diff) | |
parent | 349c453f99aa11cea482f5078e7427e8c5e03b27 (diff) | |
download | ayatana-indicator-display-e012ca961ab230034856a64e4d24ce5db57ead6c.tar.gz ayatana-indicator-display-e012ca961ab230034856a64e4d24ce5db57ead6c.tar.bz2 ayatana-indicator-display-e012ca961ab230034856a64e4d24ce5db57ead6c.zip |
Make coverage reporting work.
Approved by: Pete Woods, unity-api-1-bot
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 77e2cbf..27a074b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,9 +13,6 @@ add_definitions( set(SERVICE_LIB ${PACKAGE}) set(SERVICE_EXEC "${PACKAGE}-service") -option(enable_tests "Build the package's automatic tests." ON) -option(enable_coverage "Generate code coverage reports." ON) - ## ## GNU standard paths ## @@ -67,22 +64,22 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") list(APPEND CXX_WARNING_ARGS -Wall -Wextra -Wpedantic) endif() -add_compile_options(-std=c++14 -fPIC -g) +add_compile_options(-std=c++14 -fPIC) + +add_subdirectory(src) +add_subdirectory(data) +add_subdirectory(po) ## ## Testing & Coverage ## -if(${enable_tests}) - enable_testing() - if(${enable_coverage}) - find_package(CoverageReport) - endif() -endif() +enable_testing() +add_subdirectory(tests) +find_package(CoverageReport) +ENABLE_COVERAGE_REPORT( + TARGETS ${SERVICE_LIB} ${SERVICE_EXEC} + TESTS ${COVERAGE_TEST_TARGETS} + FILTER /usr/include ${CMAKE_BINARY_DIR}/* +) -add_subdirectory(src) -add_subdirectory(data) -add_subdirectory(po) -if (${enable_tests}) - add_subdirectory(tests) -endif () |