Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Run cargo test
run: cargo test
macos_x86:
runs-on: macos-12
runs-on: macos-13
timeout-minutes: 30
steps:
- name: Checkout
Expand Down
32 changes: 25 additions & 7 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
use std::path::PathBuf;

fn main() {
let datasketches = PathBuf::from("datasketches-cpp");
let src = PathBuf::from("src");
let mut bridge = cxx_build::bridge(src.join("bridge.rs"));
let datasketches_src = PathBuf::from("datasketches-cpp");
let rust_src = PathBuf::from("src");

let mut bridge = cxx_build::bridge(rust_src.join("bridge.rs"));

println!(
"cargo:rerun-if-changed={}",
rust_src.join("bridge.rs").to_str().unwrap()
);
println!(
"cargo:rerun-if-changed={}",
datasketches_src.join("cpc.cpp").to_str().unwrap()
);
println!(
"cargo:rerun-if-changed={}",
datasketches_src.join("theta.cpp").to_str().unwrap()
);
println!(
"cargo:rerun-if-changed={}",
datasketches_src.join("hh.cpp").to_str().unwrap()
);

assert!(bridge.is_flag_supported("-std=c++11").expect("supported"));
bridge
.files(&[
datasketches.join("cpc.cpp"),
datasketches.join("theta.cpp"),
datasketches.join("hh.cpp"),
datasketches_src.join("cpc.cpp"),
datasketches_src.join("theta.cpp"),
datasketches_src.join("hh.cpp"),
])
.include(datasketches.join("common").join("include"))
.include(datasketches_src.join("common").join("include"))
.flag_if_supported("-std=c++11")
.cpp_link_stdlib(None)
.static_flag(true)
Expand Down
Loading