1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-04-20 23:16:56 +02:00
Andrew Walbran 4f94a87681 cargo fmt
2025-04-16 15:49:27 +01:00

18 lines
606 B
Rust

fn main() {
// Find target directory, either from CARGO_TARGET_DIR or in-tree if unset.
let mut src_dir =
std::env::var_os("CARGO_TARGET_DIR").unwrap_or("../../../target".into());
src_dir.push("/cxxbridge/demo/src");
cxx_build::bridge("src/main.rs")
.file("src/blobstore.cc")
.flag_if_supported("-std=c++14")
.include(".")
.include(src_dir)
.compile("cxxbridge-demo");
println!("cargo:rerun-if-changed=src/main.rs");
println!("cargo:rerun-if-changed=src/blobstore.cc");
println!("cargo:rerun-if-changed=include/blobstore.h");
}