Skip to content

Commit

Permalink
Add alternative macOS search dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
cpmech committed Jul 23, 2024
1 parent 0466ab4 commit 1dcc39e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions russell_lab/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,15 @@ fn compile_blas() {
"/usr/include/openblas", // Arch
"/opt/homebrew/opt/lapack/include", // macOS
"/opt/homebrew/opt/openblas/include", // macOS
"/usr/local/opt/lapack/include", // macOS
"/usr/local/opt/openblas/include", // macOS
])
.compile("c_code_interface_blas");
for d in &[
"/opt/homebrew/opt/lapack/lib", // macOS
"/opt/homebrew/opt/openblas/lib", // macOS
"/usr/local/opt/lapack/lib", // macOS
"/usr/local/opt/openblas/lib", // macOS
] {
println!("cargo:rustc-link-search=native={}", *d);
}
Expand Down
7 changes: 6 additions & 1 deletion russell_sparse/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ fn main() {

#[cfg(not(feature = "local_suitesparse"))]
let inc_dirs = vec![
"/usr/include/suitesparse", // Linux
"/usr/include/suitesparse", // Linux
];

#[cfg(target_os = "macos")]
let inc_dirs = vec![
"/opt/homebrew/include/suitesparse", // macOS
"/usr/local/include/suitesparse", // macOS
];

#[cfg(feature = "local_suitesparse")]
Expand Down

0 comments on commit 1dcc39e

Please sign in to comment.