2014-01-06 18:19:44 +01:00
|
|
|
import qbs
|
|
|
|
|
import qbs.File
|
2015-06-01 18:51:55 +02:00
|
|
|
import QtcClangInstallation as Clang
|
2015-08-03 14:08:58 +02:00
|
|
|
import QtcFunctions
|
2014-06-27 15:48:00 +02:00
|
|
|
import QtcProcessOutputReader
|
2014-01-06 18:19:44 +01:00
|
|
|
|
|
|
|
|
QtcPlugin {
|
|
|
|
|
name: "ClangCodeModel"
|
|
|
|
|
|
|
|
|
|
Depends { name: "Qt"; submodules: ["concurrent", "widgets"] }
|
|
|
|
|
Depends { name: "Core" }
|
|
|
|
|
Depends { name: "CppTools" }
|
|
|
|
|
Depends { name: "ProjectExplorer" }
|
|
|
|
|
Depends { name: "TextEditor" }
|
|
|
|
|
Depends { name: "Utils" }
|
2015-06-16 11:56:00 +02:00
|
|
|
Depends { name: "ClangBackEndIpc" }
|
2015-05-08 15:48:17 +02:00
|
|
|
|
|
|
|
|
pluginTestDepends: [
|
|
|
|
|
"CppEditor",
|
|
|
|
|
"QmakeProjectManager",
|
|
|
|
|
]
|
2014-01-06 18:19:44 +01:00
|
|
|
|
2015-08-03 14:08:58 +02:00
|
|
|
property string llvmConfig: Clang.llvmConfig(qbs, QtcFunctions, QtcProcessOutputReader)
|
2015-06-01 18:51:55 +02:00
|
|
|
property string llvmIncludeDir: Clang.includeDir(llvmConfig, QtcProcessOutputReader)
|
|
|
|
|
property string llvmLibDir: Clang.libDir(llvmConfig, QtcProcessOutputReader)
|
|
|
|
|
property string llvmVersion: Clang.version(llvmConfig, QtcProcessOutputReader)
|
2014-01-06 18:19:44 +01:00
|
|
|
|
2015-09-04 10:21:41 +02:00
|
|
|
condition: llvmConfig && File.exists(llvmIncludeDir.concat("/clang-c/Index.h"))
|
2014-01-06 18:19:44 +01:00
|
|
|
|
2014-06-27 15:48:00 +02:00
|
|
|
cpp.defines: {
|
|
|
|
|
var defines = base;
|
2015-11-27 16:02:38 +01:00
|
|
|
// The following defines are used to determine the clang include path for intrinsics.
|
2014-06-27 15:48:00 +02:00
|
|
|
defines.push('CLANG_VERSION="' + llvmVersion + '"');
|
|
|
|
|
defines.push('CLANG_RESOURCE_DIR="' + llvmLibDir + '/clang/' + llvmVersion + '/include"');
|
|
|
|
|
return defines;
|
|
|
|
|
}
|
|
|
|
|
|
2014-01-06 18:19:44 +01:00
|
|
|
files: [
|
2015-11-30 09:43:50 +01:00
|
|
|
"clangactivationsequencecontextprocessor.cpp",
|
|
|
|
|
"clangactivationsequencecontextprocessor.h",
|
|
|
|
|
"clangactivationsequenceprocessor.cpp",
|
|
|
|
|
"clangactivationsequenceprocessor.h",
|
2015-11-27 16:02:38 +01:00
|
|
|
"clangassistproposal.cpp",
|
|
|
|
|
"clangassistproposal.h",
|
|
|
|
|
"clangassistproposalitem.cpp",
|
|
|
|
|
"clangassistproposalitem.h",
|
|
|
|
|
"clangassistproposalmodel.cpp",
|
|
|
|
|
"clangassistproposalmodel.h",
|
|
|
|
|
"clangbackendipcintegration.cpp",
|
|
|
|
|
"clangbackendipcintegration.h",
|
|
|
|
|
"clangcodemodelplugin.cpp",
|
|
|
|
|
"clangcodemodelplugin.h",
|
|
|
|
|
"clangcompletionassistinterface.cpp",
|
|
|
|
|
"clangcompletionassistinterface.h",
|
|
|
|
|
"clangcompletionassistprocessor.cpp",
|
|
|
|
|
"clangcompletionassistprocessor.h",
|
|
|
|
|
"clangcompletionassistprovider.cpp",
|
|
|
|
|
"clangcompletionassistprovider.h",
|
2015-11-30 09:43:50 +01:00
|
|
|
"clangcompletionchunkstotextconverter.cpp",
|
|
|
|
|
"clangcompletionchunkstotextconverter.h",
|
2015-05-08 15:48:17 +02:00
|
|
|
"clangcompletioncontextanalyzer.cpp",
|
|
|
|
|
"clangcompletioncontextanalyzer.h",
|
2015-11-30 09:43:50 +01:00
|
|
|
"clangconstants.h",
|
2015-09-04 12:15:17 +02:00
|
|
|
"clangdiagnosticfilter.cpp",
|
|
|
|
|
"clangdiagnosticfilter.h",
|
|
|
|
|
"clangdiagnosticmanager.cpp",
|
|
|
|
|
"clangdiagnosticmanager.h",
|
2015-11-27 16:02:38 +01:00
|
|
|
"clangeditordocumentparser.cpp",
|
|
|
|
|
"clangeditordocumentparser.h",
|
|
|
|
|
"clangeditordocumentprocessor.cpp",
|
|
|
|
|
"clangeditordocumentprocessor.h",
|
2015-08-24 18:26:09 +02:00
|
|
|
"clangfixitoperation.cpp",
|
|
|
|
|
"clangfixitoperation.h",
|
|
|
|
|
"clangfixitoperationsextractor.cpp",
|
|
|
|
|
"clangfixitoperationsextractor.h",
|
2015-11-27 16:02:38 +01:00
|
|
|
"clangfunctionhintmodel.cpp",
|
|
|
|
|
"clangfunctionhintmodel.h",
|
2015-11-30 09:43:50 +01:00
|
|
|
"clanghighlightingmarksreporter.cpp",
|
|
|
|
|
"clanghighlightingmarksreporter.h",
|
2014-01-06 18:19:44 +01:00
|
|
|
"clangmodelmanagersupport.cpp",
|
|
|
|
|
"clangmodelmanagersupport.h",
|
2015-08-31 16:28:26 +02:00
|
|
|
"clangtextmark.cpp",
|
|
|
|
|
"clangtextmark.h",
|
2014-01-06 18:19:44 +01:00
|
|
|
"clangutils.cpp",
|
|
|
|
|
"clangutils.h",
|
|
|
|
|
]
|
2015-11-27 16:02:38 +01:00
|
|
|
|
|
|
|
|
Group {
|
|
|
|
|
name: "Tests"
|
|
|
|
|
condition: project.testsEnabled
|
|
|
|
|
prefix: "test/"
|
|
|
|
|
files: [
|
|
|
|
|
"data/clangtestdata.qrc",
|
|
|
|
|
"clangcodecompletion_test.cpp",
|
|
|
|
|
"clangcodecompletion_test.h",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Group {
|
|
|
|
|
name: "Test resources"
|
|
|
|
|
prefix: "test/data/"
|
|
|
|
|
fileTags: "none"
|
|
|
|
|
files: [ "*" ]
|
|
|
|
|
excludeFiles: "clangtestdata.qrc"
|
|
|
|
|
}
|
2014-01-06 18:19:44 +01:00
|
|
|
}
|