Skip to content

Commit

Permalink
Just blow away the whole build dir when building
Browse files Browse the repository at this point in the history
Apparently cmake doesn't like changing configuration between builds...
  • Loading branch information
alexcrichton committed Oct 14, 2015
1 parent ddec793 commit 07ba85a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libgit2-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ extern crate pkg_config;
extern crate cmake;

use std::env;
use std::fs::File;
use std::fs::{self, File};
use std::io::prelude::*;
use std::path::{Path, PathBuf};
use std::process::Command;
Expand Down Expand Up @@ -73,6 +73,9 @@ fn main() {
cfg.define("USE_OPENSSL", "OFF");
}

let _ = fs::remove_dir_all(env::var("OUT_DIR").unwrap());
t!(fs::create_dir_all(env::var("OUT_DIR").unwrap()));

let dst = cfg.define("BUILD_SHARED_LIBS", "OFF")
.define("BUILD_CLAR", "OFF")
.define("CURL", "OFF")
Expand Down

0 comments on commit 07ba85a

Please sign in to comment.