fix: link openblas path correctly
This commit is contained in:
parent
744804a8aa
commit
67924ca473
1 changed files with 11 additions and 1 deletions
10
sys/build.rs
10
sys/build.rs
|
|
@ -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");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue