blob: 8e15dd0d3c4ea603bc8e66dfa860f7cd0cbe34de [file] [log] [blame]
Brian Silvermanf3ec38b2022-07-06 20:43:36 -07001// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6// option. This file may not be copied, modified, or distributed
7// except according to those terms.
8
9fn main() -> miette::Result<()> {
10 let path = std::path::PathBuf::from("src");
11 let mut b = autocxx_build::Builder::new("src/main.rs", &[&path]).build()?;
12 b.flag_if_supported("-std=c++14")
Austin Schuh6ea9bfa2023-08-06 19:05:10 -070013 .file("src/input.cc")
14 .compile("autocxx-reference-wrapper-example");
Brian Silvermanf3ec38b2022-07-06 20:43:36 -070015
16 println!("cargo:rerun-if-changed=src/main.rs");
17 println!("cargo:rerun-if-changed=src/input.h");
Austin Schuh6ea9bfa2023-08-06 19:05:10 -070018
Brian Silvermanf3ec38b2022-07-06 20:43:36 -070019 Ok(())
20}