Mir

Merge lp:~alan-griffiths/mir/fix-gmock-detection into lp:mir

Proposed by Alan Griffiths
Status: Rejected
Rejected by: Alan Griffiths
Proposed branch: lp:~alan-griffiths/mir/fix-gmock-detection
Merge into: lp:mir
Prerequisite: lp:~brandontschaefer/mir/remove-android-support
Diff against target: 292 lines (+25/-116)
11 files modified
CMakeLists.txt (+10/-1)
benchmarks/frame-uniformity/CMakeLists.txt (+2/-3)
cmake/FindGtestGmock.cmake (+0/-96)
debian/control (+1/-0)
tests/CMakeLists.txt (+1/-2)
tests/integration-tests/CMakeLists.txt (+1/-2)
tests/mir_test_doubles/CMakeLists.txt (+2/-2)
tests/mir_test_framework/CMakeLists.txt (+4/-4)
tests/performance-tests/CMakeLists.txt (+1/-1)
tests/unit-tests/CMakeLists.txt (+2/-4)
tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp (+1/-1)
To merge this branch: bzr merge lp:~alan-griffiths/mir/fix-gmock-detection
Reviewer Review Type Date Requested Status
Daniel van Vugt Disapprove
Mir CI Bot continuous-integration Needs Fixing
Alan Griffiths Needs Fixing
Brandon Schaefer (community) Approve
Review via email: mp+322859@code.launchpad.net

This proposal supersedes a proposal from 2017-04-20.

Commit message

Fix gmock detection in cmake.

At some point in the past 5 years cmake-extras gained a script for finding gmock and gtest. We don't need to maintain our own.

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote : Posted in a previous version of this proposal

lgtm

review: Approve
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

still lgtms

review: Approve
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:4156
https://mir-jenkins.ubuntu.com/job/mir-ci/3372/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4563/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4689
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4678
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4678
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4595
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4595/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4595
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4595/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4595
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4595/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4595/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4595
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4595/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3372/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4157
https://mir-jenkins.ubuntu.com/job/mir-ci/3373/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4564/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4690
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4679
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4679
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4596
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4596/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4596
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4596/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4596
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4596/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4596/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4596
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4596/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3373/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://mir-jenkins.ubuntu.com/job/mir-autolanding/1286/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4565/console
    None: https://mir-jenkins.ubuntu.com/job/generic-land-mp/1370/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4691
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4680
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4680
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4597
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4597/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4597
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4597/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4597
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4597/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4597/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4597
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4597/artifact/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

armhf, zesty:

17:04:53 ../../gmock/gtest/libgtest.a: error adding symbols: File format not recognized
17:04:53 collect2: error: ld returned 1 exit status
17:04:53 tests/performance-tests/CMakeFiles/mir_compositor_performance_test.dir/build.make:100: recipe for target 'bin/mir_compositor_performance_test.bin' failed
17:04:53 make[3]: *** [bin/mir_compositor_performance_test.bin] Error 1

Why would that be?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I think this is the right idea, but some better explanation (a description) might be helpful.

Looks like this cleanup only became possible recently with the new gtest packaging...?

Also, don't we need to explicitly require Gtest?

review: Needs Information
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4157
https://mir-jenkins.ubuntu.com/job/mir-ci/3376/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4568/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4694
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4683
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4683
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4600
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4600/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4600
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4600/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4600
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4600/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4600/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4600
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4600/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3376/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Hmm build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty again. (But different symptoms to last time.)

10:32:13 /usr/lib/gcc-cross/arm-linux-gnueabihf/6/../../../../arm-linux-gnueabihf/bin/ld.gold: error: ../../gmock/gtest/libgtest.a(gtest-all.cc.o): incompatible target
10:32:13 /usr/lib/gcc-cross/arm-linux-gnueabihf/6/../../../../arm-linux-gnueabihf/bin/ld.gold: error: ../../gmock/gtest/libgtest_main.a(gtest_main.cc.o): incompatible target

review: Needs Fixing
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Oh! that's a cross-build. Maybe its picking up the host binaries? Something for next week.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK then, while work is in progress don't forget:

+#mir_add_wrapped_executable(mir_compositor_performance_test

should be uncommented.

review: Needs Fixing
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4160
https://mir-jenkins.ubuntu.com/job/mir-ci/3379/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/4572/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4698
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4687
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4687
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4604
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4604/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4604
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4604/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4604
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4604/artifact/output/*zip*/output.zip
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4604/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4604
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4604/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3379/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

Maybe replacing ${GMOCK_LIBRARIES} with ${GMOCK_LDFLAGS} would help fix the cross-compile failure.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Hmm, aren't we aiming to keep support for building on xenial? While lp:mir builds perfectly on xenial, this proposal does not...

-- Installing: /home/dan/bzr/mir/fix-gmock-detection/build/mir_gtest/fail_on_success.sh
CMake Error at CMakeLists.txt:287 (find_package):
  By not providing "FindGMock.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "GMock", but
  CMake did not find one.

  Could not find a package configuration file provided by "GMock" with any of
  the following names:

    GMockConfig.cmake
    gmock-config.cmake

  Add the installation prefix of "GMock" to CMAKE_PREFIX_PATH or set
  "GMock_DIR" to a directory containing one of the above files. If "GMock"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!

review: Needs Information
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

^^^
That's pure xenial with no overlay, no PPAs.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Weak disapproval. This breaks our plan to keep xenial support while removing overlays.

The new GMock CMake package is apparently still too new to be backward compatible.

