Commit cc896542 authored by liyanan's avatar liyanan Committed by ShuYu Wang

explicit fail when rocksdb version is too low (#68)

parent 62741f9e
......@@ -18,3 +18,4 @@ sse = []
[build-dependencies]
gcc = "0.3"
pkg-config = "0.3.8"
extern crate gcc;
extern crate pkg_config;
use std::{env, fs, str};
use std::path::PathBuf;
......@@ -13,7 +13,15 @@ macro_rules! t {
}
fn main() {
const ROCKSDB_VERSION: &'static str = "5.4";
if !cfg!(feature = "static-link") {
match pkg_config::Config::new().atleast_version(ROCKSDB_VERSION).probe("rocksdb") {
Ok(_) => (),
Err(_) => {
panic!("failed to find rocksdb >= {} by pkg-config", ROCKSDB_VERSION);
}
}
gcc::Config::new()
.cpp(true)
.file("crocksdb/c.cc")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment