build.rs
This file
Path
serde_derive_internals/build.rs
23 lines · 902 bytes · Rust
Last changed by
Not known.
History of this fileTake it
1use std::path::Path;23fn main() {4 // Warning: build.rs is not published to crates.io.56 println!("cargo:rerun-if-changed=build.rs");7 println!("cargo:rerun-if-changed=src/mod.rs");89 println!("cargo:rustc-cfg=check_cfg");10 println!("cargo:rustc-check-cfg=cfg(check_cfg)");11 println!("cargo:rustc-check-cfg=cfg(exhaustive)");12 println!("cargo:rustc-check-cfg=cfg(serde_build_from_git)");13 println!("cargo:rustc-check-cfg=cfg(feature, values(\"deserialize_in_place\"))");1415 // Sometimes on Windows the git checkout does not correctly wire up the16 // symlink from serde_derive_internals/src to serde_derive/src/internals.17 // When this happens we'll just build based on relative paths within the git18 // repo.19 let mod_behind_symlink = Path::new("src/mod.rs");20 if !mod_behind_symlink.exists() {21 println!("cargo:rustc-cfg=serde_build_from_git");22 }23}