Skip to content

Commit 01039a2

Browse files
committed
Add wrapper for configuration set/get
1 parent 6c7e005 commit 01039a2

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

netcdf-sys/build.rs

+4
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@ fn main() {
306306
"cargo:rustc-cfg=feature=\"{}.{}.{}\"",
307307
version.major, version.minor, version.patch
308308
);
309+
println!(
310+
"cargo:version_\"{}.{}.{}\"=1",
311+
version.major, version.minor, version.patch
312+
);
309313
}
310314
}
311315
metaheader.emit_feature_flags();

netcdf/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ static = ["netcdf-sys/static"]
2323
ndarray = { version = "0.15", optional = true }
2424
netcdf-sys = { workspace = true }
2525
bitflags = "2.4.2"
26+
libc = "0.2.154"
2627

2728
[dev-dependencies]
2829
clap = { version = "4.5.1", features = ["derive"] }

netcdf/build.rs

+5
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@ fn main() {
22
if std::env::var("DEP_NETCDF_HAS_MMAP").is_ok() {
33
println!("cargo:rustc-cfg=feature=\"has-mmap\"");
44
}
5+
for (env, _value) in std::env::vars() {
6+
if let Some(version) = env.strip_prefix("DEP_NETCDF_VERSION_") {
7+
println!("cargo:rustc-cfg=feature={version}");
8+
}
9+
}
510
}

netcdf/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ pub(crate) mod error;
110110
pub(crate) mod extent;
111111
pub(crate) mod file;
112112
pub(crate) mod group;
113+
#[cfg(feature = "4.9.2")]
114+
pub mod rc;
113115
pub mod types;
114116
pub(crate) mod variable;
115117

0 commit comments

Comments
 (0)