Skip to content

Commit

Permalink
Merge pull request #575 from ehuss/check-cfg
Browse files Browse the repository at this point in the history
Squelch check-cfg warnings
  • Loading branch information
ehuss committed Sep 18, 2024
2 parents 597a439 + e67e733 commit 6fa1bf0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
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
8 changes: 8 additions & 0 deletions curl-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ 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 6fa1bf0

Please sign in to comment.