-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.rs
22 lines (19 loc) · 814 Bytes
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// SPDX-FileCopyrightText: 2024 Apricot S.
// SPDX-License-Identifier: MIT
// This file is part of https://github.com/Apricot-S/xiangting
#[cfg(feature = "correctness")]
fn main() {
if std::env::var("CARGO_FEATURE_CORRECTNESS").is_ok() {
cxx_build::bridge("tests/nyanten.rs")
.include("/workspaces/nyanten")
.include("/workspaces/xiangting/include")
.flag_if_supported("-std=c++23")
.compile("nyanten");
println!("cargo:rerun-if-changed=/workspaces/nyanten/nyanten/replacement_number.hpp");
println!("cargo:rerun-if-changed=include/nyanten_cxx.hpp");
println!("cargo:rerun-if-changed=tests/nyanten.rs");
println!("cargo:rerun-if-changed=tests/correctness.rs");
}
}
#[cfg(not(feature = "correctness"))]
fn main() {}