diff options
author | Rodney Dawes <dobey.pwns@gmail.com> | 2018-03-16 07:28:21 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-03-16 10:44:38 +0100 |
commit | 970f3823f1c14e094630e63d8d9b79235cb9bacf (patch) | |
tree | 89ddfd6470d8b79f1e9f315c00b2ce8e21d63fe5 /tests/CMakeLists.txt | |
parent | 34b8d5a101881e163af839c06a7db8cf302d2f43 (diff) | |
download | ayatana-indicator-power-970f3823f1c14e094630e63d8d9b79235cb9bacf.tar.gz ayatana-indicator-power-970f3823f1c14e094630e63d8d9b79235cb9bacf.tar.bz2 ayatana-indicator-power-970f3823f1c14e094630e63d8d9b79235cb9bacf.zip |
Use gmock module from cmake-extras.
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index bf53ee3..55e0b24 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,9 +1,5 @@ -# 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 ${INCLUDE_DIRECTORIES} ${GTEST_INCLUDE_DIR}) -set_target_properties (gtest PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} -w) +find_package(GMock) +include_directories(${GMOCK_INCLUDE_DIRS}) # dbustest pkg_check_modules(DBUSTEST REQUIRED @@ -49,7 +45,7 @@ function(add_test_by_name name) add_executable (${TEST_NAME} ${TEST_NAME}.cc) add_test (${TEST_NAME} ${TEST_NAME}) add_dependencies (${TEST_NAME} ayatanaindicatorpowerservice gschemas-compiled) - target_link_libraries (${TEST_NAME} ayatanaindicatorpowerservice gtest ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS} ${URLDISPATCHER_LIBRARIES}) + target_link_libraries (${TEST_NAME} ayatanaindicatorpowerservice gtest ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS} ${URLDISPATCHER_LIBRARIES} ${GMOCK_LIBRARIES}) endfunction() add_test_by_name(test-notify) add_test(NAME dear-reader-the-next-test-takes-80-seconds COMMAND true) |