Merge lp:~gerboland/unity-mir/disable-qdebug into lp:unity-mir

Proposed by Gerry Boland
Status: Merged
Approved by: Thomas Voß
Approved revision: 168
Merged at revision: 167
Proposed branch: lp:~gerboland/unity-mir/disable-qdebug
Merge into: lp:unity-mir
Diff against target: 21 lines (+9/-0)
1 file modified
CMakeLists.txt (+9/-0)
To merge this branch: bzr merge lp:~gerboland/unity-mir/disable-qdebug
Reviewer Review Type Date Requested Status
Thomas Voß (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Andreas Pokorny (community) Approve
Review via email: mp+201563@code.launchpad.net

Commit message

[cmake] set default build type to RelWithDebInfo, add workaround to set QT_NO_DEBUG with that option

Description of the change

[cmake] set default build type to RelWithDebInfo, add workaround to set QT_NO_DEBUG with that option

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

FAILED: Continuous integration, rev:166
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/~gerboland/unity-mir/disable-qdebug/+merge/201563/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-mir-ci/218/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-mir-trusty-amd64-ci/81
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-mir-trusty-armhf-ci/82
        deb: http://jenkins.qa.ubuntu.com/job/unity-mir-trusty-armhf-ci/82/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-mir-trusty-i386-ci/81

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity-mir-ci/218/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Thomas Voß (thomas-voss) wrote :

I would propose a case-insensitive comparison for the build type here:

string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower)

if(cmake_build_type_lower MATCHES RelWithDebInfo) # workaround for http://public.kitware.com/Bug/view.php?id=14696
  add_definitions(-DQT_NO_DEBUG)
endif()

167. By Gerry Boland

Match against lower-case CMAKE_BUILD_TYPE

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

It works if you always run twice, but better move the setting of the build type above the tolower call.

review: Needs Fixing
Revision history for this message
Thomas Voß (thomas-voss) wrote :

I'm missing this line: string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower)
Without that you never convert the build type to lower case and thus the check will fail.

review: Needs Fixing
168. By Gerry Boland

Stupid error, fixed

Revision history for this message
Gerry Boland (gerboland) wrote :

> It works if you always run twice, but better move the setting of the build
> type above the tolower call.
Oh I'm an idiot, what was I thinking? Fixed

> I'm missing this line: string(TOLOWER "${CMAKE_BUILD_TYPE}"
> cmake_build_type_lower)
> Without that you never convert the build type to lower case and thus the
> check will fail.
Line was underneath, was typing faster than thinking. Fixed.

Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

lgtm

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Thomas Voß (thomas-voss) wrote :

LGTM.

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 2014-01-10 09:13:05 +0000
3+++ CMakeLists.txt 2014-01-15 11:58:20 +0000
4@@ -19,8 +19,17 @@
5 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-error=format")
6 endif()
7
8+if(NOT CMAKE_BUILD_TYPE)
9+ message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.")
10+ set(CMAKE_BUILD_TYPE RelWithDebInfo)
11+endif()
12+
13 string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower)
14
15+if(cmake_build_type_lower MATCHES relwithdebinfo) # workaround for http://public.kitware.com/Bug/view.php?id=14696
16+ add_definitions(-DQT_NO_DEBUG)
17+endif()
18+
19 #####################################################################
20 # Enable code coverage calculation with gcov/gcovr/lcov
21 # Usage:

Subscribers

People subscribed via source and target branches