Merge lp:~allanlesage/xpathselect/cmake-extras-coverage-reporting into lp:xpathselect

Proposed by Allan LeSage
Status: Needs review
Proposed branch: lp:~allanlesage/xpathselect/cmake-extras-coverage-reporting
Merge into: lp:xpathselect
Diff against target: 27 lines (+7/-8)
1 file modified
CMakeLists.txt (+7/-8)
To merge this branch: bzr merge lp:~allanlesage/xpathselect/cmake-extras-coverage-reporting
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Thomi Richards Pending
Review via email: mp+227997@code.launchpad.net

Commit message

Simplify coverage reporting.

Description of the change

Simplify coverage reporting. This won't fail the build but if you have cmake-extras installed you'll get a 'make coverage' target which generates html and xml output.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:44
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~allanlesage/xpathselect/cmake-extras-coverage-reporting/+merge/227997/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/xpathselect-ci/9/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/xpathselect-utopic-amd64-ci/2
    SUCCESS: http://jenkins.qa.ubuntu.com/job/xpathselect-utopic-armhf-ci/2
    SUCCESS: http://jenkins.qa.ubuntu.com/job/xpathselect-utopic-i386-ci/2

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/xpathselect-ci/9/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Does this need an additional build-dep? I don't know what 'cmake-extras'
is....

On Thu, Jul 24, 2014 at 9:45 AM, PS Jenkins bot <
<email address hidden>> wrote:

> Review: Needs Fixing continuous-integration
>
> FAILED: Continuous integration, rev:44
> No commit message was specified in the merge proposal. Click on the
> following link and set the commit message (if you want a jenkins rebuild
> you need to trigger it yourself):
>
> https://code.launchpad.net/~allanlesage/xpathselect/cmake-extras-coverage-reporting/+merge/227997/+edit-commit-message
>
> http://jenkins.qa.ubuntu.com/job/xpathselect-ci/9/
> Executed test runs:
> SUCCESS:
> http://jenkins.qa.ubuntu.com/job/xpathselect-utopic-amd64-ci/2
> SUCCESS:
> http://jenkins.qa.ubuntu.com/job/xpathselect-utopic-armhf-ci/2
> SUCCESS: http://jenkins.qa.ubuntu.com/job/xpathselect-utopic-i386-ci/2
>
> Click here to trigger a rebuild:
> http://s-jenkins.ubuntu-ci:8080/job/xpathselect-ci/9/rebuild
>
> --
>
> https://code.launchpad.net/~allanlesage/xpathselect/cmake-extras-coverage-reporting/+merge/227997
> You are requested to review the proposed merge of
> lp:~allanlesage/xpathselect/cmake-extras-coverage-reporting into
> lp:xpathselect.
>

--
Thomi Richards
<email address hidden>

Revision history for this message
Allan LeSage (allanlesage) wrote :

If you have cmake-extras, lcov, and gcovr installed, you'll get a coverage build target. If you don't, the build won't fail.

$ cmake .. -Denable_coverage=1
$ make
$ make test
$ make coverage

Unmerged revisions

44. By Allan LeSage

Add our cmake-extras coverage macro.

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 2013-08-13 05:11:21 +0000
3+++ CMakeLists.txt 2014-07-23 21:28:07 +0000
4@@ -8,16 +8,15 @@
5
6 set (VERSION 1.4)
7
8-if(CMAKE_BUILD_TYPE STREQUAL "coverage")
9- message("Building for coverage")
10- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage" )
11- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage" )
12- set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} --coverage" )
13- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage" )
14-endif(CMAKE_BUILD_TYPE STREQUAL "coverage")
15-
16 INCLUDE(FindPkgConfig)
17
18 add_subdirectory(lib)
19 add_subdirectory(test)
20
21+# cmake .. -Denable_coverage=1
22+option(enable_coverage "Add coverage targets.")
23+if(enable_coverage)
24+ # NOTE this comes from cmake-extras
25+ include(EnableCoverageReport)
26+ ENABLE_COVERAGE_REPORT(TARGETS xpathselect FILTER /usr/include ${CMAKE_SOURCE_DIR}/test/* ${CMAKE_BINARY_DIR}/*)
27+endif()

Subscribers

People subscribed via source and target branches