review: Disapprove

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2017-04-21 03:08:25 +0000
3+++ CMakeLists.txt 2017-04-24 09:26:55 +0000
4@@ -284,7 +284,16 @@
5 add_subdirectory(cmake/)
6
7 if (MIR_ENABLE_TESTS)
8- find_package(GtestGmock REQUIRED)
9+ find_package(GMock REQUIRED)
10+ if (MIR_CHROOT)
11+ string(REPLACE "/usr/" "${MIR_CHROOT}/usr/" GMOCK_INCLUDE_DIRS "${GMOCK_INCLUDE_DIRS}")
12+ string(REPLACE "/usr/" "${MIR_CHROOT}/usr/" GTEST_INCLUDE_DIRS "${GTEST_INCLUDE_DIRS}")
13+ string(REPLACE "/usr/" "${MIR_CHROOT}/usr/" GTEST_LIBRARIES "${GTEST_LIBRARIES}")
14+ string(REPLACE "/usr/" "${MIR_CHROOT}/usr/" GMOCK_INCLUDE_DIRS "${GMOCK_INCLUDE_DIRS}")
15+ string(REPLACE "/usr/" "${MIR_CHROOT}/usr/" GTEST_MAIN_LIBRARIES "${GTEST_MAIN_LIBRARIES}")
16+ string(REPLACE "/usr/" "${MIR_CHROOT}/usr/" GMOCK_LIBRARIES "${GMOCK_LIBRARIES}")
17+ string(REPLACE "/usr/" "${MIR_CHROOT}/usr/" GTEST_BOTH_LIBRARIES "${GTEST_BOTH_LIBRARIES}")
18+ endif()
19 pkg_check_modules(LIBEVDEV REQUIRED libevdev)
20 include_directories(${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR})
21 add_subdirectory(tests/)
22
23=== modified file 'benchmarks/frame-uniformity/CMakeLists.txt'
24--- benchmarks/frame-uniformity/CMakeLists.txt 2017-04-21 03:08:25 +0000
25+++ benchmarks/frame-uniformity/CMakeLists.txt 2017-04-24 09:26:55 +0000
26@@ -28,7 +28,7 @@
27 mirserver
28 mirclient
29 mirplatform
30-
31+
32 mir-test-assist
33
34 # needed for fake_event_hub_server_configuration.h (which relies on private APIs)
35@@ -39,7 +39,6 @@
36
37 ${Boost_LIBRARIES}
38 ${GTEST_BOTH_LIBRARIES}
39- ${GMOCK_LIBRARY}
40- ${GMOCK_MAIN_LIBRARY}
41+ ${GMOCK_LIBRARIES}
42 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
43 )
44
45=== removed file 'cmake/FindGtestGmock.cmake'
46--- cmake/FindGtestGmock.cmake 2017-01-18 02:29:37 +0000
47+++ cmake/FindGtestGmock.cmake 1970-01-01 00:00:00 +0000
48@@ -1,96 +0,0 @@
49-include(ExternalProject)
50-include(FindPackageHandleStandardArgs)
51-
52-#
53-# When cross compiling MIR_CHROOT points to our chroot.
54-# When not cross compiling, it should be blank to use the host system.
55-#
56-set(usr ${MIR_CHROOT}/usr)
57-
58-if (EXISTS ${usr}/src/googletest)
59- set (USING_GOOGLETEST_1_8 TRUE)
60- set (GTEST_INSTALL_DIR ${usr}/src/googletest/googletest/include)
61-else()
62- set (GTEST_INSTALL_DIR ${usr}/src/gmock/gtest/include)
63-endif()
64-
65-#gtest
66-find_path(
67- GTEST_INCLUDE_DIR gtest/gtest.h
68- HINTS ${GTEST_INSTALL_DIR}
69-)
70-
71-#gmock
72-find_path(
73- GMOCK_INSTALL_DIR CMakeLists.txt
74- HINTS ${usr}/src/googletest ${usr}/src/gmock)
75-if(${GMOCK_INSTALL_DIR} STREQUAL "GMOCK_INSTALL_DIR-NOTFOUND")
76- message(FATAL_ERROR "google-mock package not found")
77-endif()
78-
79-find_path(GMOCK_INCLUDE_DIR gmock/gmock.h)
80-
81-if (USING_GOOGLETEST_1_8)
82- set(GMOCK_BASE_BINARY_DIR ${CMAKE_BINARY_DIR}/gmock/libs)
83- set(GMOCK_BINARY_DIR ${GMOCK_BASE_BINARY_DIR}/googlemock)
84- set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest)
85-else()
86- set(GMOCK_BASE_BINARY_DIR ${CMAKE_BINARY_DIR}/gmock/libs)
87- set(GMOCK_BINARY_DIR ${GMOCK_BASE_BINARY_DIR})
88- set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest)
89-endif()
90-
91-set(GTEST_CXX_FLAGS "-fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64")
92-if (cmake_build_type_lower MATCHES "threadsanitizer")
93- set(GTEST_CXX_FLAGS "${GTEST_CXX_FLAGS} -fsanitize=thread")
94-elseif (cmake_build_type_lower MATCHES "ubsanitizer")
95- set(GTEST_CXX_FLAGS "${GTEST_CXX_FLAGS} -fsanitize=undefined")
96-endif()
97-
98-set(GTEST_CMAKE_ARGS "-DCMAKE_CXX_FLAGS=${GTEST_CXX_FLAGS}")
99-list(APPEND GTEST_CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
100-list(APPEND GTEST_CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER})
101-
102-if (USING_GOOGLETEST_1_8)
103- list(APPEND GTEST_CMAKE_ARGS -DBUILD_GTEST=ON)
104-endif()
105-
106-if (cmake_build_type_lower MATCHES "threadsanitizer")
107- #Skip compiler check, since if GCC is the compiler, we need to link against -ltsan
108- #explicitly; specifying additional linker flags doesn't seem possible for external projects
109- list(APPEND GTEST_CMAKE_ARGS -DCMAKE_CXX_COMPILER_WORKS=1)
110-endif()
111-if (${CMAKE_CROSSCOMPILING})
112- if(DEFINED MIR_CHROOT)
113- list(APPEND GTEST_CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_MODULE_PATH}/LinuxCrossCompile.cmake)
114- else()
115- list(APPEND GTEST_CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER})
116- list(APPEND GTEST_CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
117- endif()
118-endif()
119-
120-ExternalProject_Add(
121- GMock
122- #where to build in source tree
123- PREFIX ${GMOCK_PREFIX}
124- #where the source is external to the project
125- SOURCE_DIR ${GMOCK_INSTALL_DIR}
126- #forward the compilers to the subproject so cross-arch builds work
127- CMAKE_ARGS ${GTEST_CMAKE_ARGS}
128- BINARY_DIR ${GMOCK_BASE_BINARY_DIR}
129-
130- #we don't need to install, so skip
131- INSTALL_COMMAND ""
132-)
133-
134-set(GMOCK_LIBRARY ${GMOCK_BINARY_DIR}/libgmock.a)
135-set(GMOCK_MAIN_LIBRARY ${GMOCK_BINARY_DIR}/libgmock_main.a)
136-set(GMOCK_BOTH_LIBRARIES ${GMOCK_LIBRARY} ${GMOCK_MAIN_LIBRARY})
137-set(GTEST_LIBRARY ${GTEST_BINARY_DIR}/libgtest.a)
138-set(GTEST_MAIN_LIBRARY ${GTEST_BINARY_DIR}/libgtest_main.a)
139-set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARY} ${GTEST_MAIN_LIBRARY})
140-set(GTEST_ALL_LIBRARIES ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES})
141-
142-find_package_handle_standard_args(GTest DEFAULT_MSG
143- GMOCK_INCLUDE_DIR
144- GTEST_INCLUDE_DIR)
145
146=== modified file 'debian/control'
147--- debian/control 2017-04-21 03:08:25 +0000
148+++ debian/control 2017-04-24 09:26:55 +0000
149@@ -4,6 +4,7 @@
150 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
151 XSBC-Original-Maintainer: Thomas Voß <thomas.voss@canonical.com>
152 Build-Depends: cmake,
153+ cmake-extras,
154 pkg-config,
155 debhelper (>= 9),
156 doxygen,
157
158=== modified file 'tests/CMakeLists.txt'
159--- tests/CMakeLists.txt 2017-04-21 03:08:25 +0000
160+++ tests/CMakeLists.txt 2017-04-24 09:26:55 +0000
161@@ -104,8 +104,7 @@
162 mir-test-doubles-platform-static
163 ${Boost_LIBRARIES}
164 ${GTEST_BOTH_LIBRARIES}
165- ${GMOCK_LIBRARY}
166- ${GMOCK_MAIN_LIBRARY}
167+ ${GMOCK_LIBRARIES}
168 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
169 )
170
171
172=== modified file 'tests/integration-tests/CMakeLists.txt'
173--- tests/integration-tests/CMakeLists.txt 2017-04-21 03:08:25 +0000
174+++ tests/integration-tests/CMakeLists.txt 2017-04-24 09:26:55 +0000
175@@ -69,8 +69,7 @@
176
177 ${Boost_LIBRARIES}
178 ${GTEST_BOTH_LIBRARIES}
179- ${GMOCK_LIBRARY}
180- ${GMOCK_MAIN_LIBRARY}
181+ ${GMOCK_LIBRARIES}
182 # Mesa platform dependencies
183 ${DRM_LDFLAGS} ${DRM_LIBRARIES}
184 ${GBM_LDFLAGS} ${GBM_LIBRARIES}
185
186=== modified file 'tests/mir_test_doubles/CMakeLists.txt'
187--- tests/mir_test_doubles/CMakeLists.txt 2017-04-21 03:08:25 +0000
188+++ tests/mir_test_doubles/CMakeLists.txt 2017-04-24 09:26:55 +0000
189@@ -87,7 +87,7 @@
190 mirserver
191
192 ${Boost_LIBRARIES}
193- ${GMOCK_LIBRARY}
194+ ${GMOCK_LIBRARIES}
195 ${GMOCK_MAIN_LIBRARY}
196 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
197 )
198@@ -105,7 +105,7 @@
199 mir-test-doubles-platform-static
200
201 -ldl
202- ${GMOCK_LIBRARY}
203+ ${GMOCK_LIBRARIES}
204 ${GMOCK_MAIN_LIBRARY}
205 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
206 )
207
208=== modified file 'tests/mir_test_framework/CMakeLists.txt'
209--- tests/mir_test_framework/CMakeLists.txt 2017-03-14 04:41:33 +0000
210+++ tests/mir_test_framework/CMakeLists.txt 2017-04-24 09:26:55 +0000
211@@ -83,11 +83,11 @@
212
213 target_link_libraries(mir-test-framework-static
214
215+ mirserver
216 mirclient
217 ${Boost_LIBRARIES}
218 ${GTEST_BOTH_LIBRARIES}
219- ${GMOCK_LIBRARY}
220- ${GMOCK_MAIN_LIBRARY}
221+ ${GMOCK_LIBRARIES}
222 ${UMOCKDEV_LIBRARIES}
223 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
224 )
225@@ -118,7 +118,7 @@
226
227 add_library(
228 mir-test-input-framework OBJECT
229-
230+
231 stub_input.cpp
232 fake_input_device_impl.cpp
233 stub_input_platform.cpp
234@@ -175,7 +175,7 @@
235 )
236
237 target_link_libraries(
238- mirplatformgraphicsthrow
239+ mirplatformgraphicsthrow
240
241 mirplatform
242 )
243
244=== modified file 'tests/performance-tests/CMakeLists.txt'
245--- tests/performance-tests/CMakeLists.txt 2017-04-21 03:08:25 +0000
246+++ tests/performance-tests/CMakeLists.txt 2017-04-24 09:26:55 +0000
247@@ -32,8 +32,8 @@
248 test_compositor.cpp
249 )
250 target_link_libraries(mir_compositor_performance_test
251- ${GTEST_BOTH_LIBRARIES}
252 mir_system_performance_test
253+ ${GTEST_BOTH_LIBRARIES}
254 )
255
256 mir_add_wrapped_executable(mir_client_startup_performance_test
257
258=== modified file 'tests/unit-tests/CMakeLists.txt'
259--- tests/unit-tests/CMakeLists.txt 2017-04-21 03:08:25 +0000
260+++ tests/unit-tests/CMakeLists.txt 2017-04-24 09:26:55 +0000
261@@ -137,8 +137,7 @@
262
263 ${PROTOBUF_LITE_LIBRARIES}
264 ${GTEST_BOTH_LIBRARIES}
265- ${GMOCK_LIBRARY}
266- ${GMOCK_MAIN_LIBRARY}
267+ ${GMOCK_LIBRARIES}
268 ${Boost_LIBRARIES}
269 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
270 )
271@@ -178,8 +177,7 @@
272
273 ${PROTOBUF_LITE_LIBRARIES}
274 ${GTEST_BOTH_LIBRARIES}
275- ${GMOCK_LIBRARY}
276- ${GMOCK_MAIN_LIBRARY}
277+ ${GMOCK_LIBRARIES}
278 ${Boost_LIBRARIES}
279 ${UMOCKDEV_LIBRARIES}
280 ${CMAKE_THREAD_LIBS_INIT} # Link in pthread.
281
282=== modified file 'tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp'
283--- tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp 2017-02-17 07:35:08 +0000
284+++ tests/unit-tests/platforms/nested/test_nested_display_configuration.cpp 2017-04-24 09:26:55 +0000
285@@ -155,7 +155,7 @@
286 auto edid_size = mir_output_get_edid_size(output);
287
288 ASSERT_NE(nullptr, edid_start);
289- ASSERT_NE(0, edid_size);
290+ ASSERT_NE(0u, edid_size);
291
292 std::vector<uint8_t> host_edid(edid_start, edid_start+edid_size);
293

Subscribers

People subscribed via source and target branches