pardiso-wrapper 0.1.2

Wrappers for MKL and Panua Pardiso dynamic libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fn main() {
    if cfg!(feature = "mkl") {
        let pkg_name = std::env::var("CARGO_PKG_NAME").unwrap();
        let target_arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_default();

        let is_docs = cfg!(feature = "docs") || std::env::var("DOCS_RS").is_ok();

        // Skip the check when generating documentation
        if !is_docs && target_arch != "x86_64" {
            panic!("{pkg_name} build error: the `mkl` feature is only supported for x86_64.  This platform is {target_arch}.");
        }

        if !cfg!(target_os = "windows") {
            // mkl requires libm on osx/linux
            println!("cargo:rustc-link-lib=m");
        }
    }
}