[CMake] How to handle RelWithDebInfo and MinSizeRel when not built?

Stephen Kelly steveire at gmail.com
Fri Jan 18 09:22:29 EST 2013


Hi,

In Qt 5, we create CMake Config files and ship them with the Qt installation 
to make it possible to use Qt 5 with CMake.

Qt on Windows and Mac is packaged with both a debug configuration and a 
release configuration, so an IMPORTED library is created with both a DEBUG 
location and a RELEASE location. 

We don't currently create a location for RelWithDebInfo or MinSizeRel, 
leading to this bug report:

 https://bugreports.qt-project.org/browse/QTBUG-29186

I checked the FindQt4 module, and it also does not create IMPORTED locations 
for RelWithDebInfo or MinSizeRel either, so I wonder if this issue has come 
up before?

As I don't use Windows or Mac, I'm not really familiar with those systems or 
configurations, so I'm looking for some guidance on what should be done 
here. 

The suggestion in the bug report looks somewhat reasonable to me, but then 
again, we don't actually create separate debug info, and the 'Release' 
configuration would be no different to the 'RelWithDebInfo' configuration, 
so it's sort of a 'lie'. 

The real need for it though is probably that it allows the downstream of Qt 
to use RelWithDebInfo themselves?

The alternative way to do that would be to set the MAP_IMPORTED_CONFIG* 
properties. I'm not sure whether I should advise that and close the bug 
report, or should I implement the suggested change. 

Any ideas?

Thanks,

Steve.




More information about the CMake mailing list