~ted/ubuntu-app-launch/snappy-backend-no-snap

« back to all changes in this revision

Viewing changes to CMakeLists.txt

Updating to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
##########################
14
14
 
15
15
option (enable_tests "Build tests" ON)
16
 
option (enable_lcov "Generate Coverage Reports" ON)
17
16
 
18
17
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
19
18
 
28
27
include(GNUInstallDirs)
29
28
include(CheckIncludeFile)
30
29
include(CheckFunctionExists)
31
 
include(Coverage)
32
30
include(UseGlibGeneration)
33
31
include(UseGdbusCodegen)
34
32
include(UseConstantBuilder)
224
222
  set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..)
225
223
  set (GTEST_LIBS -lpthread)
226
224
  enable_testing ()
227
 
  if (${enable_lcov})
228
 
#    include(GCov)
229
 
  endif ()
230
225
  add_subdirectory(tests)
231
226
endif ()
232
227
 
 
228
include(EnableCoverageReport)
 
229
set(filter-list)
 
230
list(APPEND filter-list "/usr/include")
 
231
list(APPEND filter-list "${CMAKE_SOURCE_DIR}/tests/*")
 
232
if (NOT ${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
 
233
  list(APPEND filter-list "${CMAKE_BINARY_DIR}/*")
 
234
endif()
 
235
ENABLE_COVERAGE_REPORT(
 
236
  TARGETS ubuntu-launcher
 
237
  TESTS application-icon-finder-test application-info-desktop-test cgroup-reap-test exec-util-test failure-test helper-test helper-handshake-test libual-test libual-cpp-test zg-test
 
238
  FILTER ${filter-list}
 
239
)