diff options
author | Rodney Dawes <rodney.dawes@canonical.com> | 2017-02-07 13:31:18 -0500 |
---|---|---|
committer | Rodney Dawes <rodney.dawes@canonical.com> | 2017-02-07 13:31:18 -0500 |
commit | 703381ce12b79211c64a8ded04222d277f25cb6e (patch) | |
tree | 1efdf525b921d858c46699601a8d8b937f06e545 /CMakeLists.txt | |
parent | 907fc24ba24962c0f30a9efe955dd5cb916c5492 (diff) | |
download | ayatana-indicator-display-703381ce12b79211c64a8ded04222d277f25cb6e.tar.gz ayatana-indicator-display-703381ce12b79211c64a8ded04222d277f25cb6e.tar.bz2 ayatana-indicator-display-703381ce12b79211c64a8ded04222d277f25cb6e.zip |
Make coverage reporting work.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 77e2cbf..7e4431a 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 ## @@ -69,20 +66,20 @@ endif() add_compile_options(-std=c++14 -fPIC -g) +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 () |