Skip to content

Commit

Permalink
fix: Add cargo feature checks to hdf5-types
Browse files Browse the repository at this point in the history
Needed to add the check cfg for the version features in the hdf-types
library
  • Loading branch information
JamesMc86 committed Nov 16, 2024
1 parent 348defc commit ef23e6d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hdf5-types/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ fn main() {
if std::env::var_os("DEP_HDF5_MSVC_DLL_INDIRECTION").is_some() {
println!("cargo::rustc-cfg=windows_dll");
}

// Declare the known HDF5 versions we might feature flag on
// in this crate.
println!("cargo::rustc-check-cfg=cfg(feature, values(\"1.12.0\"))");

for (key, _) in std::env::vars() {
if key.starts_with("DEP_HDF5_VERSION_") {
let version = key.trim_start_matches("DEP_HDF5_VERSION_").replace("_", ".");
Expand Down

0 comments on commit ef23e6d

Please sign in to comment.