|
| 1 | +// swift-tools-version:5.0 |
| 2 | +//===--- [email protected] ------------------------------*- swift -*-===// |
| 3 | +// |
| 4 | +// This source file is part of the Swift Numerics open source project |
| 5 | +// |
| 6 | +// Copyright (c) 2019 Apple Inc. and the Swift Numerics project authors |
| 7 | +// Licensed under Apache License v2.0 with Runtime Library Exception |
| 8 | +// |
| 9 | +// See https://swift.org/LICENSE.txt for license information |
| 10 | +// |
| 11 | +//===----------------------------------------------------------------------===// |
| 12 | + |
| 13 | +import PackageDescription |
| 14 | + |
| 15 | +let package = Package( |
| 16 | + |
| 17 | + name: "swift-numerics", |
| 18 | + products: [ |
| 19 | + .library(name: "ComplexModule", targets: ["ComplexModule"]), |
| 20 | + .library(name: "Numerics", targets: ["Numerics"]), |
| 21 | + .library(name: "RealModule", targets: ["RealModule"]), |
| 22 | + ], |
| 23 | + |
| 24 | + targets: [ |
| 25 | + // User-facing modules |
| 26 | + .target(name: "ComplexModule", dependencies: ["RealModule"]), |
| 27 | + .target(name: "Numerics", dependencies: ["ComplexModule", "RealModule"]), |
| 28 | + .target( |
| 29 | + name: "RealModule", |
| 30 | + dependencies: ["_NumericsShims"], |
| 31 | + linkerSettings: [ .linkedLibrary("m", .when(platforms: [.linux])) ] |
| 32 | + ), |
| 33 | + |
| 34 | + // Implementation details |
| 35 | + .target(name: "_NumericsShims", dependencies: []), |
| 36 | + .target(name: "_TestSupport", dependencies: ["Numerics"]), |
| 37 | + |
| 38 | + // Unit test bundles |
| 39 | + .testTarget(name: "ComplexTests", dependencies: ["_TestSupport"]), |
| 40 | + .testTarget(name: "RealTests", dependencies: ["_TestSupport"]), |
| 41 | + |
| 42 | + // Test executables |
| 43 | + .target(name: "ComplexLog", dependencies: ["Numerics", "_TestSupport"], path: "Tests/Executable/ComplexLog"), |
| 44 | + .target(name: "ComplexLog1p", dependencies: ["Numerics", "_TestSupport"], path: "Tests/Executable/ComplexLog1p") |
| 45 | + ] |
| 46 | +) |
0 commit comments