idtree 0.2.0

ID-Tree dynamic connectivity data structure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// build.rs

fn main() {
    cxx_build::bridge("src/bridge.rs")
        .file("cpp/dndtree_wrapper.cpp")
        // No need to compile dndtree.h if it's all inline/included
        .include("cpp")
        .flag_if_supported("/std:c++17")
        .flag_if_supported("-std=c++17")
        // This suppresses the MSVC warnings about fopen
        .define("_CRT_SECURE_NO_WARNINGS", None)
        .compile("dndtree-bridge");

    println!("cargo:rerun-if-changed=src/bridge.rs");
    println!("cargo:rerun-if-changed=cpp/dndtree_wrapper.cpp");
    println!("cargo:rerun-if-changed=cpp/dndtree_wrapper.h");
    println!("cargo:rerun-if-changed=cpp/dndtree.h");
}