2014-11-17 14:08:07 +01:00
|
|
|
import qbs
|
2018-04-30 15:26:36 +02:00
|
|
|
import qbs.FileInfo
|
2014-11-17 14:08:07 +01:00
|
|
|
|
2016-01-14 11:23:13 +01:00
|
|
|
QtcPlugin {
|
2018-03-26 13:48:57 +02:00
|
|
|
name: "ClangTools"
|
2014-11-17 14:08:07 +01:00
|
|
|
|
2016-02-24 14:42:52 +01:00
|
|
|
Depends { name: "Debugger" }
|
2014-11-17 14:08:07 +01:00
|
|
|
Depends { name: "Core" }
|
|
|
|
|
Depends { name: "CppTools" }
|
|
|
|
|
Depends { name: "ExtensionSystem" }
|
|
|
|
|
Depends { name: "ProjectExplorer" }
|
2015-08-27 17:31:45 +02:00
|
|
|
Depends { name: "QtcSsh" }
|
2014-11-17 14:08:07 +01:00
|
|
|
Depends { name: "Utils" }
|
2018-01-17 15:08:30 +01:00
|
|
|
Depends { name: "libclang"; required: false }
|
2014-11-17 14:08:07 +01:00
|
|
|
|
|
|
|
|
Depends { name: "Qt.widgets" }
|
|
|
|
|
|
2015-04-13 16:22:18 +02:00
|
|
|
pluginTestDepends: [
|
|
|
|
|
"QbsProjectManager",
|
|
|
|
|
"QmakeProjectManager",
|
|
|
|
|
]
|
|
|
|
|
|
2018-01-17 15:08:30 +01:00
|
|
|
condition: libclang.present
|
|
|
|
|
|
|
|
|
|
cpp.includePaths: base.concat(libclang.llvmIncludeDir)
|
|
|
|
|
cpp.libraryPaths: base.concat(libclang.llvmLibDir)
|
|
|
|
|
cpp.dynamicLibraries: base.concat(libclang.llvmLibs)
|
|
|
|
|
cpp.rpaths: base.concat(libclang.llvmLibDir)
|
|
|
|
|
|
2018-04-30 15:26:36 +02:00
|
|
|
cpp.defines: {
|
|
|
|
|
var defines = base;
|
|
|
|
|
defines.push("CLANGPCHMANAGER_LIB");
|
|
|
|
|
|
|
|
|
|
// The following defines are used to determine the clang include path for intrinsics.
|
|
|
|
|
defines.push('CLANG_VERSION="' + libclang.llvmVersion + '"');
|
|
|
|
|
var resourceDir = FileInfo.joinPaths(libclang.llvmLibDir, "clang", libclang.llvmVersion,
|
|
|
|
|
"include");
|
|
|
|
|
defines.push('CLANG_RESOURCE_DIR="' + resourceDir + '"');
|
|
|
|
|
defines.push('CLANG_BINDIR="' + libclang.llvmBinDir + '"');
|
|
|
|
|
return defines;
|
|
|
|
|
}
|
|
|
|
|
|
2014-11-17 14:08:07 +01:00
|
|
|
files: [
|
|
|
|
|
"clangstaticanalyzerconfigwidget.cpp",
|
|
|
|
|
"clangstaticanalyzerconfigwidget.h",
|
|
|
|
|
"clangstaticanalyzerconfigwidget.ui",
|
|
|
|
|
"clangstaticanalyzerdiagnosticview.cpp",
|
|
|
|
|
"clangstaticanalyzerdiagnosticview.h",
|
2015-02-19 18:08:38 +01:00
|
|
|
"clangstaticanalyzerprojectsettings.cpp",
|
|
|
|
|
"clangstaticanalyzerprojectsettings.h",
|
|
|
|
|
"clangstaticanalyzerprojectsettingsmanager.cpp",
|
|
|
|
|
"clangstaticanalyzerprojectsettingsmanager.h",
|
|
|
|
|
"clangstaticanalyzerprojectsettingswidget.cpp",
|
|
|
|
|
"clangstaticanalyzerprojectsettingswidget.h",
|
|
|
|
|
"clangstaticanalyzerprojectsettingswidget.ui",
|
2014-11-17 14:08:07 +01:00
|
|
|
"clangstaticanalyzerruncontrol.cpp",
|
|
|
|
|
"clangstaticanalyzerruncontrol.h",
|
|
|
|
|
"clangstaticanalyzerrunner.cpp",
|
|
|
|
|
"clangstaticanalyzerrunner.h",
|
|
|
|
|
"clangstaticanalyzertool.cpp",
|
|
|
|
|
"clangstaticanalyzertool.h",
|
2018-01-17 15:08:30 +01:00
|
|
|
"clangtidyclazyruncontrol.cpp",
|
|
|
|
|
"clangtidyclazyruncontrol.h",
|
|
|
|
|
"clangtidyclazyrunner.cpp",
|
|
|
|
|
"clangtidyclazyrunner.h",
|
|
|
|
|
"clangtidyclazytool.cpp",
|
|
|
|
|
"clangtidyclazytool.h",
|
2018-01-17 15:08:30 +01:00
|
|
|
"clangtool.cpp",
|
|
|
|
|
"clangtool.h",
|
|
|
|
|
"clangtoolruncontrol.cpp",
|
|
|
|
|
"clangtoolruncontrol.h",
|
|
|
|
|
"clangtoolrunner.cpp",
|
|
|
|
|
"clangtoolrunner.h",
|
|
|
|
|
"clangtools_global.h",
|
|
|
|
|
"clangtoolsconstants.h",
|
|
|
|
|
"clangtoolsdiagnostic.cpp",
|
|
|
|
|
"clangtoolsdiagnostic.h",
|
|
|
|
|
"clangtoolsdiagnosticmodel.cpp",
|
|
|
|
|
"clangtoolsdiagnosticmodel.h",
|
|
|
|
|
"clangtoolslogfilereader.cpp",
|
|
|
|
|
"clangtoolslogfilereader.h",
|
|
|
|
|
"clangtoolssettings.cpp",
|
|
|
|
|
"clangtoolssettings.h",
|
|
|
|
|
"clangtoolsutils.cpp",
|
|
|
|
|
"clangtoolsutils.h",
|
2018-03-26 13:48:57 +02:00
|
|
|
"clangtoolsplugin.cpp",
|
|
|
|
|
"clangtoolsplugin.h",
|
2014-11-17 14:08:07 +01:00
|
|
|
]
|
2015-02-04 15:19:30 +01:00
|
|
|
|
|
|
|
|
Group {
|
|
|
|
|
name: "Unit tests"
|
2016-05-17 10:50:51 +02:00
|
|
|
condition: qtc.testsEnabled
|
2015-02-04 15:19:30 +01:00
|
|
|
files: [
|
2016-07-08 12:07:53 +02:00
|
|
|
"clangstaticanalyzerpreconfiguredsessiontests.cpp",
|
|
|
|
|
"clangstaticanalyzerpreconfiguredsessiontests.h",
|
2018-04-24 15:30:19 +02:00
|
|
|
"clangtoolsunittests.cpp",
|
|
|
|
|
"clangtoolsunittests.h",
|
|
|
|
|
"clangtoolsunittests.qrc",
|
2015-02-04 15:19:30 +01:00
|
|
|
]
|
|
|
|
|
}
|
2015-04-16 10:44:31 +02:00
|
|
|
|
|
|
|
|
Group {
|
|
|
|
|
name: "Unit test resources"
|
|
|
|
|
prefix: "unit-tests/"
|
|
|
|
|
fileTags: []
|
|
|
|
|
files: ["**/*"]
|
|
|
|
|
}
|
2016-01-20 19:06:49 +01:00
|
|
|
|
|
|
|
|
Group {
|
|
|
|
|
name: "Other files"
|
|
|
|
|
fileTags: []
|
|
|
|
|
files: [
|
|
|
|
|
project.ide_source_tree + "/doc/src/analyze/creator-clang-static-analyzer.qdoc",
|
|
|
|
|
]
|
|
|
|
|
}
|
2014-11-17 14:08:07 +01:00
|
|
|
}
|