Skip to content

Commit

Permalink
Merge pull request #34 from byrnHDF/master-vlen-1142
Browse files Browse the repository at this point in the history
version 1.14.2 and older have a vlen tag name diff
  • Loading branch information
lrknox authored Sep 21, 2023
2 parents 986ef3d + c7c0e18 commit 883621f
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 7 deletions.
23 changes: 16 additions & 7 deletions C/H5T/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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})
Expand Down
11 changes: 11 additions & 0 deletions C/H5T/testfiles/114/h5ex_t_vlen02.ddl
Original file line number Diff line number Diff line change
@@ -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)
}
}
}
}
17 changes: 17 additions & 0 deletions C/H5T/testfiles/114/h5ex_t_vlenatt02.ddl
Original file line number Diff line number Diff line change
@@ -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)
}
}
}
}
}

0 comments on commit 883621f

Please sign in to comment.