Skip to content

Commit

Permalink
build: require swift-numerics when building with SPM (tensorflow#1147)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
compnerd authored Dec 14, 2020
1 parent 57e8540 commit 5296951
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,19 @@ let package = Package(
type: .dynamic,
targets: ["Tensor"]),
],
dependencies: [],
dependencies: [
.package(url: "https://github.com/apple/swift-numerics", .branch("main")),
],
targets: [
.target(
name: "Tensor",
dependencies: []),
.target(
name: "TensorFlow",
dependencies: ["Tensor"]),
dependencies: [
"Tensor",
.product(name: "Numerics", package: "swift-numerics"),
]),
.target(
name: "Experimental",
dependencies: [],
Expand Down

0 comments on commit 5296951

Please sign in to comment.