2015-03-31 16:48:58 +02:00
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# Project created by QtCreator 2015-03-31T17:27:03
|
|
|
|
|
#
|
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
2015-04-15 14:11:13 +02:00
|
|
|
|
QT += testlib gui printsupport
|
2015-03-31 16:48:58 +02:00
|
|
|
|
|
2015-04-15 20:41:29 +02:00
|
|
|
|
TARGET = ValentinaTests
|
2015-03-31 16:48:58 +02:00
|
|
|
|
|
2015-04-15 14:11:13 +02:00
|
|
|
|
# File with common stuff for whole project
|
2015-07-10 11:28:30 +02:00
|
|
|
|
include(../../../common.pri)
|
2015-04-15 14:11:13 +02:00
|
|
|
|
|
2015-04-02 19:43:33 +02:00
|
|
|
|
# CONFIG += testcase adds a 'make check' which is great. But by default it also
|
|
|
|
|
# adds a 'make install' that installs the test cases, which we do not want.
|
|
|
|
|
# Can configure it not to do that with 'no_testcase_installs'
|
|
|
|
|
# We use C++11 standard
|
|
|
|
|
CONFIG += c++11 testcase no_testcase_installs
|
2015-03-31 16:48:58 +02:00
|
|
|
|
|
|
|
|
|
# Use out-of-source builds (shadow builds)
|
2015-04-02 19:43:33 +02:00
|
|
|
|
CONFIG -= app_bundle debug_and_release debug_and_release_target
|
2015-03-31 16:48:58 +02:00
|
|
|
|
|
2015-04-02 19:43:33 +02:00
|
|
|
|
TEMPLATE = app
|
|
|
|
|
|
|
|
|
|
# directory for executable file
|
|
|
|
|
DESTDIR = bin
|
|
|
|
|
|
|
|
|
|
# Directory for files created moc
|
|
|
|
|
MOC_DIR = moc
|
2015-03-31 16:48:58 +02:00
|
|
|
|
|
2015-04-02 19:43:33 +02:00
|
|
|
|
# objecs files
|
|
|
|
|
OBJECTS_DIR = obj
|
2015-04-02 13:31:23 +02:00
|
|
|
|
|
2015-03-31 16:48:58 +02:00
|
|
|
|
DEFINES += SRCDIR=\\\"$$PWD/\\\"
|
|
|
|
|
|
|
|
|
|
SOURCES += \
|
|
|
|
|
qttestmainlambda.cpp \
|
2015-04-16 15:54:40 +02:00
|
|
|
|
tst_vposter.cpp \
|
2015-05-07 15:12:53 +02:00
|
|
|
|
tst_vabstractdetail.cpp \
|
|
|
|
|
tst_vspline.cpp \
|
2015-05-11 14:59:53 +02:00
|
|
|
|
abstracttest.cpp \
|
2015-05-17 17:31:17 +02:00
|
|
|
|
tst_nameregexp.cpp \
|
2015-06-09 12:21:10 +02:00
|
|
|
|
tst_vlayoutdetail.cpp \
|
2015-06-15 16:06:37 +02:00
|
|
|
|
tst_varc.cpp \
|
2015-09-17 20:44:15 +02:00
|
|
|
|
stable.cpp \
|
2015-09-28 12:42:26 +02:00
|
|
|
|
tst_measurementregexp.cpp \
|
2015-10-04 14:20:12 +02:00
|
|
|
|
tst_tapecommandline.cpp \
|
2015-10-15 12:41:42 +02:00
|
|
|
|
tst_valentinacommandline.cpp \
|
|
|
|
|
tst_qmutokenparser.cpp
|
2015-03-31 16:48:58 +02:00
|
|
|
|
|
|
|
|
|
HEADERS += \
|
2015-04-16 15:54:40 +02:00
|
|
|
|
tst_vposter.h \
|
2015-05-07 15:12:53 +02:00
|
|
|
|
tst_vabstractdetail.h \
|
|
|
|
|
tst_vspline.h \
|
2015-05-11 14:59:53 +02:00
|
|
|
|
abstracttest.h \
|
2015-05-17 17:31:17 +02:00
|
|
|
|
tst_nameregexp.h \
|
2015-06-09 12:21:10 +02:00
|
|
|
|
tst_vlayoutdetail.h \
|
2015-06-15 16:06:37 +02:00
|
|
|
|
tst_varc.h \
|
2015-09-17 20:44:15 +02:00
|
|
|
|
stable.h \
|
2015-09-28 12:42:26 +02:00
|
|
|
|
tst_measurementregexp.h \
|
2015-10-04 14:20:12 +02:00
|
|
|
|
tst_tapecommandline.h \
|
2015-10-15 12:41:42 +02:00
|
|
|
|
tst_valentinacommandline.h \
|
|
|
|
|
tst_qmutokenparser.h
|
2015-06-15 16:06:37 +02:00
|
|
|
|
|
2015-07-10 11:28:30 +02:00
|
|
|
|
# Set using ccache. Function enable_ccache() defined in common.pri.
|
2015-06-15 16:06:37 +02:00
|
|
|
|
$$enable_ccache()
|
|
|
|
|
|
2015-07-10 11:28:30 +02:00
|
|
|
|
# Set precompiled headers. Function set_PCH() defined in common.pri.
|
2015-06-15 16:06:37 +02:00
|
|
|
|
$$set_PCH()
|
2015-04-15 14:11:13 +02:00
|
|
|
|
|
|
|
|
|
CONFIG(debug, debug|release){
|
|
|
|
|
# Debug mode
|
|
|
|
|
unix {
|
|
|
|
|
#Turn on compilers warnings.
|
|
|
|
|
*-g++{
|
|
|
|
|
QMAKE_CXXFLAGS += \
|
|
|
|
|
# Key -isystem disable checking errors in system headers.
|
|
|
|
|
-isystem "$${OUT_PWD}/$${UI_DIR}" \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${RCC_DIR}" \
|
2015-07-10 11:28:30 +02:00
|
|
|
|
$$GCC_DEBUG_CXXFLAGS # See common.pri for more details.
|
2015-04-15 14:11:13 +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
|
|
|
|
|
}
|
2015-04-15 14:11:13 +02:00
|
|
|
|
}
|
|
|
|
|
clang*{
|
|
|
|
|
QMAKE_CXXFLAGS += \
|
|
|
|
|
# Key -isystem disable checking errors in system headers.
|
|
|
|
|
-isystem "$${OUT_PWD}/$${UI_DIR}" \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${RCC_DIR}" \
|
2015-07-10 11:28:30 +02:00
|
|
|
|
$$CLANG_DEBUG_CXXFLAGS # See common.pri for more details.
|
2015-04-15 14:11:13 +02:00
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
*-g++{
|
2015-07-10 11:28:30 +02:00
|
|
|
|
QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details.
|
2015-04-15 14:11:13 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
# Release mode
|
2015-10-09 19:22:49 +02:00
|
|
|
|
CONFIG += silent
|
2015-04-15 14:11:13 +02:00
|
|
|
|
DEFINES += V_NO_ASSERT
|
|
|
|
|
!unix:*-g++{
|
|
|
|
|
QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll
|
|
|
|
|
}
|
|
|
|
|
|
2015-05-18 10:26:54 +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.
|
|
|
|
|
!macx:!win32-msvc*{
|
|
|
|
|
QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3
|
|
|
|
|
QMAKE_CFLAGS_RELEASE += -g -gdwarf-3
|
|
|
|
|
QMAKE_LFLAGS_RELEASE =
|
|
|
|
|
}
|
2015-04-15 14:11:13 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-17 20:44:15 +02:00
|
|
|
|
#VPatternDB static library (depend on vgeometry, vmisc, VLayout)
|
|
|
|
|
unix|win32: LIBS += -L$$OUT_PWD/../../libs/vpatterndb/$${DESTDIR} -lvpatterndb
|
2015-04-15 14:11:13 +02:00
|
|
|
|
|
2015-09-17 20:44:15 +02:00
|
|
|
|
INCLUDEPATH += $$PWD/../../libs/vpatterndb
|
|
|
|
|
DEPENDPATH += $$PWD/../../libs/vpatterndb
|
2015-04-15 14:11:13 +02:00
|
|
|
|
|
2015-09-17 20:44:15 +02:00
|
|
|
|
win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vpatterndb/$${DESTDIR}/vpatterndb.lib
|
|
|
|
|
else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vpatterndb/$${DESTDIR}/libvpatterndb.a
|
2015-05-07 15:12:53 +02:00
|
|
|
|
|
2015-09-17 20:44:15 +02:00
|
|
|
|
#VMisc static library
|
|
|
|
|
unix|win32: LIBS += -L$$OUT_PWD/../../libs/vmisc/$${DESTDIR}/ -lvmisc
|
|
|
|
|
|
|
|
|
|
INCLUDEPATH += $$PWD/../../libs/vmisc
|
|
|
|
|
DEPENDPATH += $$PWD/../../libs/vmisc
|
|
|
|
|
|
|
|
|
|
win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vmisc/$${DESTDIR}/vmisc.lib
|
|
|
|
|
else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vmisc/$${DESTDIR}/libvmisc.a
|
|
|
|
|
|
|
|
|
|
# VGeometry static library (depend on ifc)
|
2015-05-07 15:12:53 +02:00
|
|
|
|
unix|win32: LIBS += -L$$OUT_PWD/../../libs/vgeometry/$${DESTDIR} -lvgeometry
|
|
|
|
|
|
|
|
|
|
INCLUDEPATH += $$PWD/../../libs/vgeometry
|
|
|
|
|
DEPENDPATH += $$PWD/../../libs/vgeometry
|
|
|
|
|
|
|
|
|
|
win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vgeometry/$${DESTDIR}/vgeometry.lib
|
|
|
|
|
else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vgeometry/$${DESTDIR}/libvgeometry.a
|
2015-09-17 20:44:15 +02:00
|
|
|
|
|
|
|
|
|
# IFC static library (depend on QMuParser)
|
|
|
|
|
unix|win32: LIBS += -L$$OUT_PWD/../../libs/ifc/$${DESTDIR}/ -lifc
|
|
|
|
|
|
|
|
|
|
INCLUDEPATH += $$PWD/../../libs/ifc
|
|
|
|
|
DEPENDPATH += $$PWD/../../libs/ifc
|
|
|
|
|
|
|
|
|
|
win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/ifc/$${DESTDIR}/ifc.lib
|
|
|
|
|
else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/ifc/$${DESTDIR}/libifc.a
|
|
|
|
|
|
|
|
|
|
# VLayout static library
|
|
|
|
|
unix|win32: LIBS += -L$$OUT_PWD/../../libs/vlayout/$${DESTDIR} -lvlayout
|
|
|
|
|
|
|
|
|
|
INCLUDEPATH += $$PWD/../../libs/vlayout
|
|
|
|
|
DEPENDPATH += $$PWD/../../libs/vlayout
|
|
|
|
|
|
|
|
|
|
win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vlayout/$${DESTDIR}/vlayout.lib
|
|
|
|
|
else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vlayout/$${DESTDIR}/libvlayout.a
|
|
|
|
|
|
|
|
|
|
# QMuParser library
|
|
|
|
|
win32:CONFIG(release, debug|release): LIBS += -L$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -lqmuparser2
|
|
|
|
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -lqmuparser2
|
|
|
|
|
else:unix: LIBS += -L$${OUT_PWD}/../../libs/qmuparser/$${DESTDIR} -lqmuparser
|
|
|
|
|
|
|
|
|
|
INCLUDEPATH += $${PWD}/../../libs/qmuparser
|
|
|
|
|
DEPENDPATH += $${PWD}/../../libs/qmuparser
|
2015-09-28 12:42:26 +02:00
|
|
|
|
|
|
|
|
|
# Only for adding path to LD_LIBRARY_PATH
|
|
|
|
|
# VPropertyExplorer library
|
|
|
|
|
win32:CONFIG(release, debug|release): LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer
|
|
|
|
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer
|
|
|
|
|
else:unix: LIBS += -L$${OUT_PWD}/../../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer
|
|
|
|
|
|
|
|
|
|
INCLUDEPATH += $${PWD}/../../libs/vpropertyexplorer
|
|
|
|
|
DEPENDPATH += $${PWD}/../../libs/vpropertyexplorer
|
|
|
|
|
|
|
|
|
|
TAPE_TEST_FILES += \
|
2015-10-03 13:09:06 +02:00
|
|
|
|
tst_tape/keiko.vit \
|
|
|
|
|
tst_tape/empty.vit \
|
|
|
|
|
tst_tape/all_measurements.vit \
|
|
|
|
|
tst_tape/all_measurements.vst \
|
|
|
|
|
tst_tape/GOST_man_ru.vst \
|
|
|
|
|
tst_tape/broken1.vit \
|
|
|
|
|
tst_tape/broken2.vit \
|
|
|
|
|
tst_tape/broken3.vit \
|
|
|
|
|
tst_tape/broken4.vit
|
|
|
|
|
|
2015-10-04 14:20:12 +02:00
|
|
|
|
VALENTINA_TEST_FILES += \
|
|
|
|
|
tst_valentina/empty.val \
|
2015-10-07 20:50:40 +02:00
|
|
|
|
tst_valentina/issue_372.val \
|
|
|
|
|
tst_valentina/wrong_obj_type.val
|
2015-10-04 14:20:12 +02:00
|
|
|
|
|
2015-10-03 13:09:06 +02:00
|
|
|
|
# Compilation will fail without this files after we added them to this section.
|
|
|
|
|
OTHER_FILES += \
|
2015-10-04 14:20:12 +02:00
|
|
|
|
$$TAPE_TEST_FILES \
|
|
|
|
|
$$VALENTINA_TEST_FILES
|
2015-09-28 12:42:26 +02:00
|
|
|
|
|
|
|
|
|
for(DIR, TAPE_TEST_FILES) {
|
|
|
|
|
#add these absolute paths to a variable which
|
|
|
|
|
#ends up as 'mkcommands = path1 path2 path3 ...'
|
|
|
|
|
tape_path += $${PWD}/$$DIR
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
copyToDestdir($$tape_path, $$shell_path($${OUT_PWD}/$$DESTDIR/tst_tape))
|
2015-10-04 14:20:12 +02:00
|
|
|
|
|
|
|
|
|
for(DIR, VALENTINA_TEST_FILES) {
|
|
|
|
|
#add these absolute paths to a variable which
|
|
|
|
|
#ends up as 'mkcommands = path1 path2 path3 ...'
|
|
|
|
|
valentina_path += $${PWD}/$$DIR
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
copyToDestdir($$valentina_path, $$shell_path($${OUT_PWD}/$$DESTDIR/tst_valentina))
|