Merge lp:~kyrofa/unity-scope-click/1457170_update-cmake-extras into lp:unity-scope-click

Proposed by Kyle Fazzari on 2015-05-20
Status: Merged
Approved by: dobey on 2015-05-21
Approved revision: 328
Merged at revision: 325
Proposed branch: lp:~kyrofa/unity-scope-click/1457170_update-cmake-extras
Merge into: lp:unity-scope-click
Diff against target: 164 lines (+15/-39)
10 files modified
CMakeLists.txt (+5/-8)
HACKING (+8/-2)
debian/control (+2/-0)
libclickscope/tests/CMakeLists.txt (+0/-4)
libclickscope/tests/integration/CMakeLists.txt (+0/-4)
scope/tests/CMakeLists.txt (+0/-5)
scope/tests/click_interface_tool/CMakeLists.txt (+0/-4)
scope/tests/download_manager_tool/CMakeLists.txt (+0/-4)
scope/tests/fake_launcher/CMakeLists.txt (+0/-4)
tools/init-departments/CMakeLists.txt (+0/-4)
To merge this branch: bzr merge lp:~kyrofa/unity-scope-click/1457170_update-cmake-extras
Reviewer Review Type Date Requested Status
dobey (community) 2015-05-20 Approve on 2015-05-21
PS Jenkins bot continuous-integration Approve on 2015-05-21
Review via email: mp+259671@code.launchpad.net

Commit Message

Update usage of cmake-extras to be compatible with cmake-extras 0.4.

Description of the Change

Update usage of cmake-extras to be compatible with cmake-extras 0.4.

Also update HACKING to cover new usage.

To post a comment you must log in.
326. By Kyle Fazzari on 2015-05-20

Update HACKING to explicitly discuss HTML coverage report.

327. By Kyle Fazzari on 2015-05-20

Remove tests' explicit link to gcov.

Replace by taking advantage of cmake-extras v0.4's TESTS parameter.

dobey (dobey) :
review: Needs Fixing
Kyle Fazzari (kyrofa) wrote :

My most recent push should resolve your comment. Looks like CI picked it up okay, huh?

328. By Kyle Fazzari on 2015-05-21

Remove redundant check for coverage build type.

Also add gcovr and lcov to build depends in debian/control.

