UnitTest: Fix compilation for different configurations

Change-Id: I20d4217d1c33002f7e1ac084af4b0982b2f04971
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Marco Bubke
2017-02-02 18:02:53 +01:00
parent 970e8defe7
commit 68afbbce75
4 changed files with 49 additions and 38 deletions

View File

@@ -1,9 +1,7 @@
INCLUDEPATH += $$PWD
SOURCES += \
$$PWD/includecollector.cpp \
$$PWD/pchmanagerserver.cpp \
$$PWD/pchcreator.cpp \
$$PWD/clangpathwatcher.cpp \
$$PWD/projectparts.cpp \
$$PWD/idpaths.cpp \
@@ -16,12 +14,6 @@ SOURCES += \
HEADERS += \
$$PWD/clangpchmanagerbackend_global.h \
$$PWD/includecollector.h \
$$PWD/collectincludestoolaction.h \
$$PWD/collectincludesaction.h \
$$PWD/collectincludespreprocessorcallbacks.h \
$$PWD/pchmanagerserver.h \
$$PWD/pchcreator.h \
$$PWD/pchnotcreatederror.h \
$$PWD/environment.h \
$$PWD/clangpathwatcher.h \
@@ -36,3 +28,16 @@ HEADERS += \
$$PWD/pchgenerator.h \
$$PWD/pchgeneratornotifierinterface.h \
$$PWD/pchgeneratorinterface.h
!isEmpty(LIBTOOLING_LIBS) {
SOURCES += \
$$PWD/includecollector.cpp \
$$PWD/pchcreator.cpp
HEADERS += \
$$PWD/includecollector.h \
$$PWD/collectincludestoolaction.h \
$$PWD/collectincludesaction.h \
$$PWD/collectincludespreprocessorcallbacks.h \
$$PWD/pchcreator.h
}

View File

@@ -1,5 +1,9 @@
INCLUDEPATH += $$PWD
HEADERS += \
$$PWD/clangrefactoringbackend_global.h \
!isEmpty(LIBTOOLING_LIBS) {
SOURCES += \
$$PWD/refactoringcompilationdatabase.cpp \
$$PWD/symbolfinder.cpp \
@@ -14,7 +18,6 @@ SOURCES += \
HEADERS += \
$$PWD/refactoringcompilationdatabase.h \
$$PWD/clangrefactoringbackend_global.h \
$$PWD/symbolfinder.h \
$$PWD/symbollocationfinderaction.h \
$$PWD/refactoringserver.h \
@@ -27,3 +30,4 @@ HEADERS += \
$$PWD/clangtool.h \
$$PWD/sourcerangeextractor.h \
$$PWD/locationsourcefilecallbacks.h
}

View File

@@ -7,18 +7,20 @@ include($$PWD/../../../src/libs/utils/utils-lib.pri)
include($$PWD/../../../src/libs/sqlite/sqlite-lib.pri)
include($$PWD/../../../src/libs/clangbackendipc/clangbackendipc-lib.pri)
include($$PWD/../../../src/plugins/coreplugin/corepluginunittestfiles.pri)
include($$PWD/../../../src/tools/clangrefactoringbackend/source/clangrefactoringbackend-source.pri)
include($$PWD/../../../src/tools/clangpchmanagerbackend/source/clangpchmanagerbackend-source.pri)
include($$PWD/../../../src/plugins/clangrefactoring/clangrefactoring-source.pri)
include($$PWD/../../../src/plugins/clangpchmanager/clangpchmanager-source.pri)
include($$PWD/../../../src/plugins/cpptools/cpptoolsunittestfiles.pri)
include(cplusplus.pri)
!isEmpty(LLVM_INSTALL_DIR) {
include($$PWD/../../../src/shared/clang/clang_defines.pri)
include($$PWD/../../../src/tools/clangbackend/ipcsource/clangbackendclangipc-source.pri)
!isEmpty(LIBTOOLING_LIBS):include($$PWD/../../../src/tools/clangrefactoringbackend/source/clangrefactoringbackend-source.pri)
include($$PWD/../../../src/tools/clangpchmanagerbackend/source/clangpchmanagerbackend-source.pri)
include($$PWD/../../../src/plugins/clangcodemodel/clangcodemodelunittestfiles.pri)
include($$PWD/../../../src/plugins/cpptools/cpptoolsunittestfiles.pri)
!isEmpty(LIBTOOLING_LIBS):include($$PWD/../../../src/plugins/clangrefactoring/clangrefactoring-source.pri)
include($$PWD/../../../src/plugins/clangpchmanager/clangpchmanager-source.pri)
include(cplusplus.pri)
} else {
DEFINES += CLANG_VERSION=\\\"3.9.1\\\"
DEFINES += "\"CLANG_RESOURCE_DIR=\\\"/usr/include\\\"\""
}
INCLUDEPATH += \

