Skip to content

Commit

Permalink
Squelch check-cfg warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Sep 18, 2024
1 parent 226030a commit efde9c2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
use std::env;

fn main() {
println!("cargo::rustc-check-cfg=cfg(\
need_openssl_init,\
need_openssl_probe,\
)");
// OpenSSL >= 1.1.0 can be initialized concurrently and is initialized correctly by libcurl.
// <= 1.0.2 need locking callbacks, which are provided by openssl_sys::init().
let use_openssl = match env::var("DEP_OPENSSL_VERSION_NUMBER") {
Expand Down
6 changes: 6 additions & 0 deletions curl-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ use std::process::Command;

fn main() {
println!("cargo:rerun-if-changed=curl");
println!("cargo::rustc-check-cfg=cfg(\
libcurl_vendored,\
link_libnghttp2,\
link_libz,\
link_openssl,\
)");
let target = env::var("TARGET").unwrap();
let windows = target.contains("windows");

Expand Down

0 comments on commit efde9c2

Please sign in to comment.