2015-07-23 13:01:02 +02:00
|
|
|
INCLUDEPATH += ../mockup
|
2020-06-11 17:25:46 +02:00
|
|
|
INCLUDEPATH += ../mockup/qmldesigner/designercore/include
|
2015-06-01 18:51:55 +02:00
|
|
|
|
2017-01-30 14:38:18 +01:00
|
|
|
QT += core network testlib widgets
|
2020-06-30 15:11:15 +02:00
|
|
|
CONFIG += console c++17 testcase
|
2017-01-30 14:38:18 +01:00
|
|
|
CONFIG -= app_bundle shared
|
|
|
|
|
|
2020-06-05 19:55:10 +02:00
|
|
|
QTC_UNITTEST_BUILD_CPP_PARSER = $$(QTC_UNITTEST_BUILD_CPP_PARSER)
|
|
|
|
|
|
2015-07-22 16:56:17 +02:00
|
|
|
include(gmock_dependency.pri)
|
|
|
|
|
include(clang_dependency.pri)
|
|
|
|
|
include(creator_dependency.pri)
|
2016-02-16 16:04:54 +01:00
|
|
|
include(benchmark_dependency.pri)
|
2015-07-08 14:07:13 +02:00
|
|
|
|
2019-06-26 15:10:07 +02:00
|
|
|
requires(isEmpty(QTC_CLANG_BUILDMODE_MISMATCH))
|
|
|
|
|
|
2017-03-03 20:24:46 +01:00
|
|
|
!msvc:force_debug_info:QMAKE_CXXFLAGS += -fno-omit-frame-pointer
|
2016-02-17 11:40:56 +01:00
|
|
|
|
2015-07-22 16:56:17 +02:00
|
|
|
DEFINES += \
|
2019-04-05 11:53:16 +02:00
|
|
|
QT_NO_CAST_TO_ASCII \
|
|
|
|
|
QT_RESTRICTED_CAST_FROM_ASCII \
|
2020-08-06 14:02:05 +02:00
|
|
|
QT_USE_QSTRINGBUILDER \
|
2016-02-17 11:41:23 +01:00
|
|
|
UNIT_TESTS \
|
2015-08-19 12:36:43 +02:00
|
|
|
DONT_CHECK_MESSAGE_COUNTER \
|
2018-09-26 14:10:35 +02:00
|
|
|
QTC_RESOURCE_DIR=\"R\\\"xxx($$PWD/../../../share/qtcreator)xxx\\\"\" \
|
2015-07-22 16:56:17 +02:00
|
|
|
TESTDATA_DIR=\"R\\\"xxx($$PWD/data)xxx\\\"\"
|
2016-04-26 11:09:44 +02:00
|
|
|
msvc: QMAKE_CXXFLAGS_WARN_ON -= -w34100 # 'unreferenced formal parameter' in MATCHER_* functions
|
2015-07-22 16:56:17 +02:00
|
|
|
win32:DEFINES += ECHOSERVER=\"R\\\"xxx($$OUT_PWD/../echo)xxx\\\"\"
|
|
|
|
|
unix: DEFINES += ECHOSERVER=\"R\\\"xxx($$OUT_PWD/../echoserver/echo)xxx\\\"\"
|
|
|
|
|
|
2019-04-07 15:57:42 +02:00
|
|
|
RELATIVE_DATA_PATH = ../../../share/qtcreator
|
|
|
|
|
DEFINES += $$shell_quote(RELATIVE_DATA_PATH=\"$$RELATIVE_DATA_PATH\")
|
|
|
|
|
|
2021-07-09 08:08:01 +02:00
|
|
|
win32 {
|
|
|
|
|
RELATIVE_LIBEXEC_PATH = .
|
|
|
|
|
} else: macos {
|
|
|
|
|
RELATIVE_LIBEXEC_PATH = ../Resources/libexec
|
|
|
|
|
} else {
|
|
|
|
|
RELATIVE_LIBEXEC_PATH = ../libexec/qtcreator
|
|
|
|
|
}
|
|
|
|
|
DEFINES += $$shell_quote(RELATIVE_LIBEXEC_PATH=\"$$RELATIVE_LIBEXEC_PATH\")
|
|
|
|
|
|
2017-02-08 20:08:21 +01:00
|
|
|
linux {
|
|
|
|
|
QMAKE_LFLAGS_RELEASE = #disable optimization
|
|
|
|
|
QMAKE_LFLAGS += -fno-merge-debug-strings -fuse-ld=gold
|
|
|
|
|
CONFIG(release, debug|release):QMAKE_LFLAGS += -Wl,--strip-debug
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-07 09:19:39 +02:00
|
|
|
CONFIG(debug, debug|release): DEFINES += SQLITE_DEBUG
|
|
|
|
|
|
|
|
|
|
|
2017-09-25 13:50:04 +02:00
|
|
|
gcc:!clang: QMAKE_CXXFLAGS += -Wno-noexcept-type
|
2020-06-18 19:46:01 +02:00
|
|
|
msvc{
|
|
|
|
|
QMAKE_CXXFLAGS += /bigobj /wd4267 /wd4141 /wd4146 /wd4624
|
|
|
|
|
QMAKE_LFLAGS += /INCREMENTAL
|
2017-09-25 13:50:04 +02:00
|
|
|
|
2020-06-18 19:46:01 +02:00
|
|
|
}
|
2017-02-08 14:31:55 +01:00
|
|
|
# create fake CppTools.json for the mime type definitions
|
|
|
|
|
dependencyList = "\"Dependencies\" : []"
|
|
|
|
|
cpptoolsjson.input = $$PWD/../../../src/plugins/cpptools/CppTools.json.in
|
|
|
|
|
cpptoolsjson.output = $$OUT_PWD/CppTools.json
|
|
|
|
|
QMAKE_SUBSTITUTES += cpptoolsjson
|
|
|
|
|
DEFINES += CPPTOOLS_JSON=\"R\\\"xxx($${cpptoolsjson.output})xxx\\\"\"
|
|
|
|
|
|
2016-08-17 14:18:55 +02:00
|
|
|
SOURCES += \
|
2016-09-15 17:41:41 +02:00
|
|
|
clientserverinprocess-test.cpp \
|
2017-07-24 17:10:29 +02:00
|
|
|
clientserveroutsideprocess-test.cpp \
|
2016-11-29 17:32:34 +01:00
|
|
|
cppprojectfilecategorizer-test.cpp \
|
2017-02-06 16:59:53 +01:00
|
|
|
cppprojectinfogenerator-test.cpp \
|
2017-07-24 17:10:29 +02:00
|
|
|
fakeprocess.cpp \
|
|
|
|
|
gtest-creator-printing.cpp \
|
|
|
|
|
gtest-qt-printing.cpp \
|
2021-01-13 13:23:46 +01:00
|
|
|
asynchronousimagecache-test.cpp \
|
2021-04-14 15:30:43 +02:00
|
|
|
nodelistproperty-test.cpp \
|
2021-05-04 15:10:28 +02:00
|
|
|
projectstoragesqlitefunctionregistry-test.cpp \
|
2021-04-26 12:11:23 +02:00
|
|
|
storagecache-test.cpp \
|
2021-05-18 12:14:16 +02:00
|
|
|
sqlitealgorithms-test.cpp \
|
2021-01-13 13:23:46 +01:00
|
|
|
synchronousimagecache-test.cpp \
|
2020-09-16 13:44:43 +02:00
|
|
|
imagecachegenerator-test.cpp \
|
|
|
|
|
imagecachestorage-test.cpp \
|
2020-05-12 12:54:18 +02:00
|
|
|
lastchangedrowid-test.cpp \
|
2017-07-24 17:10:29 +02:00
|
|
|
lineprefixer-test.cpp \
|
2020-06-11 17:25:46 +02:00
|
|
|
listmodeleditor-test.cpp \
|
2016-12-05 15:24:09 +01:00
|
|
|
mimedatabase-utilities.cpp \
|
2017-07-24 17:10:29 +02:00
|
|
|
processevents-utilities.cpp \
|
2016-09-15 17:41:41 +02:00
|
|
|
readandwritemessageblock-test.cpp \
|
|
|
|
|
sizedarray-test.cpp \
|
|
|
|
|
smallstring-test.cpp \
|
2016-08-17 14:18:55 +02:00
|
|
|
spydummy.cpp \
|
2020-05-27 23:48:03 +02:00
|
|
|
sqlitesessions-test.cpp \
|
2020-04-27 20:01:38 +02:00
|
|
|
sqlitevalue-test.cpp \
|
2016-08-17 15:29:37 +02:00
|
|
|
eventspy.cpp \
|
2016-09-15 17:41:41 +02:00
|
|
|
unittests-main.cpp \
|
2017-08-21 12:00:27 +02:00
|
|
|
utf8-test.cpp \
|
2017-09-19 11:48:47 +02:00
|
|
|
sqliteindex-test.cpp \
|
2017-09-19 17:56:54 +02:00
|
|
|
sqlitetransaction-test.cpp \
|
2016-08-17 15:29:37 +02:00
|
|
|
processcreator-test.cpp \
|
2018-02-06 15:48:24 +01:00
|
|
|
mocktimer.cpp \
|
2020-02-03 13:20:09 +01:00
|
|
|
task.cpp \
|
2018-10-25 11:08:39 +02:00
|
|
|
compilationdatabaseutils-test.cpp \
|
2018-12-17 12:06:57 +01:00
|
|
|
headerpathfilter-test.cpp \
|
2020-04-27 20:01:38 +02:00
|
|
|
sqlitecolumn-test.cpp \
|
|
|
|
|
sqlitedatabasebackend-test.cpp \
|
|
|
|
|
sqlitedatabase-test.cpp \
|
|
|
|
|
sqlitestatement-test.cpp \
|
|
|
|
|
sqlitetable-test.cpp \
|
|
|
|
|
sqlstatementbuilder-test.cpp \
|
2020-09-16 13:44:43 +02:00
|
|
|
createtablesqlstatementbuilder-test.cpp \
|
|
|
|
|
sqlitereadstatementmock.cpp \
|
2021-04-28 16:18:59 +02:00
|
|
|
sqlitewritestatementmock.cpp \
|
|
|
|
|
sqlitereadwritestatementmock.cpp \
|
|
|
|
|
sourcepath-test.cpp \
|
|
|
|
|
sourcepathview-test.cpp \
|
2021-05-04 16:36:06 +02:00
|
|
|
projectstorage-test.cpp \
|
|
|
|
|
sourcepathcache-test.cpp
|
2016-08-17 14:18:55 +02:00
|
|
|
|
2020-06-13 16:06:33 +02:00
|
|
|
!isEmpty(QTC_UNITTEST_BUILD_CPP_PARSER):SOURCES += matchingtext-test.cpp
|
2020-06-05 19:55:10 +02:00
|
|
|
|
2016-08-31 15:15:48 +02:00
|
|
|
!isEmpty(LIBCLANG_LIBS) {
|
2015-07-22 16:56:17 +02:00
|
|
|
SOURCES += \
|
2016-01-11 15:20:04 +01:00
|
|
|
chunksreportedmonitor.cpp \
|
2016-09-15 17:41:41 +02:00
|
|
|
clangasyncjob-base.cpp \
|
|
|
|
|
clangcodecompleteresults-test.cpp \
|
2017-06-14 16:48:07 +02:00
|
|
|
clangcodemodelserver-test.cpp \
|
2016-09-15 17:41:41 +02:00
|
|
|
clangcompletecodejob-test.cpp \
|
|
|
|
|
clangdiagnosticfilter-test.cpp \
|
2017-07-24 17:10:29 +02:00
|
|
|
clangdocumentprocessors-test.cpp \
|
|
|
|
|
clangdocumentprocessor-test.cpp \
|
2016-09-15 17:41:41 +02:00
|
|
|
clangdocuments-test.cpp \
|
|
|
|
|
clangdocument-test.cpp \
|
|
|
|
|
clangfixitoperation-test.cpp \
|
2017-02-07 15:00:38 +01:00
|
|
|
clangfollowsymbol-test.cpp \
|
2016-09-15 17:41:41 +02:00
|
|
|
clangisdiagnosticrelatedtolocation-test.cpp \
|
|
|
|
|
clangjobqueue-test.cpp \
|
|
|
|
|
clangjobs-test.cpp \
|
2017-07-24 17:10:29 +02:00
|
|
|
clangparsesupportivetranslationunitjob-test.cpp \
|
2018-05-31 15:21:53 +02:00
|
|
|
clangrequestannotationsjob-test.cpp \
|
2017-06-09 12:19:09 +02:00
|
|
|
clangrequestreferencesjob-test.cpp \
|
2017-07-28 15:15:46 +02:00
|
|
|
clangresumedocumentjob-test.cpp \
|
2016-09-15 17:41:41 +02:00
|
|
|
clangstring-test.cpp \
|
2017-07-24 17:10:29 +02:00
|
|
|
clangsupportivetranslationunitinitializer-test.cpp \
|
2017-07-28 15:15:46 +02:00
|
|
|
clangsuspenddocumentjob-test.cpp \
|
2018-01-12 12:29:43 +01:00
|
|
|
clangtooltipinfo-test.cpp \
|
2016-09-13 10:41:22 +02:00
|
|
|
clangtranslationunits-test.cpp \
|
2017-07-24 17:10:29 +02:00
|
|
|
clangtranslationunit-test.cpp \
|
2018-05-31 15:21:53 +02:00
|
|
|
clangupdateannotationsjob-test.cpp \
|
2017-07-24 17:10:29 +02:00
|
|
|
codecompleter-test.cpp \
|
2016-09-15 17:41:41 +02:00
|
|
|
codecompletionsextractor-test.cpp \
|
|
|
|
|
completionchunkstotextconverter-test.cpp \
|
|
|
|
|
cursor-test.cpp \
|
|
|
|
|
diagnosticset-test.cpp \
|
|
|
|
|
diagnostic-test.cpp \
|
|
|
|
|
fixit-test.cpp \
|
2020-09-08 15:48:52 +02:00
|
|
|
gtest-clang-printing.cpp \
|
2019-07-11 17:40:46 +02:00
|
|
|
highlightingresultreporter-test.cpp \
|
2016-09-15 17:41:41 +02:00
|
|
|
senddocumenttracker-test.cpp \
|
|
|
|
|
skippedsourceranges-test.cpp \
|
|
|
|
|
sourcelocation-test.cpp \
|
|
|
|
|
sourcerange-test.cpp \
|
2018-09-24 12:10:19 +02:00
|
|
|
token-test.cpp \
|
2020-09-08 15:48:52 +02:00
|
|
|
tokenprocessor-test.cpp \
|
2016-09-15 17:41:41 +02:00
|
|
|
translationunitupdater-test.cpp \
|
|
|
|
|
unsavedfiles-test.cpp \
|
|
|
|
|
unsavedfile-test.cpp \
|
2020-04-27 20:01:38 +02:00
|
|
|
utf8positionfromlinecolumn-test.cpp \
|
2021-03-24 18:10:55 +01:00
|
|
|
clangreferencescollector-test.cpp \
|
|
|
|
|
clangdocumentsuspenderresumer-test.cpp \
|
2020-04-27 20:01:38 +02:00
|
|
|
readexporteddiagnostics-test.cpp
|
2020-06-13 16:06:33 +02:00
|
|
|
|
|
|
|
|
!isEmpty(QTC_UNITTEST_BUILD_CPP_PARSER):SOURCE += \
|
|
|
|
|
clangcompletioncontextanalyzer-test.cpp \
|
|
|
|
|
activationsequencecontextprocessor-test.cpp \
|
|
|
|
|
activationsequenceprocessor-test.cpp
|
|
|
|
|
|
2016-08-17 14:18:55 +02:00
|
|
|
}
|
|
|
|
|
|
2016-08-31 15:15:48 +02:00
|
|
|
!isEmpty(LIBTOOLING_LIBS) {
|
2016-08-17 14:18:55 +02:00
|
|
|
SOURCES += \
|
2019-02-14 15:33:00 +01:00
|
|
|
gtest-llvm-printing.cpp \
|
2016-08-17 14:18:55 +02:00
|
|
|
}
|
2016-02-17 16:05:41 +01:00
|
|
|
|
2019-01-16 09:37:54 +01:00
|
|
|
!isEmpty(CLANGFORMAT_LIBS) {
|
|
|
|
|
SOURCES += clangformat-test.cpp
|
|
|
|
|
}
|
|
|
|
|
|
2019-07-11 17:40:46 +02:00
|
|
|
!isEmpty(GOOGLEBENCHMARK_DIR):exists($$GOOGLEBENCHMARK_DIR) {
|
2016-02-17 16:05:41 +01:00
|
|
|
SOURCES += \
|
2016-09-15 17:41:41 +02:00
|
|
|
smallstring-benchmark.cpp
|
2016-02-17 16:05:41 +01:00
|
|
|
}
|
2015-06-01 18:51:55 +02:00
|
|
|
|
|
|
|
|
HEADERS += \
|
2021-04-14 15:30:43 +02:00
|
|
|
abstractviewmock.h \
|
2017-07-24 17:10:29 +02:00
|
|
|
compare-operators.h \
|
|
|
|
|
conditionally-disabled-tests.h \
|
|
|
|
|
dummyclangipcclient.h \
|
|
|
|
|
dynamicastmatcherdiagnosticcontainer-matcher.h \
|
2016-08-17 15:29:37 +02:00
|
|
|
eventspy.h \
|
2017-07-24 17:10:29 +02:00
|
|
|
fakeprocess.h \
|
2016-09-15 17:41:41 +02:00
|
|
|
filesystem-utilities.h \
|
|
|
|
|
googletest.h \
|
2017-07-24 17:10:29 +02:00
|
|
|
gtest-creator-printing.h \
|
2019-02-14 15:33:00 +01:00
|
|
|
gtest-llvm-printing.h \
|
2015-06-01 18:51:55 +02:00
|
|
|
gtest-qt-printing.h \
|
2020-06-10 13:50:35 +02:00
|
|
|
gtest-std-printing.h \
|
2020-09-16 13:44:43 +02:00
|
|
|
imagecachecollectormock.h \
|
2016-12-05 15:24:09 +01:00
|
|
|
mimedatabase-utilities.h \
|
2017-07-24 17:10:29 +02:00
|
|
|
mockclangcodemodelclient.h \
|
|
|
|
|
mockclangcodemodelserver.h \
|
2020-09-16 13:44:43 +02:00
|
|
|
mockimagecachegenerator.h \
|
|
|
|
|
mockimagecachestorage.h \
|
2020-06-18 19:46:01 +02:00
|
|
|
mocklistmodeleditorview.h \
|
2017-07-24 17:10:29 +02:00
|
|
|
mockqfilesystemwatcher.h \
|
|
|
|
|
mocksyntaxhighligher.h \
|
2020-09-16 13:44:43 +02:00
|
|
|
mocktimestampprovider.h \
|
|
|
|
|
notification.h \
|
2017-07-24 17:10:29 +02:00
|
|
|
processevents-utilities.h \
|
|
|
|
|
sourcerangecontainer-matcher.h \
|
|
|
|
|
spydummy.h \
|
2017-08-17 12:44:52 +02:00
|
|
|
google-using-declarations.h \
|
2017-09-19 11:48:47 +02:00
|
|
|
sqliteteststatement.h \
|
2017-09-21 11:43:59 +02:00
|
|
|
mockmutex.h \
|
2017-10-18 13:03:21 +02:00
|
|
|
mocksqlitestatement.h \
|
2017-09-19 15:38:20 +02:00
|
|
|
unittest-utility-functions.h \
|
2017-12-13 17:35:00 +01:00
|
|
|
rundocumentparse-utility.h \
|
2018-01-22 14:21:01 +01:00
|
|
|
mocktimer.h \
|
2018-02-20 12:43:05 +01:00
|
|
|
mocksqlitetransactionbackend.h \
|
2018-09-11 14:02:59 +02:00
|
|
|
mockcppmodelmanager.h \
|
2018-09-11 17:02:45 +02:00
|
|
|
mockqueue.h \
|
2018-10-22 09:53:54 +02:00
|
|
|
mockfutureinterface.h \
|
2020-06-11 17:25:46 +02:00
|
|
|
../mockup/qmldesigner/designercore/include/nodeinstanceview.h \
|
|
|
|
|
../mockup/qmldesigner/designercore/include/rewriterview.h \
|
2020-09-16 13:44:43 +02:00
|
|
|
../mockup/qmldesigner/designercore/include/itemlibraryitem.h\
|
|
|
|
|
sqlitedatabasemock.h \
|
|
|
|
|
sqlitereadstatementmock.h \
|
|
|
|
|
sqlitestatementmock.h \
|
|
|
|
|
sqlitetransactionbackendmock.h \
|
2021-04-28 16:18:59 +02:00
|
|
|
sqlitewritestatementmock.h \
|
|
|
|
|
sqlitereadwritestatementmock.h \
|
|
|
|
|
projectstoragemock.h
|
2020-06-11 17:25:46 +02:00
|
|
|
|
2018-08-28 12:08:37 +02:00
|
|
|
|
2016-08-31 15:15:48 +02:00
|
|
|
!isEmpty(LIBCLANG_LIBS) {
|
2016-08-17 14:18:55 +02:00
|
|
|
HEADERS += \
|
|
|
|
|
chunksreportedmonitor.h \
|
2016-09-15 17:41:41 +02:00
|
|
|
clangasyncjob-base.h \
|
2017-07-24 17:10:29 +02:00
|
|
|
clangcompareoperators.h \
|
2016-09-15 17:41:41 +02:00
|
|
|
diagnosticcontainer-matcher.h \
|
2020-09-08 15:48:52 +02:00
|
|
|
gtest-clang-printing.h
|
2016-08-17 14:18:55 +02:00
|
|
|
}
|
|
|
|
|
|
2018-08-16 18:17:42 +02:00
|
|
|
OTHER_FILES += $$files(data/*) $$files(data/include/*)
|