Rerun build if max vars or exprs change in the env

This commit is contained in:
Julius de Bruijn 2019-05-15 20:23:20 +02:00
parent d034cd56b7
commit bf0eea5d60

View File

@ -80,12 +80,16 @@ mod build_bundled {
if cfg!(feature = "session") { if cfg!(feature = "session") {
cfg.flag("-DSQLITE_ENABLE_SESSION"); cfg.flag("-DSQLITE_ENABLE_SESSION");
} }
if let Ok(limit) = env::var("SQLITE_MAX_VARIABLE_NUMBER") { if let Ok(limit) = env::var("SQLITE_MAX_VARIABLE_NUMBER") {
cfg.flag(&format!("-DSQLITE_MAX_VARIABLE_NUMBER={}", limit)); cfg.flag(&format!("-DSQLITE_MAX_VARIABLE_NUMBER={}", limit));
} }
println!("cargo:rerun-if-env-changed=SQLITE_MAX_VARIABLE_NUMBER");
if let Ok(limit) = env::var("SQLITE_MAX_EXPR_DEPTH") { if let Ok(limit) = env::var("SQLITE_MAX_EXPR_DEPTH") {
cfg.flag(&format!("-DSQLITE_MAX_EXPR_DEPTH={}", limit)); cfg.flag(&format!("-DSQLITE_MAX_EXPR_DEPTH={}", limit));
} }
println!("cargo:rerun-if-env-changed=SQLITE_MAX_EXPR_DEPTH");
cfg.compile("libsqlite3.a"); cfg.compile("libsqlite3.a");