Skip to content

Commit

Permalink
CI review
Browse files Browse the repository at this point in the history
  • Loading branch information
hansieodendaal committed Nov 13, 2024
1 parent 08b3aac commit 22c6af4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ fn main() {
}
if !success {
println!("'Visual Studio 17 2022' not found, trying 'Visual Studio 16 2019'");

// Remove all files (contents) from 'build_dir', but not 'build_dir' itself
if let Ok(dir_list) = fs::read_dir(build_dir) {
for entry in dir_list {
if let Ok(entry) = entry {
let path = entry.path();
if path.is_file() {
let _unused = fs::remove_file(path);
} else if path.is_dir() {
let _unused = fs::remove_dir_all(path);
}
}
}
}

match Command::new("cmake")
.arg("-G")
.arg("Visual Studio 16 2019")
Expand Down

0 comments on commit 22c6af4

Please sign in to comment.