From aedae0b3c1d49d49bd21381043357d2595ab9342 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 16 Sep 2025 12:13:53 +0500 Subject: [PATCH] build-all.py - hdf5 to use cmake instead of ctest After version 1.13.0 it seems hdf5 stopped publishing builds on the ftp and they also stopped publishing `CMake-hdf5-*` builds. Switching to cmake, it will also make it consistent with build-deps.cmd --- nix/build-all.py | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/nix/build-all.py b/nix/build-all.py index db607e1723..cf24f17e73 100644 --- a/nix/build-all.py +++ b/nix/build-all.py @@ -684,15 +684,24 @@ if "hdf5" in targets: for f in compiler_flags: os.environ[f] = re.sub(r"-flto(=\w+)?", "", os.environ[f]) + HDF5_UNDERSCORE = "_".join(HDF5_VERSION.split(".")) HDF5_MAJOR = ".".join(HDF5_VERSION.split(".")[:-1]) + dependency_name = f"hdf5-{HDF5_VERSION}" build_dependency( - name=f"hdf5-{HDF5_VERSION}", - mode="ctest", - build_tool_args=[], - download_url=f"https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-{HDF5_MAJOR}/hdf5-{HDF5_VERSION}/src/", - download_name=f"CMake-hdf5-{HDF5_VERSION}.tar.gz", - ctest_result=f"HDF5-{HDF5_VERSION}-{platform.system()}", - ctest_result_path=f"HDF_Group/HDF5/{HDF5_VERSION}", + name=dependency_name, + mode="cmake", + build_tool_args=[ + f"-DCMAKE_INSTALL_PREFIX={DEPS_DIR}/install/{dependency_name}", + "-DHDF5_ENABLE_Z_LIB_SUPPORT=OFF", + "-DBUILD_TESTING=OFF", + "-DHDF5_BUILD_TOOLS=OFF", + "-DHDF5_BUILD_EXAMPLES=OFF", + "-DBUILD_SHARED_LIBS=OFF", + "-DHDF5_BUILD_UTILS=OFF", + "-DHDF5_BUILD_CPP_LIB=ON", + ], + download_url=f"https://github.com/HDFGroup/hdf5/archive/refs/tags/", + download_name=f"hdf5-{HDF5_UNDERSCORE}.tar.gz", ) for f, o in zip(compiler_flags, orig):