forked from swiftlang/swift-llbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Package.swift
124 lines (110 loc) · 3.38 KB
/
Package.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
// swift-tools-version:4.0
// This file defines Swift package manager support for llbuild. See:
// https://github.com/apple/swift-package-manager/tree/master/Documentation
//
// You can build using:
//
// ```shell
// swift build -Xlinker -lsqlite3 -Xlinker -lncurses
// ```
import PackageDescription
let package = Package(
name: "llbuild",
products: [
.library(
name: "libllbuild",
targets: ["libllbuild"]),
.library(
name: "llbuildSwift",
targets: ["llbuildSwift"]),
],
targets: [
/// The llbuild testing tool.
.target(
name: "llbuild",
dependencies: ["llbuildCommands"],
path: "products/llbuild"
),
/// The custom build tool used by the Swift package manager.
.target(
name: "swift-build-tool",
dependencies: ["llbuildBuildSystem"],
path: "products/swift-build-tool"
),
/// The custom build tool used by the Swift package manager.
.target(
name: "llbuildSwift",
dependencies: ["libllbuild"],
path: "products/llbuildSwift",
exclude: ["llbuild.swift"]
),
/// The public llbuild API.
.target(
name: "libllbuild",
dependencies: ["llbuildCore", "llbuildBuildSystem"],
path: "products/libllbuild"
),
// MARK: Components
.target(
name: "llbuildBasic",
dependencies: ["llvmSupport"],
path: "lib/Basic"
),
.target(
name: "llbuildCore",
dependencies: ["llbuildBasic"],
path: "lib/Core"
),
.target(
name: "llbuildBuildSystem",
dependencies: ["llbuildCore"],
path: "lib/BuildSystem"
),
.target(
name: "llbuildNinja",
dependencies: ["llbuildBasic"],
path: "lib/Ninja"
),
.target(
name: "llbuildCommands",
dependencies: ["llbuildCore", "llbuildBuildSystem", "llbuildNinja"],
path: "lib/Commands"
),
// MARK: Test Targets
.target(
name: "llbuildBasicTests",
dependencies: ["llbuildBasic", "gtest"],
path: "unittests/Basic"),
.target(
name: "llbuildCoreTests",
dependencies: ["llbuildCore", "gtest"],
path: "unittests/Core"),
.target(
name: "llbuildBuildSystemTests",
dependencies: ["llbuildBuildSystem", "gtest"],
path: "unittests/BuildSystem"),
.target(
name: "llbuildNinjaTests",
dependencies: ["llbuildNinja", "gtest"],
path: "unittests/Ninja"),
// MARK: GoogleTest
.target(
name: "gtest",
path: "utils/unittest/googletest/src",
exclude: [
"gtest-death-test.cc",
"gtest-filepath.cc",
"gtest-port.cc",
"gtest-printers.cc",
"gtest-test-part.cc",
"gtest-typed-test.cc",
"gtest.cc",
]),
// MARK: Ingested LLVM code.
.target(
name: "llvmSupport",
path: "lib/llvm/Support"
),
],
cxxLanguageStandard: .cxx14
)