clangcodemodel.qbs 3.83 KB
Newer Older
1
import qbs
2
import qbs.FileInfo
3 4 5 6 7 8 9 10 11 12

QtcPlugin {
    name: "ClangCodeModel"

    Depends { name: "Qt"; submodules: ["concurrent", "widgets"] }
    Depends { name: "Core" }
    Depends { name: "CppTools" }
    Depends { name: "ProjectExplorer" }
    Depends { name: "TextEditor" }
    Depends { name: "Utils" }
13
    Depends { name: "ClangBackEndIpc" }
14
    Depends { name: "libclang"; required: false }
15 16 17 18 19

    pluginTestDepends: [
        "CppEditor",
        "QmakeProjectManager",
    ]
20

21
    condition: libclang.present
22

23 24
    cpp.defines: {
        var defines = base;
Nikolai Kosjar's avatar
Nikolai Kosjar committed
25
        // The following defines are used to determine the clang include path for intrinsics.
26 27 28 29
        defines.push('CLANG_VERSION="' + libclang.llvmVersion + '"');
        var resourceDir = FileInfo.joinPaths(libclang.llvmLibDir, "clang", libclang.llvmVersion,
                                             "include");
        defines.push('CLANG_RESOURCE_DIR="' + resourceDir + '"');
30 31 32
        return defines;
    }

33
    files: [
34 35 36 37
        "clangactivationsequencecontextprocessor.cpp",
        "clangactivationsequencecontextprocessor.h",
        "clangactivationsequenceprocessor.cpp",
        "clangactivationsequenceprocessor.h",
Nikolai Kosjar's avatar
Nikolai Kosjar committed
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
        "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",
54 55
        "clangcompletionchunkstotextconverter.cpp",
        "clangcompletionchunkstotextconverter.h",
56 57
        "clangcompletioncontextanalyzer.cpp",
        "clangcompletioncontextanalyzer.h",
58
        "clangconstants.h",
59 60 61 62
        "clangdiagnosticfilter.cpp",
        "clangdiagnosticfilter.h",
        "clangdiagnosticmanager.cpp",
        "clangdiagnosticmanager.h",
63 64
        "clangdiagnostictooltipwidget.cpp",
        "clangdiagnostictooltipwidget.h",
Nikolai Kosjar's avatar
Nikolai Kosjar committed
65 66 67 68
        "clangeditordocumentparser.cpp",
        "clangeditordocumentparser.h",
        "clangeditordocumentprocessor.cpp",
        "clangeditordocumentprocessor.h",
69 70 71 72
        "clangfixitoperation.cpp",
        "clangfixitoperation.h",
        "clangfixitoperationsextractor.cpp",
        "clangfixitoperationsextractor.h",
Nikolai Kosjar's avatar
Nikolai Kosjar committed
73 74
        "clangfunctionhintmodel.cpp",
        "clangfunctionhintmodel.h",
75 76
        "clanghighlightingmarksreporter.cpp",
        "clanghighlightingmarksreporter.h",
77
        "clangisdiagnosticrelatedtolocation.h",
78 79
        "clangmodelmanagersupport.cpp",
        "clangmodelmanagersupport.h",
80 81
        "clangpreprocessorassistproposalitem.cpp",
        "clangpreprocessorassistproposalitem.h",
82 83 84 85 86
        "clangprojectsettings.cpp",
        "clangprojectsettings.h",
        "clangprojectsettingswidget.cpp",
        "clangprojectsettingswidget.h",
        "clangprojectsettingswidget.ui",
Marco Bubke's avatar
Marco Bubke committed
87 88
        "clangtextmark.cpp",
        "clangtextmark.h",
89 90 91
        "clangutils.cpp",
        "clangutils.h",
    ]
Nikolai Kosjar's avatar
Nikolai Kosjar committed
92 93 94

    Group {
        name: "Tests"
95
        condition: qtc.testsEnabled
Nikolai Kosjar's avatar
Nikolai Kosjar committed
96 97 98 99 100 101 102 103 104 105 106
        prefix: "test/"
        files: [
            "data/clangtestdata.qrc",
            "clangcodecompletion_test.cpp",
            "clangcodecompletion_test.h",
        ]
    }

    Group {
        name: "Test resources"
        prefix: "test/data/"
107
        fileTags: []
Nikolai Kosjar's avatar
Nikolai Kosjar committed
108 109 110
        files: [ "*" ]
        excludeFiles: "clangtestdata.qrc"
    }
111 112 113

    Group {
        name: "Other files"
114
        fileTags: []
115 116 117 118 119
        files: [
            "README",
            project.ide_source_tree + "/doc/src/editors/creator-clang-codemodel.qdoc",
        ]
    }
120
}