1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
#![deny(missing_docs)]
#![warn(missing_copy_implementations)]
#![warn(trivial_casts)]
#![warn(trivial_numeric_casts)]
#![warn(unused_extern_crates)]
#![warn(unused_import_braces)]
#![warn(unused_qualifications)]
#![allow(unknown_lints)]
//! Probe an environment for an installed MPI library
//!
//! Probing is done in several steps on Unix:
//!
//! 1. Try to find an MPI compiler wrapper either from the environment variable `MPICC` or under
//! the name `mpicc` then run the compiler wrapper with the command line argument `-show` and
//! interpret the resulting output as `gcc` compatible command line arguments.
//! 2. Query the `pkg-config` database for an installation of `mpich`.
//! 3. Query the `pkg-config` database for an installation of `openmpi`.
//!
//! On Windows, only MS-MPI is looked for. The MSMPI_INC and MSMPI_LIB32/64 environment variables
//! are expected.
//!
//! The result of the first successful step is returned. If no step is successful, a list of errors
//! encountered while executing the steps is returned.
mod os;
pub use os::probe;
use std::path::PathBuf;
/// Result of a successfull probe
#[allow(clippy::manual_non_exhaustive)]
#[derive(Clone, Debug)]
pub struct Library {
/// Path to compiler capable of building MPI programs
pub mpicc: Option<String>,
/// Names of the native MPI libraries that need to be linked
pub libs: Vec<String>,
/// Search path for native MPI libraries
pub lib_paths: Vec<PathBuf>,
/// Search path for C header files
pub include_paths: Vec<PathBuf>,
/// The version of the MPI library
pub version: String,
_priv: (),
}