Add initial version of qoi-bench
This commit is contained in:
parent
3ec3d34987
commit
d0e2b70d3d
4 changed files with 378 additions and 0 deletions
18
qoi-bench/build.rs
Normal file
18
qoi-bench/build.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
use std::env;
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
|
||||
fn main() {
|
||||
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
|
||||
let out_src = out_dir.join("qoi.c");
|
||||
fs::write(&out_src, "#include \"qoi.h\"\n").unwrap();
|
||||
|
||||
cc::Build::new()
|
||||
.file(&out_src)
|
||||
.include("../ext/qoi")
|
||||
.define("QOI_NO_STDIO", None)
|
||||
.define("QOI_IMPLEMENTATION", None)
|
||||
.flag("-Wno-unsequenced")
|
||||
.opt_level(3)
|
||||
.compile("qoi");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue