-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.rs
37 lines (36 loc) · 1.03 KB
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
extern crate cc;
fn main() {
println!("cargo:rustc-link-lib=spqlios");
if cfg!(feature = "fft_fma") {
cc::Build::new()
.cpp(true)
.file("src/spqlios/fft_processor_spqlios.cpp")
.file("src/spqlios/spqlios-fft-impl.cpp")
.file("src/spqlios/spqlios-wrapper.cpp")
.file("src/spqlios/spqlios-fft-fma.s")
.file("src/spqlios/spqlios-ifft-fma.s")
.flag("-std=c++17")
.flag("-lm")
.flag("-Ofast")
.flag("-march=native")
.flag("-DNDEBUG")
.include("src")
.compile("libspqlios.a");
}
if cfg!(feature = "fft_avx") {
cc::Build::new()
.cpp(true)
.file("src/spqlios/fft_processor_spqlios.cpp")
.file("src/spqlios/spqlios-fft-impl.cpp")
.file("src/spqlios/spqlios-wrapper.cpp")
.file("src/spqlios/spqlios-fft-avx.s")
.file("src/spqlios/spqlios-ifft-avx.s")
.flag("-std=c++17")
.flag("-lm")
.flag("-Ofast")
.flag("-march=native")
.flag("-DNDEBUG")
.include("src")
.compile("libspqlios.a");
}
}