From 160e3e4f11349a1493f10fae59ced0ae7378c5bd Mon Sep 17 00:00:00 2001 From: Kai Zhao Date: Sat, 31 Aug 2024 11:55:58 -0400 Subject: [PATCH] 1. move version check to config.load() 2. config.save() now use less space 3. update h5z-sz3 with readme and compact cd_value array --- tools/H5Z-SZ3/CMakeLists.txt | 22 ++++++++++------------ tools/H5Z-SZ3/test/sz3ToHDF5.cpp | 8 ++++---- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/tools/H5Z-SZ3/CMakeLists.txt b/tools/H5Z-SZ3/CMakeLists.txt index 8306b023..b8664f58 100644 --- a/tools/H5Z-SZ3/CMakeLists.txt +++ b/tools/H5Z-SZ3/CMakeLists.txt @@ -4,27 +4,25 @@ #set(HDF5_LIBRARIES "/path/to/hdf5-1.12.1/hdf5/lib/libhdf5.so") #set(HDF5_INCLUDE_DIRS "/path/to/hdf5-1.12.1/hdf5/include") -find_package(HDF5 REQUIRED) +find_package(HDF5 COMPONENTS C REQUIRED) #message("HDF5LIB PATH:" ${HDF5_LIBRARIES}) #message("HDF5INCLUDE PATH:" ${HDF5_INCLUDE_DIRS}) -add_library( - hdf5sz3 +add_library(hdf5sz3 src/H5Z_SZ3.cpp ) -target_link_libraries( - hdf5sz3 - PUBLIC SZ3 ${HDF5_LIBRARIES} +target_link_libraries(hdf5sz3 + PUBLIC SZ3 HDF5::HDF5 ) -if(${HDF5_IS_PARALLEL}) +if (${HDF5_IS_PARALLEL}) find_package(MPI REQUIRED) - target_link_libraries(hdf5sz3 PUBLIC MPI::MPI_CXX) -endif() + target_link_libraries(hdf5sz3 + PUBLIC MPI::MPI_CXX) +endif () -target_include_directories( - hdf5sz3 +target_include_directories(hdf5sz3 PUBLIC ${HDF5_INCLUDE_DIRS} $ @@ -37,6 +35,6 @@ install(TARGETS hdf5sz3 EXPORT HDF5SZ3 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ) +) install(DIRECTORY include DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hdf5_sz3) export(TARGETS hdf5sz3 FILE HDF5SZ3.cmake) diff --git a/tools/H5Z-SZ3/test/sz3ToHDF5.cpp b/tools/H5Z-SZ3/test/sz3ToHDF5.cpp index 6eb3ee96..f0e66fc7 100644 --- a/tools/H5Z-SZ3/test/sz3ToHDF5.cpp +++ b/tools/H5Z-SZ3/test/sz3ToHDF5.cpp @@ -7,14 +7,14 @@ * See COPYRIGHT in top-level directory. */ -#include -#include -#include +#include +#include +#include #include #include #include "hdf5.h" -#include "H5Cpp.h" +// #include "H5Cpp.h" #include "H5Z_SZ3.hpp" #include "SZ3/utils/FileUtil.hpp" #include "SZ3/utils/Config.hpp"