View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014696CMakeCMakepublic2014-01-14 04:522014-06-02 08:38
ReporterGerry Boland 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
Platformx86_64OSUbuntu linuxOS Version14.01
Product VersionCMake 2.8.12.1 
Target VersionFixed in Version 
Summary0014696: CMake does not add QT_NO_DEBUG definition for RelWithDebInfo build type
DescriptionIn a Qt5 CMake project with code like the following:

cmake_minimum_required(VERSION 2.8.12)
find_package(Qt5Core REQUIRED)
target_link_libraries(${PROJECT_NAME} Qt5::Core)

Running with "cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo" I see that CMake does not define QT_NO_DEBUG.

I interpreted the distinction between the Debug build type from the RelWithDebInfo type as being that while RelWithDebInfo also does not strip symbols from the generated binaries, it does allow developers to disable debug helpers like run-time asserts or expensive printing statements. So for Qt, setting QT_NO_DEBUG for RelWithDebInfo makes sense.

I'd like to know if my interpretation is correct before proceeding with a fix, something like adding
    set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
to Qt5CoreMacros.cmake around like 246.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0034933)
Brad King (manager)
2014-01-14 09:00

The Qt5 CMake files are provided by Qt, not CMake. This will have to be raised over there.
(0036081)
Robert Maynard (manager)
2014-06-02 08:38

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2014-01-14 04:52 Gerry Boland New Issue
2014-01-14 09:00 Brad King Note Added: 0034933
2014-01-14 09:00 Brad King Status new => resolved
2014-01-14 09:00 Brad King Resolution open => no change required
2014-06-02 08:38 Robert Maynard Note Added: 0036081
2014-06-02 08:38 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team