From c7c0e184f15c1877a095e047c2f001769827e357 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 19 Sep 2023 17:25:07 -0500 Subject: [PATCH] version 1.14.2 and older have a vlen tag name diff --- C/H5T/CMakeLists.txt | 23 ++++++++++++++++------- C/H5T/testfiles/114/h5ex_t_vlen02.ddl | 11 +++++++++++ C/H5T/testfiles/114/h5ex_t_vlenatt02.ddl | 17 +++++++++++++++++ 3 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 C/H5T/testfiles/114/h5ex_t_vlen02.ddl create mode 100644 C/H5T/testfiles/114/h5ex_t_vlenatt02.ddl diff --git a/C/H5T/CMakeLists.txt b/C/H5T/CMakeLists.txt index b6c22d3b..a42e43bb 100644 --- a/C/H5T/CMakeLists.txt +++ b/C/H5T/CMakeLists.txt @@ -123,7 +123,7 @@ if (BUILD_TESTING) ) if (HDF5_BUILD_TOOLS) if (${${EXAMPLE_VARNAME}_USE_16_API} OR ${${EXAMPLE_VARNAME}_USE_18_API} OR ${${EXAMPLE_VARNAME}_USE_110_API} OR ${${EXAMPLE_VARNAME}_USE_112_API}) - if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.14") + if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.14.3") add_custom_command ( TARGET ${EXAMPLE_VARNAME}_${example_name} POST_BUILD @@ -139,12 +139,21 @@ if (BUILD_TESTING) ) endif () else () - add_custom_command ( - TARGET ${EXAMPLE_VARNAME}_${example_name} - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/${H5_LIBVER_DIR}/${example_name}.ddl ${testdest}.ddl - ) + if (HDF5_VERSION_MAJOR VERSION_EQUAL "1.14" AND HDF5_VERSION_STRING VERSION_LESS_EQUAL "1.14.2") + add_custom_command ( + TARGET ${EXAMPLE_VARNAME}_${example_name} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/${H5_LIBVER_DIR}/${example_name}02.ddl ${testdest}.ddl + ) + else () + add_custom_command ( + TARGET ${EXAMPLE_VARNAME}_${example_name} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/${H5_LIBVER_DIR}/${example_name}.ddl ${testdest}.ddl + ) + endif () endif () endif () ADD_H5_TEST (${example_name}) diff --git a/C/H5T/testfiles/114/h5ex_t_vlen02.ddl b/C/H5T/testfiles/114/h5ex_t_vlen02.ddl new file mode 100644 index 00000000..53f48630 --- /dev/null +++ b/C/H5T/testfiles/114/h5ex_t_vlen02.ddl @@ -0,0 +1,11 @@ +HDF5 "h5ex_t_vlen.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_VLEN { H5T_STD_I32LE} + DATASPACE SIMPLE { ( 2 ) / ( 2 ) } + DATA { + (0): (3, 2, 1), (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) + } + } +} +} diff --git a/C/H5T/testfiles/114/h5ex_t_vlenatt02.ddl b/C/H5T/testfiles/114/h5ex_t_vlenatt02.ddl new file mode 100644 index 00000000..a2b32e87 --- /dev/null +++ b/C/H5T/testfiles/114/h5ex_t_vlenatt02.ddl @@ -0,0 +1,17 @@ +HDF5 "h5ex_t_vlenatt.h5" { +GROUP "/" { + DATASET "DS1" { + DATATYPE H5T_STD_I32LE + DATASPACE NULL + DATA { + } + ATTRIBUTE "A1" { + DATATYPE H5T_VLEN { H5T_STD_I32LE} + DATASPACE SIMPLE { ( 2 ) / ( 2 ) } + DATA { + (0): (3, 2, 1), (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) + } + } + } +} +}