We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f61559 commit 77954dbCopy full SHA for 77954db
build.rs
@@ -1,8 +1,18 @@
1
extern crate pkg_config;
2
extern crate semver;
3
+use std::env;
4
+
5
use semver::Version;
6
7
fn main() {
8
+ println!("cargo:rerun-if-env-changed=DOCS_RS");
9
+ if env::var("DOCS_RS").is_ok() {
10
+ println!("cargo:warning=Skipping build.rs when building for docs.rs");
11
+ println!("cargo::rustc-cfg=docsrs");
12
+ println!("cargo:rustc-check-cfg=cfg(docsrs)");
13
+ return;
14
+ }
15
16
// Rebuild when the bridge files change
17
println!("cargo:rerun-if-changed=src/lib.rs");
18
println!("cargo:rerun-if-changed=src/precice-bridge.cpp");
0 commit comments