cuda-rust-example/build.rs

10 lines
258 B
Rust
Raw Normal View History

2019-05-03 01:00:44 +10:00
fn main() {
cc::Build::new()
.cuda(true)
.flag("-cudart=shared")
.file("src/c/test.cu")
.compile("libtest.a");
println!("cargo:rustc-link-search=native=/opt/cuda/lib64");
println!("cargo:rustc-link-lib=cudart");
}