Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Commit 5296951

Browse files
authored
build: require swift-numerics when building with SPM (#1147)
SPM does not allow for build configurations. Force swift-numerics to be used all the time. This is required in order to be able to build with standard toolchains which do not have the TensorFlow numerics additions.
1 parent 57e8540 commit 5296951

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Package.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,19 @@ let package = Package(
3232
type: .dynamic,
3333
targets: ["Tensor"]),
3434
],
35-
dependencies: [],
35+
dependencies: [
36+
.package(url: "https://github.com/apple/swift-numerics", .branch("main")),
37+
],
3638
targets: [
3739
.target(
3840
name: "Tensor",
3941
dependencies: []),
4042
.target(
4143
name: "TensorFlow",
42-
dependencies: ["Tensor"]),
44+
dependencies: [
45+
"Tensor",
46+
.product(name: "Numerics", package: "swift-numerics"),
47+
]),
4348
.target(
4449
name: "Experimental",
4550
dependencies: [],

0 commit comments

Comments
 (0)