dobey (dobey) :
review: Approve

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-05-07 16:11:57 +0000
3+++ CMakeLists.txt 2015-05-21 12:25:58 +0000
4@@ -47,8 +47,6 @@
5 set (GMOCK_SOURCE_DIR "/usr/src/gmock" CACHE PATH "gmock source directory")
6 set (GTEST_INCLUDE_DIR "${GMOCK_SOURCE_DIR}/gtest/include" CACHE PATH "gtest source include directory")
7
8-option(enable_coverage "Add coverage targets.")
9-
10 add_subdirectory(${GMOCK_SOURCE_DIR} "${CMAKE_CURRENT_BINARY_DIR}/gmock")
11
12 # Add our own subdirectories.
13@@ -60,12 +58,11 @@
14 add_subdirectory(po)
15 add_subdirectory(tools)
16
17-if(enable_coverage)
18- include(EnableCoverageReport)
19- ENABLE_COVERAGE_REPORT(TARGETS ${SCOPE_LIB_NAME} ${STORE_LIB_UNVERSIONED} ${APPS_LIB_UNVERSIONED}
20- FILTER /usr/include ${CMAKE_SOURCE_DIR}/tests/* ${CMAKE_BINARY_DIR}/*
21- )
22-endif()
23+include(EnableCoverageReport)
24+ENABLE_COVERAGE_REPORT(TARGETS ${SCOPE_LIB_NAME} ${STORE_LIB_UNVERSIONED} ${APPS_LIB_UNVERSIONED}
25+ TESTS click_scope_integration_tests libclick-scope-tests fake_launcher click-scope-tests apps-scope-tests download_manager_tool click_interface_tool init-departments
26+ FILTER /usr/include ${CMAKE_BINARY_DIR}/*
27+)
28
29 # Custom targets for the tests
30 add_custom_target (test
31
32=== modified file 'HACKING'
33--- HACKING 2015-05-07 16:11:57 +0000
34+++ HACKING 2015-05-21 12:25:58 +0000
35@@ -68,11 +68,17 @@
36 To run the coverage tests you'll need to install the gcovr and lcov packages.
37 Then you need to compile with coverage enabled, like this:
38
39- $ cmake .. -Denable_coverage=ON
40+ $ cmake .. -DCMAKE_BUILD_TYPE=coverage
41+ $ make
42 $ make test
43 $ make coverage
44
45-The html will be left on the coveragereport directory.
46+
47+If you want the coverage report in pretty HTML, use:
48+
49+ $ make coverage-html
50+
51+The html will be left in the coveragereport directory.
52
53 Updating departments db
54 -----------------------
55
56=== modified file 'debian/control'
57--- debian/control 2015-05-07 16:11:57 +0000
58+++ debian/control 2015-05-21 12:25:58 +0000
59@@ -10,8 +10,10 @@
60 debhelper (>= 9),
61 dh-translations,
62 g++-4.9:native,
63+ gcovr,
64 google-mock,
65 intltool,
66+ lcov,
67 libboost-locale-dev,
68 libglib2.0-dev (>= 2.32),
69 libjsoncpp-dev,
70
71=== modified file 'libclickscope/tests/CMakeLists.txt'
72--- libclickscope/tests/CMakeLists.txt 2015-05-08 14:44:43 +0000
73+++ libclickscope/tests/CMakeLists.txt 2015-05-21 12:25:58 +0000
74@@ -58,10 +58,6 @@
75 ${CMAKE_THREAD_LIBS_INIT}
76 )
77
78-if(enable_coverage)
79- target_link_libraries(${LIBCLICKSCOPE_TESTS_TARGET} gcov)
80-endif()
81-
82 add_custom_target (test-libclickscope
83 COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${LIBCLICKSCOPE_TESTS_TARGET}
84 DEPENDS ${LIBCLICKSCOPE_TESTS_TARGET}
85
86=== modified file 'libclickscope/tests/integration/CMakeLists.txt'
87--- libclickscope/tests/integration/CMakeLists.txt 2015-05-01 14:52:32 +0000
88+++ libclickscope/tests/integration/CMakeLists.txt 2015-05-21 12:25:58 +0000
89@@ -26,10 +26,6 @@
90 ${CMAKE_THREAD_LIBS_INIT}
91 )
92
93-if(enable_coverage)
94- target_link_libraries(${INTEGRATION_TARGET} gcov)
95-endif()
96-
97 add_custom_target (test-integration-click-scope
98 COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${INTEGRATION_TARGET}
99 DEPENDS ${INTEGRATION_TARGET}
100
101=== modified file 'scope/tests/CMakeLists.txt'
102--- scope/tests/CMakeLists.txt 2015-05-08 14:44:43 +0000
103+++ scope/tests/CMakeLists.txt 2015-05-21 12:25:58 +0000
104@@ -63,11 +63,6 @@
105 ${CMAKE_THREAD_LIBS_INIT}
106 )
107
108-if(enable_coverage)
109- target_link_libraries(${CLICKSCOPE_TESTS_TARGET} gcov)
110- target_link_libraries(${APPS_SCOPE_TESTS_TARGET} gcov)
111-endif()
112-
113 add_custom_target (test-click-scope
114 COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${CLICKSCOPE_TESTS_TARGET}
115 DEPENDS ${CLICKSCOPE_TESTS_TARGET}
116
117=== modified file 'scope/tests/click_interface_tool/CMakeLists.txt'
118--- scope/tests/click_interface_tool/CMakeLists.txt 2015-05-01 14:52:32 +0000
119+++ scope/tests/click_interface_tool/CMakeLists.txt 2015-05-21 12:25:58 +0000
120@@ -12,7 +12,3 @@
121 target_link_libraries (${CLICK_INTERFACE_TOOL_TARGET}
122 ${STORE_LIB_UNVERSIONED}
123 )
124-
125-if(enable_coverage)
126- target_link_libraries(${CLICK_INTERFACE_TOOL_TARGET} gcov)
127-endif()
128
129=== modified file 'scope/tests/download_manager_tool/CMakeLists.txt'
130--- scope/tests/download_manager_tool/CMakeLists.txt 2015-05-01 14:52:32 +0000
131+++ scope/tests/download_manager_tool/CMakeLists.txt 2015-05-21 12:25:58 +0000
132@@ -12,7 +12,3 @@
133 target_link_libraries (${DOWNLOAD_MANAGER_TOOL_TARGET}
134 ${STORE_LIB_UNVERSIONED}
135 )
136-
137-if(enable_coverage)
138- target_link_libraries(${DOWNLOAD_MANAGER_TOOL_TARGET} gcov)
139-endif()
140
141=== modified file 'scope/tests/fake_launcher/CMakeLists.txt'
142--- scope/tests/fake_launcher/CMakeLists.txt 2015-05-01 14:52:32 +0000
143+++ scope/tests/fake_launcher/CMakeLists.txt 2015-05-21 12:25:58 +0000
144@@ -12,7 +12,3 @@
145 target_link_libraries (${FAKE_LAUNCHER_TARGET}
146 ${STORE_LIB_UNVERSIONED}
147 )
148-
149-if(enable_coverage)
150- target_link_libraries(${FAKE_LAUNCHER_TARGET} gcov)
151-endif()
152
153=== modified file 'tools/init-departments/CMakeLists.txt'
154--- tools/init-departments/CMakeLists.txt 2015-05-01 14:52:32 +0000
155+++ tools/init-departments/CMakeLists.txt 2015-05-21 12:25:58 +0000
156@@ -20,8 +20,4 @@
157 ${CMAKE_THREAD_LIBS_INIT}
158 )
159
160-if(enable_coverage)
161- target_link_libraries(${INITDEPTS} gcov)
162-endif()
163-
164 install(TARGETS ${INITDEPTS} DESTINATION sbin)

Subscribers

People subscribed via source and target branches

to all changes: