-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathPackage.swift
41 lines (35 loc) · 1.08 KB
/
Package.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import PackageDescription
let package = Package(
name: "CUDA",
targets: [
Target(name: "CUDADriver"),
Target(name: "CUDARuntime", dependencies: [ "CUDADriver" ]),
Target(name: "NVRTC", dependencies: [ "CUDADriver" ]),
Target(name: "CuBLAS", dependencies: [ "CUDADriver", "CUDARuntime" ]),
Target(name: "Warp", dependencies: [ "CUDADriver", "CUDARuntime", "CuBLAS", "NVRTC" ])
],
dependencies: [
.Package(url: "https://github.com/rxwei/CCUDA", majorVersion: 1, minor: 5)
]
)
/// Product specification works differently (more formally) in Swift 3.1+
#if (os(Linux) || os(macOS)) && !swift(>=3.1)
let dylib = Product(
name: "CUDA",
type: .Library(.Dynamic),
modules: [ "CUDADriver", "CUDARuntime", "NVRTC", "CuBLAS", ]
)
products.append(dylib)
let a = Product(
name: "CUDA",
type: .Library(.Static),
modules: [ "CUDADriver", "CUDARuntime", "NVRTC", "CuBLAS", ]
)
products.append(a)
let warpA = Product(
name: "Warp",
type: .Library(.Static),
modules: [ "Warp" ]
)
products.append(warpA)
#endif