From 888a968056baac0dbd87ccb2e8fb5bee88cd3e7f Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 22 Dec 2019 11:48:42 +0200 Subject: [PATCH] Refactoring. Remove unneeded conditions. --HG-- branch : develop --- src/app/valentina/valentina.pro | 8 ++--- src/libs/qmuparser/qmuparser.pro | 32 ++++++++++++++---- .../vpropertyexplorer/vpropertyexplorer.pro | 33 ++++++++++++++----- src/test/ParserTest/ParserTest.pro | 8 ++--- 4 files changed, 58 insertions(+), 23 deletions(-) diff --git a/src/app/valentina/valentina.pro b/src/app/valentina/valentina.pro index 8aa5686f4..e406b7086 100644 --- a/src/app/valentina/valentina.pro +++ b/src/app/valentina/valentina.pro @@ -692,17 +692,17 @@ CONFIG(release, debug|release){ } else { !macx:!*msvc*{ noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols - win32:!*msvc*{ + win32{ # Strip after you link all libaries. QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} } - unix:!macx{ + unix{ # Strip after you link all libaries. QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} } } else { - win32:!*msvc*{ + win32{ # Strip debug symbols. QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg && QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} && @@ -711,7 +711,7 @@ CONFIG(release, debug|release){ QMAKE_DISTCLEAN += bin/${TARGET}.dbg } - unix:!macx{ + unix{ # Strip debug symbols. QMAKE_POST_LINK += objcopy --only-keep-debug ${TARGET} ${TARGET}.dbg && QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} && diff --git a/src/libs/qmuparser/qmuparser.pro b/src/libs/qmuparser/qmuparser.pro index 901824e7d..dc56c86d8 100644 --- a/src/libs/qmuparser/qmuparser.pro +++ b/src/libs/qmuparser/qmuparser.pro @@ -98,8 +98,15 @@ CONFIG(release, debug|release){ } else { !macx:!*msvc*{ noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols - # Strip after you link all libaries. - QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} + win32{ + # Strip debug symbols. + QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} + } + + unix{ + # Strip after you link all libaries. + QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} + } } else { # Turn on debug symbols in release mode on Unix systems. # On Mac OS X temporarily disabled. TODO: find way how to strip binary file. @@ -107,12 +114,23 @@ CONFIG(release, debug|release){ QMAKE_CFLAGS_RELEASE += -g -gdwarf-3 QMAKE_LFLAGS_RELEASE = - # Strip debug symbols. - QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg && - QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} && - QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET} + win32{ + # Strip debug symbols. + QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg && + QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} && + QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET} - QMAKE_DISTCLEAN += bin/${TARGET}.dbg + QMAKE_DISTCLEAN += bin/${TARGET}.dbg + } + + unix{ + # Strip debug symbols. + QMAKE_POST_LINK += objcopy --only-keep-debug ${TARGET} ${TARGET}.dbg && + QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} && + QMAKE_POST_LINK += objcopy --add-gnu-debuglink="${TARGET}.dbg" ${TARGET} + + QMAKE_DISTCLEAN += ${TARGET}.dbg + } } } } diff --git a/src/libs/vpropertyexplorer/vpropertyexplorer.pro b/src/libs/vpropertyexplorer/vpropertyexplorer.pro index 532edc006..ca3cd992b 100644 --- a/src/libs/vpropertyexplorer/vpropertyexplorer.pro +++ b/src/libs/vpropertyexplorer/vpropertyexplorer.pro @@ -97,22 +97,39 @@ CONFIG(release, debug|release){ } else { !macx:!*msvc*{ noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols - # Strip after you link all libaries. - QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} + win32{ + # Strip debug symbols. + QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} + } + + unix{ + # Strip after you link all libaries. + QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} + } } else { - # Strip after you link all libaries. # Turn on debug symbols in release mode on Unix systems. # On Mac OS X temporarily disabled. TODO: find way how to strip binary file. QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3 QMAKE_CFLAGS_RELEASE += -g -gdwarf-3 QMAKE_LFLAGS_RELEASE = - # Strip debug symbols. - QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg && - QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} && - QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET} + win32{ + # Strip debug symbols. + QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg && + QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} && + QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET} - QMAKE_DISTCLEAN += bin/${TARGET}.dbg + QMAKE_DISTCLEAN += bin/${TARGET}.dbg + } + + unix{ + # Strip debug symbols. + QMAKE_POST_LINK += objcopy --only-keep-debug ${TARGET} ${TARGET}.dbg && + QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} && + QMAKE_POST_LINK += objcopy --add-gnu-debuglink="${TARGET}.dbg" ${TARGET} + + QMAKE_DISTCLEAN += ${TARGET}.dbg + } } } } diff --git a/src/test/ParserTest/ParserTest.pro b/src/test/ParserTest/ParserTest.pro index 65ba24b2e..cc6de287f 100644 --- a/src/test/ParserTest/ParserTest.pro +++ b/src/test/ParserTest/ParserTest.pro @@ -100,17 +100,17 @@ CONFIG(release, debug|release){ } else { !macx:!*msvc*{ noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols - win32:!*msvc*{ + win32{ # Strip debug symbols. QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} } - unix:!macx{ + unix{ # Strip debug symbols. QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} } } else { - win32:!*msvc*{ + win32{ # Strip debug symbols. QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg && QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} && @@ -119,7 +119,7 @@ CONFIG(release, debug|release){ QMAKE_DISTCLEAN += bin/${TARGET}.dbg } - unix:!macx{ + unix{ # Strip debug symbols. QMAKE_POST_LINK += objcopy --only-keep-debug ${TARGET} ${TARGET}.dbg && QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} &&