Compile with debug information in release mode.

--HG--
branch : develop
This commit is contained in:
dismine 2014-09-24 20:51:06 +03:00
parent affee34d01
commit 8570a797e6
3 changed files with 20 additions and 0 deletions

View File

@ -146,6 +146,8 @@ CONFIG(debug, debug|release){
# Release
DEFINES += QT_NO_DEBUG_OUTPUT
QMAKE_CXXFLAGS_RELEASE += -g
#local revision number for using in version
HG_REV=$$system(hg parents --template '{rev}')
isEmpty(HG_REV){
@ -244,3 +246,9 @@ else:unix: LIBS += -L$${OUT_PWD}/../libs/vpropertyexplorer/$${DESTDIR} -lvproper
INCLUDEPATH += $${PWD}/../libs/vpropertyexplorer
DEPENDPATH += $${PWD}/../libs/vpropertyexplorer
CONFIG(release, debug|release){
unix:QMAKE_POST_LINK += objcopy --only-keep-debug $(TARGET) $(TARGET).debug &&
unix:QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(TARGET) &&
unix:QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(TARGET).debug $(TARGET)
}

View File

@ -106,4 +106,10 @@ CONFIG(debug, debug|release){
}else{
# Release
DEFINES += QT_NO_DEBUG_OUTPUT
QMAKE_CXXFLAGS_RELEASE += -g
unix:QMAKE_POST_LINK += objcopy --only-keep-debug $(DESTDIR)/$(TARGET) $(DESTDIR)/$(TARGET).debug &&
unix:QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(DESTDIR)/$(TARGET) &&
unix:QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(DESTDIR)/$(TARGET).debug $(DESTDIR)/$(TARGET)
}

View File

@ -149,4 +149,10 @@ CONFIG(debug, debug|release){
}else{
# Release
DEFINES += QT_NO_DEBUG_OUTPUT
QMAKE_CXXFLAGS_RELEASE += -g
unix:QMAKE_POST_LINK += objcopy --only-keep-debug $(DESTDIR)/$(TARGET) $(DESTDIR)/$(TARGET).debug &&
unix:QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(DESTDIR)/$(TARGET) &&
unix:QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(DESTDIR)/$(TARGET).debug $(DESTDIR)/$(TARGET)
}