View File

@@ -40,10 +40,6 @@ SOURCES += \
utf8-test.cpp \
gtest-qt-printing.cpp \
gtest-creator-printing.cpp \
clangparsesupportivetranslationunitjob-test.cpp \
clangreparsesupportivetranslationunitjob-test.cpp \
clangsupportivetranslationunitinitializer-test.cpp \
codecompleter-test.cpp \
clientserveroutsideprocess-test.cpp \
clangpathwatcher-test.cpp \
projectparts-test.cpp \
@@ -51,7 +47,11 @@ SOURCES += \
changedfilepathcompressor-test.cpp \
faketimer.cpp \
pchgenerator-test.cpp \
fakeprocess.cpp
fakeprocess.cpp \
pchmanagerclient-test.cpp \
projectupdater-test.cpp \
pchmanagerserver-test.cpp \
pchmanagerclientserverinprocess-test.cpp \
!isEmpty(LIBCLANG_LIBS) {
SOURCES += \
@@ -101,7 +101,11 @@ SOURCES += \
translationunitupdater-test.cpp \
unsavedfiles-test.cpp \
unsavedfile-test.cpp \
utf8positionfromlinecolumn-test.cpp
utf8positionfromlinecolumn-test.cpp \
clangparsesupportivetranslationunitjob-test.cpp \
clangreparsesupportivetranslationunitjob-test.cpp \
clangsupportivetranslationunitinitializer-test.cpp \
codecompleter-test.cpp
}
!isEmpty(LIBTOOLING_LIBS) {
@@ -117,12 +121,8 @@ SOURCES += \
sourcerangeextractor-test.cpp \
gtest-clang-printing.cpp \
testclangtool.cpp \
pchmanagerclientserverinprocess-test.cpp \
includecollector-test.cpp \
pchmanagerserver-test.cpp \
pchcreator-test.cpp \
pchmanagerclient-test.cpp \
projectupdater-test.cpp
pchcreator-test.cpp
}
exists($$GOOGLEBENCHMARK_DIR) {
@@ -152,17 +152,22 @@ HEADERS += \
mockchangedfilepathcompressor.h \
faketimer.h \
mockpchgeneratornotifier.h \
fakeprocess.h
fakeprocess.h \
mockpchmanagerserver.h \
mockpchmanagerclient.h \
testenvironment.h \
mockpchmanagernotifier.h \
mockpchcreator.h \
dummyclangipcclient.h \
mockclangcodemodelclient.h \
mockclangcodemodelserver.h
!isEmpty(LIBCLANG_LIBS) {
HEADERS += \
chunksreportedmonitor.h \
clangasyncjob-base.h \
diagnosticcontainer-matcher.h \
clangcompareoperators.h \
dummyclangipcclient.h \
mockclangcodemodelclient.h \
mockclangcodemodelserver.h
clangcompareoperators.h
}
!isEmpty(LIBTOOLING_LIBS) {
@@ -171,12 +176,7 @@ HEADERS += \
mockrefactoringclient.h \
mockrefactoringserver.h \
gtest-clang-printing.h \
testclangtool.h \
mockpchmanagerserver.h \
mockpchmanagerclient.h \
testenvironment.h \
mockpchmanagernotifier.h \
mockpchcreator.h
testclangtool.h
}
OTHER_FILES += $$files(data/*)