Merge lp:~sil2100/biometryd/fix_ftbfs_gmock into lp:biometryd

Proposed by Łukasz Zemczak
Status: Needs review
Proposed branch: lp:~sil2100/biometryd/fix_ftbfs_gmock
Merge into: lp:biometryd
Diff against target: 41 lines (+4/-9)
2 files modified
debian/control (+1/-0)
tests/CMakeLists.txt (+3/-9)
To merge this branch: bzr merge lp:~sil2100/biometryd/fix_ftbfs_gmock
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+322118@code.launchpad.net

Commit message

Switch to using cmake-extras for gmock and gtest.

Description of the change

Work in progress! First try on fixing the gmock related build failure.

To post a comment you must log in.
44. By Łukasz Zemczak

The leftover add_subdirectory of gmock makes CMake still bail out. Thanks to Pete Woods\!

Unmerged revisions

44. By Łukasz Zemczak

The leftover add_subdirectory of gmock makes CMake still bail out. Thanks to Pete Woods\!

43. By Łukasz Zemczak

First try on fixing the gmock related build failure.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2016-09-22 16:56:34 +0000
3+++ debian/control 2017-04-06 16:09:43 +0000
4@@ -7,6 +7,7 @@
5 Priority: optional
6 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
7 Build-Depends: cmake,
8+ cmake-extras,
9 debhelper (>= 9),
10 doxygen,
11 google-mock,
12
13=== modified file 'tests/CMakeLists.txt'
14--- tests/CMakeLists.txt 2016-09-22 16:56:34 +0000
15+++ tests/CMakeLists.txt 2017-04-06 16:09:43 +0000
16@@ -6,11 +6,7 @@
17 configure_file(config.cpp.in config.cpp)
18 include_directories(.)
19 # Build with system gmock and embedded gtest
20-set (GMOCK_INCLUDE_DIR "/usr/include/gmock/include" CACHE PATH "gmock source include directory")
21-set (GMOCK_SOURCE_DIR "/usr/src/gmock" CACHE PATH "gmock source directory")
22-set (GTEST_INCLUDE_DIR "${GMOCK_SOURCE_DIR}/gtest/include" CACHE PATH "gtest source include directory")
23-
24-add_subdirectory(${GMOCK_SOURCE_DIR} "${CMAKE_CURRENT_BINARY_DIR}/gmock")
25+find_package(GMock)
26
27 # Ensure that we have a ready-made fixture maintaining a private bus instance
28 # readily available in unit- and integration tests.
29@@ -38,10 +34,8 @@
30
31 ${ARGN}
32
33- gmock
34-
35- gtest
36- gtest_main)
37+ ${GMOCK_LIBRARIES}
38+ ${GTEST_BOTH_LIBRARIES})
39
40 add_test(${test_name} ${CMAKE_CURRENT_BINARY_DIR}/${test_name} --gtest_filter=*-*requires*)
41 set_tests_properties(${test_name} PROPERTIES ENVIRONMENT "BIOMETRYD_DBUS_SKELETON_IS_RUNNING_UNDER_TESTING=1")

Subscribers

People subscribed via source and target branches