diff options
author | Robert Tari <robert@tari.in> | 2021-06-11 13:02:33 +0200 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2021-06-11 13:19:03 +0200 |
commit | 887b5f92bdd6485a4da521086ec88e63357d2260 (patch) | |
tree | 06c2e07e757b6d5ef556b10922d7c236f3fdb7b3 /tests/backend-dbus | |
parent | a2aac2de9402709a0eeea16fb893d261a61624e6 (diff) | |
download | ayatana-indicator-session-887b5f92bdd6485a4da521086ec88e63357d2260.tar.gz ayatana-indicator-session-887b5f92bdd6485a4da521086ec88e63357d2260.tar.bz2 ayatana-indicator-session-887b5f92bdd6485a4da521086ec88e63357d2260.zip |
Convert testing and coverage reporting to cmake-extras style
fixes https://github.com/AyatanaIndicators/ayatana-indicator-session/issues/34
Diffstat (limited to 'tests/backend-dbus')
-rw-r--r-- | tests/backend-dbus/CMakeLists.txt | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/tests/backend-dbus/CMakeLists.txt b/tests/backend-dbus/CMakeLists.txt index 83c0886..0589487 100644 --- a/tests/backend-dbus/CMakeLists.txt +++ b/tests/backend-dbus/CMakeLists.txt @@ -1,11 +1,4 @@ -# build libgtest -add_library (gtest STATIC - ${GTEST_SOURCE_DIR}/gtest-all.cc - ${GTEST_SOURCE_DIR}/gtest_main.cc) -set_target_properties (gtest PROPERTIES INCLUDE_DIRECTORIES - ${GTEST_INCLUDE_DIR}) - -SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -g ${CC_WARNING_ARGS}") +SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") # build desktopmock add_library (desktopmock STATIC @@ -43,22 +36,16 @@ include_directories (${CMAKE_SOURCE_DIR}/tests) add_executable (test-actions test-actions.cc) add_test (test-actions test-actions) -set_tests_properties (test-actions PROPERTIES COMPILE_FLAGS "${SERVICE_CFLAGS}") -target_link_libraries (test-actions desktopmock backenddbus libayatanaindicatorsessionservice gtest ${SERVICE_LDFLAGS} ${GTEST_LIBS} ${GCOV_LIBS}) -SET(COVERAGE_TEST_TARGETS "${COVERAGE_TEST_TARGETS} test-actions") +target_link_libraries (test-actions desktopmock backenddbus libayatanaindicatorsessionservice ${SERVICE_LDFLAGS} ${GTEST_LIBRARIES} ${GTEST_BOTH_LIBRARIES} ${GMOCK_LIBRARIES}) # test the Guest class add_executable (test-guest test-guest.cc) add_test (test-guest test-guest) -set_tests_properties (test-guest PROPERTIES COMPILE_FLAGS "${SERVICE_CFLAGS}") -target_link_libraries (test-guest desktopmock backenddbus libayatanaindicatorsessionservice gtest ${SERVICE_LDFLAGS} ${GTEST_LIBS} ${GCOV_LIBS}) -SET(COVERAGE_TEST_TARGETS "${COVERAGE_TEST_TARGETS} test-guest") +target_link_libraries (test-guest desktopmock backenddbus libayatanaindicatorsessionservice ${SERVICE_LDFLAGS} ${GTEST_LIBRARIES} ${GTEST_BOTH_LIBRARIES} ${GMOCK_LIBRARIES}) # test the Users class add_executable (test-users test-users.cc) add_test (test-users test-users) -set_tests_properties (test-users PROPERTIES COMPILE_FLAGS "${SERVICE_CFLAGS}") -target_link_libraries (test-users desktopmock backenddbus libayatanaindicatorsessionservice gtest ${SERVICE_LDFLAGS} ${GTEST_LIBS} ${GCOV_LIBS}) -SET(COVERAGE_TEST_TARGETS "${COVERAGE_TEST_TARGETS} test-users") +target_link_libraries (test-users desktopmock backenddbus libayatanaindicatorsessionservice ${SERVICE_LDFLAGS} ${GTEST_LIBRARIES} ${GTEST_BOTH_LIBRARIES} ${GMOCK_LIBRARIES}) |