From ef23e6d1b9f09aa145b0b0e97dcbdeb554f97911 Mon Sep 17 00:00:00 2001 From: James McNally Date: Sat, 16 Nov 2024 08:27:46 +0000 Subject: [PATCH] fix: Add cargo feature checks to hdf5-types Needed to add the check cfg for the version features in the hdf-types library --- hdf5-types/build.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hdf5-types/build.rs b/hdf5-types/build.rs index 6d5a9698..4289d8bb 100644 --- a/hdf5-types/build.rs +++ b/hdf5-types/build.rs @@ -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("_", ".");