Skip to content

Commit

Permalink
Use OUT_DIR instead of CARGO_MANIFEST_DIR to expand tar.gz
Browse files Browse the repository at this point in the history
  • Loading branch information
termoshtt committed Dec 24, 2022
1 parent a93816b commit e0450fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions openblas-src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ fn build() {
);
}

let source =
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(format!("OpenBLAS-{}", OPENBLAS_VERSION));
let source = output.join(format!("OpenBLAS-{}", OPENBLAS_VERSION));
if !source.exists() {
let crate_root = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
Command::new("tar")
.arg("xf")
.arg(format!("OpenBLAS-{}.tar.gz", OPENBLAS_VERSION))
.current_dir(env!("CARGO_MANIFEST_DIR"))
.arg(crate_root.join(format!("OpenBLAS-{}.tar.gz", OPENBLAS_VERSION)))
.current_dir(&output)
.status()
.expect("tar command not found");
}
Expand Down

0 comments on commit e0450fa

Please sign in to comment.