blob: 205792e710f1ded8e093b38ad157229291925421 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
set(CMAKE_AUTOMOC ON)
find_package(GMock REQUIRED)
find_package(Qt5Core REQUIRED)
find_package(Qt5Test REQUIRED)
find_package(Qt5DBus COMPONENTS Qt5DBusMacros REQUIRED)
pkg_check_modules(TEST_DEPS
libqtdbustest-1 REQUIRED
libqtdbusmock-1 REQUIRED
)
include_directories(SYSTEM
${DBUSTEST_INCLUDE_DIRS}
${TEST_DEPS_INCLUDE_DIRS}
${GTEST_INCLUDE_DIRS}
${GMOCK_INCLUDE_DIRS}
)
set(CTEST_ENVIRONMENT "${CTEST_ENVIRONMENT};G_MESSAGES_DEBUG=all")
# turn off the warnings that break Google Test
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CXX_WARNING_ARGS "${CXX_WARNING_ARGS} -Wno-global-constructors -Wno-weak-vtables")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARNING_ARGS}")
add_test(cppcheck cppcheck --enable=all -USCHEMA_DIR --error-exitcode=2 --inline-suppr -I${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests)
add_subdirectory(unit)
add_subdirectory(utils)
|