use std::env;
use std::fs;
use std::path::PathBuf;
fn main() {
let mpi_enabled = env::var("CARGO_FEATURE_MPI").is_ok();
let sve_enabled = env::var("CARGO_FEATURE_SVE").is_ok();
if mpi_enabled {
println!(
"cargo:warning=\
oxifft: the `mpi` feature links against the system MPI library (C/Fortran), \
which violates the Pure Rust policy for default builds. \
This feature is provided for distributed computing and is explicitly \
feature-gated. No pure-Rust MPI implementation currently exists. \
See https://github.com/cool-japan/oxifft/blob/master/README.md#mpi for details."
);
}
let _ = sve_enabled;
println!("cargo:rerun-if-env-changed=OXIFFT_TUNE");
println!("cargo:rerun-if-env-changed=OXIFFT_SKIP_TUNE");
let out_dir = PathBuf::from(env::var("OUT_DIR").expect("OUT_DIR must be set by Cargo"));
let baseline_path = out_dir.join("wisdom_baseline.bin");
fs::write(&baseline_path, []).expect("failed to write wisdom_baseline.bin in OUT_DIR");
}