Merge pull request #167 from thewh1teagle/fix/link-openblas

fix: link openblas path correctly
This commit is contained in:
Niko 2024-09-01 23:13:19 +00:00 committed by GitHub
commit 166da11ebd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,8 +37,18 @@ fn main() {
} }
#[cfg(feature = "openblas")] #[cfg(feature = "openblas")]
{ {
if let Ok(openblas_path) = env::var("OPENBLAS_PATH") {
println!(
"cargo::rustc-link-search={}",
PathBuf::from(openblas_path).join("lib").display()
);
}
if cfg!(windows) {
println!("cargo:rustc-link-lib=libopenblas");
} else {
println!("cargo:rustc-link-lib=openblas"); println!("cargo:rustc-link-lib=openblas");
} }
}
#[cfg(feature = "cuda")] #[cfg(feature = "cuda")]
{ {
println!("cargo:rustc-link-lib=cublas"); println!("cargo:rustc-link-lib=cublas");