mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-08 09:41:45 +00:00
26 lines
813 B
Swift
26 lines
813 B
Swift
// swift-tools-version:5.3
|
|
|
|
import PackageDescription
|
|
|
|
let unsafeFlags = ["-Wno-shorten-64-to-32", "-I/opt/homebrew/opt/clblast/include"]
|
|
let defines = ["GGML_USE_ACCELERATE", "GGML_USE_CLBLAST"]
|
|
|
|
let package = Package(
|
|
name: "llama",
|
|
products: [
|
|
.library(name: "llama", targets: ["llama"]),
|
|
],
|
|
targets: [
|
|
.target(
|
|
name: "llama",
|
|
path: ".",
|
|
sources: ["ggml.c", "llama.cpp", "ggml-opencl.c"],
|
|
publicHeadersPath: "spm-headers",
|
|
cSettings: [.unsafeFlags(unsafeFlags)] + defines.map { .define($0) },
|
|
cxxSettings: [.unsafeFlags(unsafeFlags)] + defines.map { .define($0) },
|
|
linkerSettings: [.linkedFramework("Accelerate"), .linkedFramework("OpenCL")]
|
|
),
|
|
],
|
|
cxxLanguageStandard: .cxx11
|
|
)
|