Skip to content

Commit 5d4b6ed

Browse files
committed
Enable SQLITE_ENABLE_SNAPSHOT in the GRDBSQLite trait, on Darwin platforms
1 parent 5cc85a9 commit 5d4b6ed

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Package.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,18 @@
44
import Foundation
55
import PackageDescription
66

7+
let darwinPlatforms: [Self] = [
8+
.iOS,
9+
.macOS,
10+
.macCatalyst,
11+
.tvOS,
12+
.visionOS,
13+
.watchOS,
14+
]
715
var swiftSettings: [SwiftSetting] = [
816
.define("SQLITE_ENABLE_FTS5"),
17+
// SQLite snapshots are available on the system SQLite on Darwin platforms.
18+
.define("SQLITE_ENABLE_SNAPSHOT", .when(platforms: darwinPlatforms, traits: ["GRDBSQLite"])
919
]
1020
var cSettings: [CSetting] = []
1121
var dependencies: [PackageDescription.Package.Dependency] = []

0 commit comments

Comments
 (0)