summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2019-05-29 14:55:17 +0200
committerCristian Adam <cristian.adam@qt.io>2019-05-29 13:46:25 +0000
commitf50859e856b911ba0667fc9aaa5df4c8882f8679 (patch)
tree2ec84f115cf26374c6c0cd57fd257d758ca95f6e /src/tools
parent0bbc5ef57465b94c63fed1cf8255a9b2a07e981c (diff)
downloadqt-creator-f50859e856b911ba0667fc9aaa5df4c8882f8679.tar.gz
CMake build: Add unittest CMake build files
On MinGW 8.1 I get the following after running ctest -j 40 99% tests passed, 35 tests failed out of 2631 Change-Id: I2c3ce7940b036e52ef393feab5837886355e7b5a Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/CMakeLists.txt4
-rw-r--r--src/tools/clangbackend/CMakeLists.txt65
-rw-r--r--src/tools/clangbackend/source/CMakeLists.txt66
-rw-r--r--src/tools/clangpchmanagerbackend/CMakeLists.txt9
-rw-r--r--src/tools/clangpchmanagerbackend/source/CMakeLists.txt49
-rw-r--r--src/tools/clangrefactoringbackend/CMakeLists.txt19
-rw-r--r--src/tools/clangrefactoringbackend/source/CMakeLists.txt47
7 files changed, 181 insertions, 78 deletions
diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt
index 031312ccbb..4ec3202b0b 100644
--- a/src/tools/CMakeLists.txt
+++ b/src/tools/CMakeLists.txt
@@ -4,10 +4,10 @@ if (NOT Clang_FOUND)
message(WARNING "Could not find Clang installation - disabling clangbackend.")
else ()
add_subdirectory(clangbackend)
+ add_subdirectory(clangrefactoringbackend)
+ add_subdirectory(clangpchmanagerbackend)
endif ()
-# add_subdirectory(clangrefactoringbackend) ## not building this at this time!
-
option(BUILD_CPLUSPLUS_TOOLS "Build CPlusPlus tools" OFF)
function(add_qtc_cpp_tool name)
diff --git a/src/tools/clangbackend/CMakeLists.txt b/src/tools/clangbackend/CMakeLists.txt
index 827b0c6fbe..c0ad4e864d 100644
--- a/src/tools/clangbackend/CMakeLists.txt
+++ b/src/tools/clangbackend/CMakeLists.txt
@@ -1,67 +1,8 @@
+add_subdirectory(source)
+
add_qtc_executable(clangbackend
- DEPENDS ClangSupport libclang Sqlite Qt5::Core Qt5::Network
- INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/source" ${CLANG_INCLUDE_DIRS}
+ DEPENDS Qt5::Core Qt5::Network clangbackend_lib Sqlite ClangSupport libclang
SOURCES
../qtcreatorcrashhandler/crashhandlersetup.cpp ../qtcreatorcrashhandler/crashhandlersetup.h
-
clangbackendmain.cpp
- source/clangasyncjob.h
- source/clangbackend_global.h
- source/clangclock.h
- source/clangcodecompleteresults.cpp source/clangcodecompleteresults.h
- source/clangcodemodelserver.cpp source/clangcodemodelserver.h
- source/clangcompletecodejob.cpp source/clangcompletecodejob.h
- source/clangdocument.cpp source/clangdocument.h
- source/clangdocumentjob.h
- source/clangdocumentprocessor.cpp source/clangdocumentprocessor.h
- source/clangdocumentprocessors.cpp source/clangdocumentprocessors.h
- source/clangdocuments.cpp source/clangdocuments.h
- source/clangdocumentsuspenderresumer.cpp source/clangdocumentsuspenderresumer.h
- source/clangexceptions.cpp source/clangexceptions.h
- source/clangfilepath.cpp source/clangfilepath.h
- source/clangfilesystemwatcher.cpp source/clangfilesystemwatcher.h
- source/clangfollowsymbol.cpp source/clangfollowsymbol.h
- source/clangfollowsymboljob.cpp source/clangfollowsymboljob.h
- source/clangiasyncjob.cpp source/clangiasyncjob.h
- source/clangjobcontext.cpp source/clangjobcontext.h
- source/clangjobqueue.cpp source/clangjobqueue.h
- source/clangjobrequest.cpp source/clangjobrequest.h
- source/clangjobs.cpp source/clangjobs.h
- source/clangparsesupportivetranslationunitjob.cpp source/clangparsesupportivetranslationunitjob.h
- source/clangreferencescollector.cpp source/clangreferencescollector.h
- source/clangrequestannotationsjob.cpp source/clangrequestannotationsjob.h
- source/clangrequestreferencesjob.cpp source/clangrequestreferencesjob.h
- source/clangrequesttooltipjob.cpp source/clangrequesttooltipjob.h
- source/clangresumedocumentjob.cpp source/clangresumedocumentjob.h
- source/clangstring.h
- source/clangsupportivetranslationunitinitializer.cpp source/clangsupportivetranslationunitinitializer.h
- source/clangsuspenddocumentjob.cpp source/clangsuspenddocumentjob.h
- source/clangtooltipinfocollector.cpp source/clangtooltipinfocollector.h
- source/clangtranslationunit.cpp source/clangtranslationunit.h
- source/clangtranslationunits.cpp source/clangtranslationunits.h
- source/clangtranslationunitupdater.cpp source/clangtranslationunitupdater.h
- source/clangtype.cpp source/clangtype.h
- source/clangunsavedfilesshallowarguments.cpp source/clangunsavedfilesshallowarguments.h
- source/clangupdateannotationsjob.cpp source/clangupdateannotationsjob.h
- source/clangupdateextraannotationsjob.cpp source/clangupdateextraannotationsjob.h
- source/codecompleter.cpp source/codecompleter.h
- source/codecompletionchunkconverter.cpp source/codecompletionchunkconverter.h
- source/codecompletionsextractor.cpp source/codecompletionsextractor.h
- source/commandlinearguments.cpp source/commandlinearguments.h
- source/cursor.cpp source/cursor.h
- source/diagnostic.cpp source/diagnostic.h
- source/diagnosticset.cpp source/diagnosticset.h
- source/diagnosticsetiterator.h
- source/fixit.cpp source/fixit.h
- source/fulltokeninfo.cpp source/fulltokeninfo.h
- source/skippedsourceranges.cpp source/skippedsourceranges.h
- source/sourcelocation.cpp source/sourcelocation.h
- source/sourcerange.cpp source/sourcerange.h
- source/token.cpp source/token.h
- source/tokeninfo.cpp source/tokeninfo.h
- source/tokenprocessor.h
- source/tokenprocessoriterator.h
- source/unsavedfile.cpp source/unsavedfile.h
- source/unsavedfiles.cpp source/unsavedfiles.h
- source/utf8positionfromlinecolumn.cpp source/utf8positionfromlinecolumn.h
)
diff --git a/src/tools/clangbackend/source/CMakeLists.txt b/src/tools/clangbackend/source/CMakeLists.txt
new file mode 100644
index 0000000000..f8cf5d5de9
--- /dev/null
+++ b/src/tools/clangbackend/source/CMakeLists.txt
@@ -0,0 +1,66 @@
+add_qtc_library(clangbackend_lib STATIC
+ DEPENDS libclang Sqlite ClangSupport
+ DEFINES CLANGSUPPORT_BUILD_LIB
+ PUBLIC_INCLUDES
+ ${CLANG_INCLUDE_DIRS}
+ SOURCES
+ clangasyncjob.h
+ clangbackend_global.h
+ clangclock.h
+ clangcodecompleteresults.cpp clangcodecompleteresults.h
+ clangcodemodelserver.cpp clangcodemodelserver.h
+ clangcompletecodejob.cpp clangcompletecodejob.h
+ clangdocument.cpp clangdocument.h
+ clangdocumentjob.h
+ clangdocumentprocessor.cpp clangdocumentprocessor.h
+ clangdocumentprocessors.cpp clangdocumentprocessors.h
+ clangdocuments.cpp clangdocuments.h
+ clangdocumentsuspenderresumer.cpp clangdocumentsuspenderresumer.h
+ clangexceptions.cpp clangexceptions.h
+ clangfilepath.cpp clangfilepath.h
+ clangfilesystemwatcher.cpp clangfilesystemwatcher.h
+ clangfollowsymbol.cpp clangfollowsymbol.h
+ clangfollowsymboljob.cpp clangfollowsymboljob.h
+ clangiasyncjob.cpp clangiasyncjob.h
+ clangjobcontext.cpp clangjobcontext.h
+ clangjobqueue.cpp clangjobqueue.h
+ clangjobrequest.cpp clangjobrequest.h
+ clangjobs.cpp clangjobs.h
+ clangparsesupportivetranslationunitjob.cpp clangparsesupportivetranslationunitjob.h
+ clangreferencescollector.cpp clangreferencescollector.h
+ clangrequestannotationsjob.cpp clangrequestannotationsjob.h
+ clangrequestreferencesjob.cpp clangrequestreferencesjob.h
+ clangrequesttooltipjob.cpp clangrequesttooltipjob.h
+ clangresumedocumentjob.cpp clangresumedocumentjob.h
+ clangstring.h
+ clangsupportivetranslationunitinitializer.cpp clangsupportivetranslationunitinitializer.h
+ clangsuspenddocumentjob.cpp clangsuspenddocumentjob.h
+ clangtooltipinfocollector.cpp clangtooltipinfocollector.h
+ clangtranslationunit.cpp clangtranslationunit.h
+ clangtranslationunits.cpp clangtranslationunits.h
+ clangtranslationunitupdater.cpp clangtranslationunitupdater.h
+ clangtype.cpp clangtype.h
+ clangunsavedfilesshallowarguments.cpp clangunsavedfilesshallowarguments.h
+ clangupdateannotationsjob.cpp clangupdateannotationsjob.h
+ clangupdateextraannotationsjob.cpp clangupdateextraannotationsjob.h
+ codecompleter.cpp codecompleter.h
+ codecompletionchunkconverter.cpp codecompletionchunkconverter.h
+ codecompletionsextractor.cpp codecompletionsextractor.h
+ commandlinearguments.cpp commandlinearguments.h
+ cursor.cpp cursor.h
+ diagnostic.cpp diagnostic.h
+ diagnosticset.cpp diagnosticset.h
+ diagnosticsetiterator.h
+ fixit.cpp fixit.h
+ fulltokeninfo.cpp fulltokeninfo.h
+ skippedsourceranges.cpp skippedsourceranges.h
+ sourcelocation.cpp sourcelocation.h
+ sourcerange.cpp sourcerange.h
+ token.cpp token.h
+ tokeninfo.cpp tokeninfo.h
+ tokenprocessor.h
+ tokenprocessoriterator.h
+ unsavedfile.cpp unsavedfile.h
+ unsavedfiles.cpp unsavedfiles.h
+ utf8positionfromlinecolumn.cpp utf8positionfromlinecolumn.h
+)
diff --git a/src/tools/clangpchmanagerbackend/CMakeLists.txt b/src/tools/clangpchmanagerbackend/CMakeLists.txt
new file mode 100644
index 0000000000..513fd4a7a5
--- /dev/null
+++ b/src/tools/clangpchmanagerbackend/CMakeLists.txt
@@ -0,0 +1,9 @@
+add_subdirectory(source)
+
+add_qtc_executable(clangpchmanagerbackend
+ DEPENDS
+ clangrefactoringbackend_lib clangpchmanagerbackend_lib
+ clangTooling libclang Sqlite ClangSupport clangToolingRefactor clangQuery clangIndex
+ SOURCES
+ clangpchmanagerbackendmain.cpp
+)
diff --git a/src/tools/clangpchmanagerbackend/source/CMakeLists.txt b/src/tools/clangpchmanagerbackend/source/CMakeLists.txt
new file mode 100644
index 0000000000..aa3003c5ca
--- /dev/null
+++ b/src/tools/clangpchmanagerbackend/source/CMakeLists.txt
@@ -0,0 +1,49 @@
+add_qtc_library(clangpchmanagerbackend_lib STATIC
+ DEPENDS clangrefactoringbackend_lib ClangSupport
+ PUBLIC_DEPENDS libclang
+ DEFINES CLANGSUPPORT_BUILD_LIB
+ PUBLIC_INCLUDES
+ ${CLANG_INCLUDE_DIRS}
+ SOURCES
+ builddependenciesprovider.cpp builddependenciesprovider.h
+ builddependenciesproviderinterface.h
+ builddependenciesstorage.h
+ builddependenciesstorageinterface.h
+ builddependency.h
+ builddependencycollector.cpp builddependencycollector.h
+ builddependencygeneratorinterface.h
+ clangpchmanagerbackend_global.h
+ collectbuilddependencyaction.h
+ collectbuilddependencypreprocessorcallbacks.h
+ collectbuilddependencytoolaction.h
+ collectusedmacroactionfactory.h
+ collectusedmacrosaction.h
+ collectusedmacrosandsourcespreprocessorcallbacks.h
+ generatepchactionfactory.h
+ pchcreator.cpp pchcreator.h
+ pchcreatorinterface.h
+ pchmanagerserver.cpp pchmanagerserver.h
+ pchnotcreatederror.h
+ pchtask.h
+ pchtaskgenerator.cpp pchtaskgenerator.h
+ pchtaskgeneratorinterface.h
+ pchtaskqueue.cpp
+ pchtaskqueue.h
+ pchtaskqueueinterface.h
+ pchtasksmerger.cpp
+ pchtasksmerger.h
+ pchtasksmergerinterface.h
+ precompiledheaderstorage.h
+ precompiledheaderstorageinterface.h
+ processorinterface.h
+ processormanager.h
+ processormanagerinterface.h
+ projectpartsmanager.cpp projectpartsmanager.h
+ projectpartsmanagerinterface.h
+ queueinterface.h
+ taskscheduler.h
+ taskschedulerinterface.h
+ toolchainargumentscache.h
+ usedmacrofilter.h
+ usedmacrosandsourcescollector.cpp usedmacrosandsourcescollector.h
+)
diff --git a/src/tools/clangrefactoringbackend/CMakeLists.txt b/src/tools/clangrefactoringbackend/CMakeLists.txt
index 184ff60aeb..781783545e 100644
--- a/src/tools/clangrefactoringbackend/CMakeLists.txt
+++ b/src/tools/clangrefactoringbackend/CMakeLists.txt
@@ -1,18 +1,9 @@
+add_subdirectory(source)
+
add_qtc_executable(clangrefactoringbackend
- DEPENDS clangbackendipc
- INCLUDES source
+ DEPENDS
+ clangrefactoringbackend_lib Sqlite ClangSupport
+ libclang clangTooling clangIndex clangQuery clangToolingRefactor
SOURCES
clangrefactoringbackendmain.cpp
- source/clangquery.cpp source/clangquery.h
- source/clangrefactoringbackend_global.h
- source/clangtool.cpp source/clangtool.h
- source/findcursorusr.h
- source/findlocationsofusrs.h
- source/findusrforcursoraction.cpp source/findusrforcursoraction.h
- source/macropreprocessorcallbacks.cpp source/macropreprocessorcallbacks.h
- source/refactoringcompilationdatabase.cpp source/refactoringcompilationdatabase.h
- source/refactoringserver.cpp source/refactoringserver.h
- source/sourcelocationsutils.h
- source/symbolfinder.cpp source/symbolfinder.h
- source/symbollocationfinderaction.cpp source/symbollocationfinderaction.h
)
diff --git a/src/tools/clangrefactoringbackend/source/CMakeLists.txt b/src/tools/clangrefactoringbackend/source/CMakeLists.txt
new file mode 100644
index 0000000000..cd15e8ad33
--- /dev/null
+++ b/src/tools/clangrefactoringbackend/source/CMakeLists.txt
@@ -0,0 +1,47 @@
+add_qtc_library(clangrefactoringbackend_lib STATIC
+ DEPENDS libclang clangTooling clangIndex clangQuery ClangSupport
+ DEFINES CLANGSUPPORT_BUILD_LIB
+ PUBLIC_INCLUDES
+ ${CLANG_INCLUDE_DIRS}
+ "../../clangpchmanagerbackend/source"
+ SOURCES
+ clangquery.cpp clangquery.h
+ clangquerygatherer.cpp clangquerygatherer.h
+ clangrefactoringbackend_global.h
+ clangtool.cpp clangtool.h
+ collectmacrospreprocessorcallbacks.h
+ collectmacrossourcefilecallbacks.cpp collectmacrossourcefilecallbacks.h
+ collectsymbolsaction.cpp collectsymbolsaction.h
+ filestatus.h
+ filestatuscache.cpp filestatuscache.h
+ findcursorusr.h
+ findlocationsofusrs.h
+ findusrforcursoraction.cpp findusrforcursoraction.h
+ indexdataconsumer.cpp indexdataconsumer.h
+ locationsourcefilecallbacks.cpp locationsourcefilecallbacks.h
+ macropreprocessorcallbacks.cpp macropreprocessorcallbacks.h
+ projectpartentry.h
+ refactoringcompilationdatabase.cpp refactoringcompilationdatabase.h
+ refactoringserver.cpp refactoringserver.h
+ sourcedependency.h
+ sourcelocationentry.h
+ sourcelocationsutils.h
+ sourcerangeextractor.cpp sourcerangeextractor.h
+ sourcerangefilter.cpp sourcerangefilter.h
+ sourcesmanager.h
+ symbolentry.h
+ symbolfinder.cpp symbolfinder.h
+ symbolindexer.cpp symbolindexer.h
+ symbolindexertask.h
+ symbolindexertaskqueue.h
+ symbolindexertaskqueueinterface.h
+ symbolindexing.cpp symbolindexing.h
+ symbolindexinginterface.h
+ symbollocationfinderaction.cpp symbollocationfinderaction.h
+ symbolscollector.cpp symbolscollector.h
+ symbolscollectorinterface.h
+ symbolstorage.h
+ symbolstorageinterface.h
+ symbolsvisitorbase.h
+ usedmacro.h
+)