Merge lp:~saviq/unity-system-compositor/use-cmake-extras into lp:unity-system-compositor

Proposed by Michał Sawicz
Status: Work in progress
Proposed branch: lp:~saviq/unity-system-compositor/use-cmake-extras
Merge into: lp:unity-system-compositor
Diff against target: 98 lines (+3/-59)
4 files modified
CMakeLists.txt (+1/-2)
cmake/FindGtest.cmake (+0/-53)
debian/control (+1/-0)
tests/unit-tests/CMakeLists.txt (+1/-4)
To merge this branch: bzr merge lp:~saviq/unity-system-compositor/use-cmake-extras
Reviewer Review Type Date Requested Status
Alan Griffiths Needs Fixing
PS Jenkins bot (community) continuous-integration Needs Fixing
Robert Carr (community) Approve
Review via email: mp+243770@code.launchpad.net

Commit message

Use FindGMock from cmake-extras_0.3, also wrap-and-sort debian/control

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Robert Carr (robertcarr) wrote :

+1

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Basicly sound, but out of date:

Text conflict in debian/control
1 conflicts encountered.

review: Needs Fixing
Revision history for this message
Michał Sawicz (saviq) wrote :

W dniu 03.06.2015 o 19:02, Alan Griffiths pisze:
> Basicly sound, but out of date:
>
> Text conflict in debian/control
> 1 conflicts encountered.

Well, "Proposed [...] on 2014-12-05" ;)

Resolved.

191. By Michał Sawicz

Merge trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

LGTM

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Mmm. No, there are linker errors.

review: Needs Fixing

Unmerged revisions

191. By Michał Sawicz

Merge trunk

190. By Michał Sawicz

Use FindGtest from cmake-extras_0.3, also wrap-and-sort debian/control

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 2015-04-07 13:36:48 +0000
3+++ CMakeLists.txt 2015-06-03 18:55:34 +0000
4@@ -57,7 +57,6 @@
5 option(MIR_ENABLE_TESTS "Build tests" ON)
6
7 if (MIR_ENABLE_TESTS)
8- find_package(Gtest REQUIRED)
9- include_directories(${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR})
10+ find_package(GMock REQUIRED)
11 add_subdirectory(tests/)
12 endif ()
13
14=== removed file 'cmake/FindGtest.cmake'
15--- cmake/FindGtest.cmake 2014-07-09 06:58:05 +0000
16+++ cmake/FindGtest.cmake 1970-01-01 00:00:00 +0000
17@@ -1,53 +0,0 @@
18-include(ExternalProject)
19-include(FindPackageHandleStandardArgs)
20-
21-#gtest
22-set(GTEST_INSTALL_DIR /usr/src/gmock/gtest/include)
23-find_path(GTEST_INCLUDE_DIR gtest/gtest.h
24- HINTS ${GTEST_INSTALL_DIR})
25-
26-#gmock
27-find_path(GMOCK_INSTALL_DIR gmock/CMakeLists.txt
28- HINTS /usr/src)
29-if(${GMOCK_INSTALL_DIR} STREQUAL "GMOCK_INSTALL_DIR-NOTFOUND")
30- message(FATAL_ERROR "google-mock package not found")
31-endif()
32-
33-set(GMOCK_INSTALL_DIR ${GMOCK_INSTALL_DIR}/gmock)
34-find_path(GMOCK_INCLUDE_DIR gmock/gmock.h)
35-
36-set(GMOCK_PREFIX gmock)
37-set(GMOCK_BINARY_DIR ${CMAKE_BINARY_DIR}/${GMOCK_PREFIX}/libs)
38-set(GTEST_BINARY_DIR ${GMOCK_BINARY_DIR}/gtest)
39-
40-set(GTEST_CMAKE_ARGS "")
41-if (${CMAKE_CROSSCOMPILING})
42- set(GTEST_CMAKE_ARGS
43- -DCMAKE_TOOLCHAIN_FILE=${CMAKE_MODULE_PATH}/LinuxCrossCompile.cmake)
44-endif()
45-
46-ExternalProject_Add(
47- GMock
48- #where to build in source tree
49- PREFIX ${GMOCK_PREFIX}
50- #where the source is external to the project
51- SOURCE_DIR ${GMOCK_INSTALL_DIR}
52- #forward the compilers to the subproject so cross-arch builds work
53- CMAKE_ARGS ${GTEST_CMAKE_ARGS}
54- BINARY_DIR ${GMOCK_BINARY_DIR}
55-
56- #we don't need to install, so skip
57- INSTALL_COMMAND ""
58-)
59-
60-set(GMOCK_LIBRARY ${GMOCK_BINARY_DIR}/libgmock.a)
61-set(GMOCK_MAIN_LIBRARY ${GMOCK_BINARY_DIR}/libgmock_main.a)
62-set(GMOCK_BOTH_LIBRARIES ${GMOCK_LIBRARY} ${GMOCK_MAIN_LIBRARY})
63-set(GTEST_LIBRARY ${GTEST_BINARY_DIR}/libgtest.a)
64-set(GTEST_MAIN_LIBRARY ${GTEST_BINARY_DIR}/libgtest_main.a)
65-set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARY} ${GTEST_MAIN_LIBRARY})
66-set(GTEST_ALL_LIBRARIES ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES})
67-
68-find_package_handle_standard_args(GTest DEFAULT_MSG
69- GMOCK_INCLUDE_DIR
70- GTEST_INCLUDE_DIR)
71
72=== modified file 'debian/control'
73--- debian/control 2015-05-06 16:09:19 +0000
74+++ debian/control 2015-06-03 18:55:34 +0000
75@@ -3,6 +3,7 @@
76 Priority: optional
77 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
78 Build-Depends: cmake,
79+ cmake-extras (>= 0.3),
80 cmake-data,
81 dbus,
82 debhelper (>= 9),
83
84=== modified file 'tests/unit-tests/CMakeLists.txt'
85--- tests/unit-tests/CMakeLists.txt 2015-02-18 14:40:29 +0000
86+++ tests/unit-tests/CMakeLists.txt 2015-06-03 18:55:34 +0000
87@@ -34,10 +34,7 @@
88
89 usc
90 ${GTEST_BOTH_LIBRARIES}
91- ${GMOCK_LIBRARY}
92- ${GMOCK_MAIN_LIBRARY}
93+ ${GMOCK_LIBRARIES}
94 )
95
96 add_test(usc_unit_tests ${EXECUTABLE_OUTPUT_PATH}/usc_unit_tests)
97-
98-add_dependencies(usc_unit_tests GMock)

Subscribers

People subscribed via source and target branches