Merge lp:~michael-sheldon/ubuntu-download-manager/fix-gmock-zesty into lp:ubuntu-download-manager

Proposed by Michael Sheldon
Status: Merged
Approved by: Bill Filler
Approved revision: 379
Merged at revision: 380
Proposed branch: lp:~michael-sheldon/ubuntu-download-manager/fix-gmock-zesty
Merge into: lp:ubuntu-download-manager
Diff against target: 64 lines (+22/-8)
1 file modified
cmake/modules/FindGtest.cmake (+22/-8)
To merge this branch: bzr merge lp:~michael-sheldon/ubuntu-download-manager/fix-gmock-zesty
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+311939@code.launchpad.net

Commit message

Fix gmock tests on zesty

Description of the change

Fix gmock tests on zesty

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:379
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-download-manager-ci/22/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2065
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/504
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2068
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1898
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1898/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1898
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1898/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/1898
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/1898/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1898
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1898/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1898
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1898/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/1898
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/1898/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1898
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1898/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1898
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1898/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/1898
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/1898/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-download-manager-ci/22/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmake/modules/FindGtest.cmake'
2--- cmake/modules/FindGtest.cmake 2014-03-07 22:49:54 +0000
3+++ cmake/modules/FindGtest.cmake 2016-11-28 14:33:55 +0000
4@@ -2,23 +2,33 @@
5 include(FindPackageHandleStandardArgs)
6
7 #gtest
8-set(GTEST_INSTALL_DIR /usr/src/gmock/gtest/include)
9+if (EXISTS /usr/src/googletest)
10+ set (USING_GOOGLETEST_1_8 TRUE)
11+ set (GTEST_INSTALL_DIR /usr/src/googletest/googletest/include)
12+else()
13+ set(GTEST_INSTALL_DIR /usr/src/gmock/gtest/include)
14+endif()
15 find_path(GTEST_INCLUDE_DIR gtest/gtest.h
16 HINTS ${GTEST_INSTALL_DIR})
17
18 #gmock
19-find_path(GMOCK_INSTALL_DIR gmock/CMakeLists.txt
20- HINTS /usr/src)
21+find_path(GMOCK_INSTALL_DIR CMakeLists.txt
22+ HINTS /usr/src/googletest /usr/src/gmock)
23 if(${GMOCK_INSTALL_DIR} STREQUAL "GMOCK_INSTALL_DIR-NOTFOUND")
24 message(FATAL_ERROR "google-mock package not found")
25 endif()
26
27-set(GMOCK_INSTALL_DIR ${GMOCK_INSTALL_DIR}/gmock)
28 find_path(GMOCK_INCLUDE_DIR gmock/gmock.h)
29
30-set(GMOCK_PREFIX gmock)
31-set(GMOCK_BINARY_DIR ${CMAKE_BINARY_DIR}/${GMOCK_PREFIX}/libs)
32-set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest)
33+if (USING_GOOGLETEST_1_8)
34+ set(GMOCK_BASE_BINARY_DIR ${CMAKE_BINARY_DIR}/gmock/libs)
35+ set(GMOCK_BINARY_DIR ${GMOCK_BASE_BINARY_DIR}/googlemock)
36+ set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest)
37+else()
38+ set(GMOCK_BASE_BINARY_DIR ${CMAKE_BINARY_DIR}/gmock/libs)
39+ set(GMOCK_BINARY_DIR ${GMOCK_BASE_BINARY_DIR})
40+ set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest)
41+endif()
42
43 set(GTEST_CMAKE_ARGS "")
44 if (${MIR_IS_CROSS_COMPILING})
45@@ -26,6 +36,10 @@
46 -DCMAKE_TOOLCHAIN_FILE=${CMAKE_MODULE_PATH}/LinuxCrossCompile.cmake)
47 endif()
48
49+if (USING_GOOGLETEST_1_8)
50+ list(APPEND GTEST_CMAKE_ARGS -DBUILD_GTEST=ON)
51+endif()
52+
53 ExternalProject_Add(
54 GMock
55 #where to build in source tree
56@@ -34,7 +48,7 @@
57 SOURCE_DIR ${GMOCK_INSTALL_DIR}
58 #forward the compilers to the subproject so cross-arch builds work
59 CMAKE_ARGS ${GTEST_CMAKE_ARGS}
60- BINARY_DIR ${GMOCK_BINARY_DIR}
61+ BINARY_DIR ${GMOCK_BASE_BINARY_DIR}
62
63 #we don't need to install, so skip
64 INSTALL_COMMAND ""

Subscribers

People subscribed via source and target branches