2014-05-22 10:08:12 +02:00
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# Project created by QtCreator 2014-05-21T20:43:38
|
|
|
|
|
#
|
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Build QMuParser tests.
|
|
|
|
|
|
|
|
|
|
# File with common stuff for whole project
|
2015-07-10 11:28:30 +02:00
|
|
|
|
include(../../../common.pri)
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
|
|
|
|
# We use many core functions.
|
2014-05-22 10:08:12 +02:00
|
|
|
|
QT += core
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Consol application doesn't need gui.
|
2014-05-22 10:08:12 +02:00
|
|
|
|
QT -= gui
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Name of binary file.
|
2014-05-22 10:08:12 +02:00
|
|
|
|
TARGET = ParserTest
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
|
|
|
|
# Console application, we use C++11 standard.
|
2014-05-22 10:08:12 +02:00
|
|
|
|
CONFIG += console c++11
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
|
|
|
|
# Use out-of-source builds (shadow builds)
|
2014-05-22 10:08:12 +02:00
|
|
|
|
CONFIG -= app_bundle debug_and_release debug_and_release_target
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# We want create executable file
|
2014-05-22 10:08:12 +02:00
|
|
|
|
TEMPLATE = app
|
|
|
|
|
|
|
|
|
|
# directory for executable file
|
|
|
|
|
DESTDIR = bin
|
|
|
|
|
|
|
|
|
|
# objecs files
|
|
|
|
|
OBJECTS_DIR = obj
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
HEADERS += \
|
|
|
|
|
stable.h
|
2014-05-22 10:08:12 +02:00
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
SOURCES += \
|
|
|
|
|
main.cpp \
|
|
|
|
|
stable.cpp
|
|
|
|
|
|
2015-07-10 11:28:30 +02:00
|
|
|
|
# Set using ccache. Function enable_ccache() defined in common.pri.
|
2014-10-27 15:29:31 +01:00
|
|
|
|
$$enable_ccache()
|
|
|
|
|
|
2015-07-10 11:28:30 +02:00
|
|
|
|
# Set precompiled headers. Function set_PCH() defined in common.pri.
|
2014-10-27 15:29:31 +01:00
|
|
|
|
$$set_PCH()
|
2014-05-22 10:08:12 +02:00
|
|
|
|
|
|
|
|
|
CONFIG(debug, debug|release){
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Debug mode
|
2014-05-22 10:08:12 +02:00
|
|
|
|
unix {
|
2014-10-27 15:29:31 +01:00
|
|
|
|
#Turn on compilers warnings.
|
2014-05-22 10:08:12 +02:00
|
|
|
|
*-g++{
|
2015-05-11 09:10:25 +02:00
|
|
|
|
QMAKE_CXXFLAGS += \
|
2015-07-10 11:28:30 +02:00
|
|
|
|
$$GCC_DEBUG_CXXFLAGS # See common.pri for more details.
|
2015-05-11 09:10:25 +02:00
|
|
|
|
|
2015-05-16 16:17:34 +02:00
|
|
|
|
noAddressSanitizer{ # For enable run qmake with CONFIG+=noAddressSanitizer
|
2015-05-11 09:10:25 +02:00
|
|
|
|
# do nothing
|
|
|
|
|
} else {
|
|
|
|
|
#gcc’s 4.8.0 Address Sanitizer
|
|
|
|
|
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/
|
|
|
|
|
QMAKE_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
|
|
|
|
|
QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer
|
|
|
|
|
QMAKE_LFLAGS += -fsanitize=address
|
|
|
|
|
}
|
2014-10-27 15:29:31 +01:00
|
|
|
|
}
|
|
|
|
|
clang*{
|
|
|
|
|
QMAKE_CXXFLAGS += \
|
2015-07-10 11:28:30 +02:00
|
|
|
|
$$CLANG_DEBUG_CXXFLAGS # See common.pri for more details.
|
2015-03-16 13:23:02 +01:00
|
|
|
|
|
|
|
|
|
# -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and
|
|
|
|
|
# want them in global list. Compromise decision delete them from local list.
|
|
|
|
|
QMAKE_CXXFLAGS -= \
|
|
|
|
|
-Wmissing-prototypes
|
2014-05-22 10:08:12 +02:00
|
|
|
|
}
|
|
|
|
|
} else {
|
2014-10-27 15:29:31 +01:00
|
|
|
|
*-g++{
|
2015-07-10 11:28:30 +02:00
|
|
|
|
QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details.
|
2014-05-22 10:08:12 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
}else{
|
|
|
|
|
# Release mode
|
|
|
|
|
DEFINES += QT_NO_DEBUG_OUTPUT
|
2014-05-22 10:08:12 +02:00
|
|
|
|
|
2015-05-16 19:38:05 +02:00
|
|
|
|
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
|
|
|
|
|
# do nothing
|
|
|
|
|
} else {
|
|
|
|
|
# Turn on debug symbols in release mode on Unix systems.
|
|
|
|
|
# On Mac OS X temporarily disabled. Need find way how to strip binary file.
|
2015-05-18 10:26:54 +02:00
|
|
|
|
!macx:!win32-msvc*:QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3
|
2015-05-16 19:38:05 +02:00
|
|
|
|
}
|
2014-10-27 15:29:31 +01:00
|
|
|
|
}
|
2014-05-22 10:08:12 +02:00
|
|
|
|
|
2014-05-29 09:08:54 +02:00
|
|
|
|
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../libs/qmuparser/bin/ -lqmuparser2
|
|
|
|
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../libs/qmuparser/bin/ -lqmuparser2
|
|
|
|
|
else:unix: LIBS += -L$$OUT_PWD/../../libs/qmuparser/bin/ -lqmuparser
|
|
|
|
|
|
|
|
|
|
INCLUDEPATH += $$PWD/../../libs/qmuparser
|
|
|
|
|
DEPENDPATH += $$PWD/../../libs/qmuparser
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
2015-05-16 19:38:05 +02:00
|
|
|
|
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
|
|
|
|
|
# do nothing
|
|
|
|
|
} else {
|
|
|
|
|
noStripDebugSymbols { # For enable run qmake with CONFIG+=noStripDebugSymbols
|
|
|
|
|
# do nothing
|
|
|
|
|
} else {
|
|
|
|
|
# Strip after you link all libaries.
|
|
|
|
|
CONFIG(release, debug|release){
|
|
|
|
|
unix:!macx{
|
|
|
|
|
# Strip debug symbols.
|
|
|
|
|
QMAKE_POST_LINK += objcopy --only-keep-debug $(TARGET) $(TARGET).debug &&
|
|
|
|
|
QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(TARGET) &&
|
|
|
|
|
QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(TARGET).debug $(TARGET)
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-10-27 15:29:31 +01:00
|
|
|
|
}
|
|
|
|
|
}
|