From 42f9d2426ffbfd63a1bb18cd16dc1fc886a0e1b6 Mon Sep 17 00:00:00 2001
From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com>
Date: Tue, 26 Mar 2024 11:04:36 -0500
Subject: [PATCH] Correct reference copy for 16 API (#4244)
---
HDF5Examples/C/H5T/CMakeLists.txt | 48 +++++++++----
doxygen/dox/ExamplesAPI.dox | 112 +++++++++++++++---------------
2 files changed, 89 insertions(+), 71 deletions(-)
diff --git a/HDF5Examples/C/H5T/CMakeLists.txt b/HDF5Examples/C/H5T/CMakeLists.txt
index e0d76e83fe8..c21a8d03fa1 100644
--- a/HDF5Examples/C/H5T/CMakeLists.txt
+++ b/HDF5Examples/C/H5T/CMakeLists.txt
@@ -115,7 +115,7 @@ if (HDF5_BUILD_TOOLS)
if (NOT ${example_name} STREQUAL "h5ex_t_convert")
if (${example_name} STREQUAL "h5ex_t_vlen" OR ${example_name} STREQUAL "h5ex_t_vlenatt")
if (HDF5_VERSION_STRING VERSION_GREATER_EQUAL "1.14.3")
- if (${H5_LIBVER_DIR} EQUAL 16 AND ${example_name} STREQUAL "h5ex_t_vlenatt")
+ if ((${EXAMPLE_VARNAME}_USE_16_API OR ${H5_LIBVER_DIR} EQUAL 16) AND ${example_name} STREQUAL "h5ex_t_vlenatt")
add_custom_command (
TARGET ${EXAMPLE_VARNAME}_${example_name}
POST_BUILD
@@ -130,7 +130,7 @@ if (HDF5_BUILD_TOOLS)
ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/114/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
)
endif ()
- elseif (${H5_LIBVER_DIR} EQUAL 16)
+ elseif (${EXAMPLE_VARNAME}_USE_16_API OR ${H5_LIBVER_DIR} EQUAL 16)
add_custom_command (
TARGET ${EXAMPLE_VARNAME}_${example_name}
POST_BUILD
@@ -180,7 +180,7 @@ if (HDF5_BUILD_TOOLS)
)
endif ()
elseif (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.12")
- if (${H5_LIBVER_DIR} EQUAL 16)
+ if (${EXAMPLE_VARNAME}_USE_16_API OR ${H5_LIBVER_DIR} EQUAL 16)
add_custom_command (
TARGET ${EXAMPLE_VARNAME}_${example_name}
POST_BUILD
@@ -196,12 +196,21 @@ if (HDF5_BUILD_TOOLS)
)
endif ()
else ()
- add_custom_command (
- TARGET ${EXAMPLE_VARNAME}_${example_name}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
- )
+ if (${EXAMPLE_VARNAME}_USE_16_API OR ${H5_LIBVER_DIR} EQUAL 16)
+ add_custom_command (
+ TARGET ${EXAMPLE_VARNAME}_${example_name}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/16/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
+ )
+ else ()
+ add_custom_command (
+ TARGET ${EXAMPLE_VARNAME}_${example_name}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
+ )
+ endif ()
endif ()
else ()
if (HDF5_VERSION_MAJOR VERSION_EQUAL "1.8")
@@ -260,12 +269,21 @@ if (HDF5_BUILD_TOOLS)
ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/16/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
)
else ()
- add_custom_command (
- TARGET ${EXAMPLE_VARNAME}_${example_name}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
- )
+ if (${EXAMPLE_VARNAME}_USE_16_API)
+ add_custom_command (
+ TARGET ${EXAMPLE_VARNAME}_${example_name}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/16/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
+ )
+ else ()
+ add_custom_command (
+ TARGET ${EXAMPLE_VARNAME}_${example_name}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/tfiles/18/${example_name}.ddl ${PROJECT_BINARY_DIR}/${example_name}.ddl
+ )
+ endif ()
endif ()
endif ()
endforeach ()
diff --git a/doxygen/dox/ExamplesAPI.dox b/doxygen/dox/ExamplesAPI.dox
index 5178b0875a9..b0344e48cb1 100644
--- a/doxygen/dox/ExamplesAPI.dox
+++ b/doxygen/dox/ExamplesAPI.dox
@@ -394,8 +394,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_arrayatt.h5 |
-h5ex_t_arrayatt.tst |
-h5ex_t_arrayatt.ddl |
+h5ex_t_arrayatt.tst |
+h5ex_t_arrayatt.ddl |
Read / Write Array (Dataset) |
@@ -407,8 +407,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_array.h5 |
-h5ex_t_array.tst |
-h5ex_t_array.ddl |
+h5ex_t_array.tst |
+h5ex_t_array.ddl |
Read / Write Bitfield (Attribute) |
@@ -420,8 +420,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_bitatt.h5 |
-h5ex_t_bitatt.tst |
-h5ex_t_bitatt.ddl |
+h5ex_t_bitatt.tst |
+h5ex_t_bitatt.ddl |
Read / Write Bitfield (Dataset) |
@@ -433,8 +433,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_bit.h5 |
-h5ex_t_bit.tst |
-h5ex_t_bit.ddl |
+h5ex_t_bit.tst |
+h5ex_t_bit.ddl |
Read / Write Compound (Attribute) |
@@ -446,8 +446,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_cmpdatt.h5 |
-h5ex_t_cmpdatt.tst |
-h5ex_t_cmpdatt.ddl |
+h5ex_t_cmpdatt.tst |
+h5ex_t_cmpdatt.ddl |
Read / Write Compound (Dataset) |
@@ -459,8 +459,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_cmpd.h5 |
-h5ex_t_cmpd.tst |
-h5ex_t_cmpd.ddl |
+h5ex_t_cmpd.tst |
+h5ex_t_cmpd.ddl |
Commit Named Datatype and Read Back |
@@ -472,8 +472,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_commit.h5 |
-h5ex_t_commit.tst |
-h5ex_t_commit.ddl |
+h5ex_t_commit.tst |
+h5ex_t_commit.ddl |
Convert Between Datatypes in Memory |
@@ -482,8 +482,8 @@ FORTRAN
FORTRAN Java JavaObj MATLAB PyHigh PyLow
h5ex_t_convert.h5 |
-h5ex_t_convert.tst |
-h5ex_t_convert.ddl |
+h5ex_t_convert.tst |
+h5ex_t_convert.ddl |
Read / Write Complex Compound (Attribute) |
@@ -492,8 +492,8 @@ FORTRAN
FORTRAN Java JavaObj MATLAB PyHigh PyLow
h5ex_t_cpxcmpdatt.h5 |
-h5ex_t_cpxcmpdatt.tst |
-h5ex_t_cpxcmpdatt.ddl |
+h5ex_t_cpxcmpdatt.tst |
+h5ex_t_cpxcmpdatt.ddl |
Read / Write Complex Compound (Dataset) |
@@ -502,8 +502,8 @@ FORTRAN
FORTRAN Java JavaObj MATLAB PyHigh PyLow
h5ex_t_cpxcmpd.h5 |
-h5ex_t_cpxcmpd.tst |
-h5ex_t_cpxcmpd.ddl |
+h5ex_t_cpxcmpd.tst |
+h5ex_t_cpxcmpd.ddl |
Read / Write Enumerated (Attribute) |
@@ -513,8 +513,8 @@ FORTRAN
Java JavaObj MATLAB PyHigh PyLow
h5ex_t_enumatt.h5 |
-h5ex_t_enumatt.tst |
-h5ex_t_enumatt.ddl |
+h5ex_t_enumatt.tst |
+h5ex_t_enumatt.ddl |
Read / Write Enumerated (Dataset) |
@@ -524,8 +524,8 @@ FORTRAN
Java JavaObj MATLAB PyHigh PyLow
h5ex_t_enum.h5 |
-h5ex_t_enum.tst |
-h5ex_t_enum.ddl |
+h5ex_t_enum.tst |
+h5ex_t_enum.ddl |
Read / Write Floating Point (Attribute) |
@@ -537,8 +537,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_floatatt.h5 |
-h5ex_t_floatatt.tst |
-h5ex_t_floatatt.ddl |
+h5ex_t_floatatt.tst |
+h5ex_t_floatatt.ddl |
Read / Write Floating Point (Dataset) |
@@ -550,8 +550,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_float.h5 |
-h5ex_t_float.tst |
-h5ex_t_float.ddl |
+h5ex_t_float.tst |
+h5ex_t_float.ddl |
Read / Write Integer Datatype (Attribute) |
@@ -563,8 +563,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_intatt.h5 |
-h5ex_t_intatt.tst |
-h5ex_t_intatt.ddl |
+h5ex_t_intatt.tst |
+h5ex_t_intatt.ddl |
Read / Write Integer Datatype (Dataset) |
@@ -576,8 +576,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_int.h5 |
-h5ex_t_int.tst |
-h5ex_t_int.ddl |
+h5ex_t_int.tst |
+h5ex_t_int.ddl |
Read / Write Object References (Attribute) |
@@ -589,8 +589,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_objrefatt.h5 |
-h5ex_t_objrefatt.tst |
-h5ex_t_objrefatt.ddl |
+h5ex_t_objrefatt.tst |
+h5ex_t_objrefatt.ddl |
Read / Write Object References (Dataset) |
@@ -602,8 +602,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_objref.h5 |
-h5ex_t_objref.tst |
-h5ex_t_objref.ddl |
+h5ex_t_objref.tst |
+h5ex_t_objref.ddl |
Read / Write Opaque (Attribute) |
@@ -615,8 +615,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_opaqueatt.h5 |
-h5ex_t_opaqueatt.tst |
-h5ex_t_opaqueatt.ddl |
+h5ex_t_opaqueatt.tst |
+h5ex_t_opaqueatt.ddl |
Read / Write Opaque (Dataset) |
@@ -628,8 +628,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_opaque.h5 |
-h5ex_t_opaque.tst |
-h5ex_t_opaque.ddl |
+h5ex_t_opaque.tst |
+h5ex_t_opaque.ddl |
Read / Write Region References (Attribute) |
@@ -641,8 +641,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_regrefatt.h5 |
-h5ex_t_regrefatt.tst |
-h5ex_t_regrefatt.ddl |
+h5ex_t_regrefatt.tst |
+h5ex_t_regrefatt.ddl |
Read / Write Region References (Dataset) |
@@ -654,8 +654,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_regref.h5 |
-h5ex_t_regref.tst |
-h5ex_t_regref.ddl |
+h5ex_t_regref.tst |
+h5ex_t_regref.ddl |
Read / Write String (Attribute) |
@@ -667,8 +667,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_stringatt.h5 |
-h5ex_t_stringatt.tst |
-h5ex_t_stringatt.ddl |
+h5ex_t_stringatt.tst |
+h5ex_t_stringatt.ddl |
Read / Write String (Dataset) |
@@ -680,8 +680,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_string.h5 |
-h5ex_t_string.tst |
-h5ex_t_string.ddl |
+h5ex_t_string.tst |
+h5ex_t_string.ddl |
Read / Write Variable Length (Attribute) |
@@ -691,8 +691,8 @@ FORTRAN
Java JavaObj MATLAB PyHigh PyLow
h5ex_t_vlenatt.h5 |
-h5ex_t_vlenatt.tst |
-h5ex_t_vlenatt.ddl |
+h5ex_t_vlenatt.tst |
+h5ex_t_vlenatt.ddl |
Read / Write Variable Length (Dataset) |
@@ -702,8 +702,8 @@ FORTRAN
Java JavaObj MATLAB PyHigh PyLow
h5ex_t_vlen.h5 |
-h5ex_t_vlen.tst |
-h5ex_t_vlen.ddl |
+h5ex_t_vlen.tst |
+h5ex_t_vlen.ddl |
Read / Write Variable Length String (Attribute) |
@@ -713,8 +713,8 @@ FORTRAN
Java JavaObj MATLAB PyHigh PyLow
h5ex_t_vlstringatt.h5 |
-h5ex_t_vlstringatt.tst |
-h5ex_t_vlstringatt.ddl |
+h5ex_t_vlstringatt.tst |
+h5ex_t_vlstringatt.ddl |
Read / Write Variable Length String (Dataset) |
@@ -726,8 +726,8 @@ FORTRAN
MATLAB PyHigh PyLow
h5ex_t_vlstring.h5 |
-h5ex_t_vlstring.tst |
-h5ex_t_vlstring.ddl |
+h5ex_t_vlstring.tst |
+h5ex_t_vlstring.ddl |