Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ jobs:
with: {toolchain: 1.64}
- name: Build and test all crates
run:
cargo test --workspace -vv --features=hdf5-sys/static --exclude=hdf5-derive
cargo test --workspace -vv --features=hdf5-sys/static,hdf5-sys/zlib --exclude=hdf5-derive

wine:
name: wine
Expand Down
10 changes: 7 additions & 3 deletions hdf5-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ pub struct Header {
pub have_direct: bool,
pub have_parallel: bool,
pub have_threadsafe: bool,
pub have_zlib: bool,
pub have_no_deprecated: bool,
pub have_filter_deflate: bool,
pub version: Version,
}

Expand All @@ -203,7 +203,7 @@ impl Header {
} else if name == "H5_HAVE_THREADSAFE" {
hdr.have_threadsafe = value > 0;
} else if name == "H5_HAVE_FILTER_DEFLATE" {
hdr.have_zlib = value > 0;
hdr.have_filter_deflate = value > 0;
} else if name == "H5_NO_DEPRECATED_SYMBOLS" {
hdr.have_no_deprecated = value > 0;
}
Expand Down Expand Up @@ -680,14 +680,18 @@ impl Config {
println!("cargo:rustc-cfg=feature=\"have-threadsafe\"");
println!("cargo:have_threadsafe=1");
}
if self.header.have_filter_deflate {
println!("cargo:rustc-cfg=feature=\"have-filter-deflate\"");
println!("cargo:have_filter_deflate=1");
}
}

fn check_against_features_required(&self) {
let h = &self.header;
for (flag, feature, native) in [
(!h.have_no_deprecated, "deprecated", "HDF5_ENABLE_DEPRECATED_SYMBOLS"),
(h.have_threadsafe, "threadsafe", "HDF5_ENABLE_THREADSAFE"),
(h.have_zlib, "zlib", "HDF5_ENABLE_Z_LIB_SUPPORT"),
(h.have_filter_deflate, "zlib", "HDF5_ENABLE_Z_LIB_SUPPORT"),
] {
if feature_enabled(&feature.to_ascii_uppercase()) {
assert!(
Expand Down
1 change: 1 addition & 0 deletions hdf5/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ fn main() {
"DEP_HDF5_HAVE_DIRECT" => print_feature("have-direct"),
"DEP_HDF5_HAVE_PARALLEL" => print_feature("have-parallel"),
"DEP_HDF5_HAVE_THREADSAFE" => print_feature("have-threadsafe"),
"DEP_HDF5_HAVE_FILTER_DEFLATE" => print_feature("have-filter-deflate"),
// internal config flags
"DEP_HDF5_MSVC_DLL_INDIRECTION" => print_cfg("msvc_dll_indirection"),
// public version features
Expand Down
1 change: 1 addition & 0 deletions hdf5/tests/test_dataset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ fn test_create_on_databuilder() {
}

#[test]
#[cfg(feature = "have-filter-deflate")]
fn test_issue_223() {
let file = new_in_memory_file().unwrap();

Expand Down