Skip to content

Commit 8c7b16d

Browse files
committed
[package] Fix warnings about unknown files to be excluded
This would have been much simpler with glob patterns to cover the common cases: */CMakeLists.txt *.inc *.def
1 parent ccc8e89 commit 8c7b16d

File tree

1 file changed

+45
-6
lines changed

1 file changed

+45
-6
lines changed

Package.swift

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ let package = Package(
2525

2626
.target(
2727
name: "IndexStoreDB",
28-
dependencies: ["IndexStoreDB_CIndexStoreDB"]),
28+
dependencies: ["IndexStoreDB_CIndexStoreDB"],
29+
exclude: ["CMakeLists.txt"]),
2930

3031
.testTarget(
3132
name: "IndexStoreDBTests",
@@ -61,19 +62,29 @@ let package = Package(
6162
.target(
6263
name: "IndexStoreDB_Index",
6364
dependencies: ["IndexStoreDB_Database"],
64-
path: "lib/Index"),
65+
path: "lib/Index",
66+
exclude: [
67+
"CMakeLists.txt",
68+
"indexstore_functions.def",
69+
]),
6570

6671
// C wrapper for IndexStoreDB_Index.
6772
.target(
6873
name: "IndexStoreDB_CIndexStoreDB",
6974
dependencies: ["IndexStoreDB_Index"],
70-
path: "lib/CIndexStoreDB"),
75+
path: "lib/CIndexStoreDB",
76+
exclude: ["CMakeLists.txt"]),
7177

7278
// The lmdb database layer.
7379
.target(
7480
name: "IndexStoreDB_Database",
7581
dependencies: ["IndexStoreDB_Core"],
7682
path: "lib/Database",
83+
exclude: [
84+
"CMakeLists.txt",
85+
"lmdb/LICENSE",
86+
"lmdb/COPYRIGHT",
87+
],
7788
cSettings: [
7889
.define("MDB_USE_POSIX_MUTEX", to: "1",
7990
// Windows does not use POSIX mutex
@@ -85,19 +96,47 @@ let package = Package(
8596
.target(
8697
name: "IndexStoreDB_Core",
8798
dependencies: ["IndexStoreDB_Support"],
88-
path: "lib/Core"),
99+
path: "lib/Core",
100+
exclude: ["CMakeLists.txt"]),
89101

90102
// Support code that is generally useful to the C++ implementation.
91103
.target(
92104
name: "IndexStoreDB_Support",
93105
dependencies: ["IndexStoreDB_LLVMSupport"],
94-
path: "lib/Support"),
106+
path: "lib/Support",
107+
exclude: ["CMakeLists.txt"]),
95108

96109
// Copy of a subset of llvm's ADT and Support libraries.
97110
.target(
98111
name: "IndexStoreDB_LLVMSupport",
99112
dependencies: [],
100-
path: "lib/LLVMSupport"),
113+
path: "lib/LLVMSupport",
114+
exclude: [
115+
"LICENSE.TXT",
116+
"CMakeLists.txt",
117+
// *.inc, *.def
118+
"include/llvm/Support/AArch64TargetParser.def",
119+
"include/llvm/Support/ARMTargetParser.def",
120+
"include/llvm/Support/X86TargetParser.def",
121+
"Support/Unix/Host.inc",
122+
"Support/Unix/Memory.inc",
123+
"Support/Unix/Mutex.inc",
124+
"Support/Unix/Path.inc",
125+
"Support/Unix/Process.inc",
126+
"Support/Unix/Program.inc",
127+
"Support/Unix/Signals.inc",
128+
"Support/Unix/Threading.inc",
129+
"Support/Unix/Watchdog.inc",
130+
"Support/Windows/Host.inc",
131+
"Support/Windows/Memory.inc",
132+
"Support/Windows/Mutex.inc",
133+
"Support/Windows/Path.inc",
134+
"Support/Windows/Process.inc",
135+
"Support/Windows/Program.inc",
136+
"Support/Windows/Signals.inc",
137+
"Support/Windows/Threading.inc",
138+
"Support/Windows/Watchdog.inc",
139+
]),
101140
],
102141

103142
cxxLanguageStandard: .cxx14

0 commit comments

Comments
 (0)