summaryrefslogtreecommitdiffstats
path: root/HDF5Examples
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-12-22 21:17:05 (GMT)
committerGitHub <noreply@github.com>2023-12-22 21:17:05 (GMT)
commit366f2d94a3f5ee20287de8062a2a2c895e9eb856 (patch)
tree723c29f3a08b73b1e69bd824c392960e4bab3bd9 /HDF5Examples
parent11e15aeed1b82201ea0805dcef5bfce3ac02b9cb (diff)
downloadhdf5-366f2d94a3f5ee20287de8062a2a2c895e9eb856.zip
hdf5-366f2d94a3f5ee20287de8062a2a2c895e9eb856.tar.gz
hdf5-366f2d94a3f5ee20287de8062a2a2c895e9eb856.tar.bz2
Add CMake api checks to test the new Examples folder. (#3907)
* Fix missing build-mode value * Use 110 version file only for the 1.10 library * Fix H5_LIBVER_DIR variable * Disable 1.6 API tests for now.
Diffstat (limited to 'HDF5Examples')
-rw-r--r--HDF5Examples/C/H5D/16/h5ex_d_alloc.c13
-rw-r--r--HDF5Examples/C/H5D/16/h5ex_d_checksum.c12
-rw-r--r--HDF5Examples/C/H5D/16/h5ex_d_chunk.c18
-rw-r--r--HDF5Examples/C/H5D/16/h5ex_d_compact.c11
-rw-r--r--HDF5Examples/C/H5D/16/h5ex_d_extern.c11
-rw-r--r--HDF5Examples/C/H5D/16/h5ex_d_fillval.c21
-rw-r--r--HDF5Examples/C/H5D/16/h5ex_d_gzip.c18
-rw-r--r--HDF5Examples/C/H5D/16/h5ex_d_hyper.c16
-rw-r--r--HDF5Examples/C/H5D/16/h5ex_d_rdwr.c10
-rw-r--r--HDF5Examples/C/H5D/16/h5ex_d_shuffle.c18
-rw-r--r--HDF5Examples/C/H5D/16/h5ex_d_szip.c19
-rw-r--r--HDF5Examples/C/H5D/16/h5ex_d_unlimadd.c23
-rw-r--r--HDF5Examples/C/H5D/16/h5ex_d_unlimgzip.c23
-rw-r--r--HDF5Examples/C/H5D/16/h5ex_d_unlimmod.c20
-rw-r--r--HDF5Examples/C/H5D/CMakeLists.txt2
-rw-r--r--HDF5Examples/C/H5G/CMakeLists.txt8
-rw-r--r--HDF5Examples/C/H5T/CMakeLists.txt2
-rw-r--r--HDF5Examples/JAVA/H5J/Java_sourcefiles.cmake2
18 files changed, 161 insertions, 86 deletions
diff --git a/HDF5Examples/C/H5D/16/h5ex_d_alloc.c b/HDF5Examples/C/H5D/16/h5ex_d_alloc.c
index d4ae7b9..78f0ce8 100644
--- a/HDF5Examples/C/H5D/16/h5ex_d_alloc.c
+++ b/HDF5Examples/C/H5D/16/h5ex_d_alloc.c
@@ -26,13 +26,18 @@
int
main(void)
{
- hid_t file, space, dset1, dset2, dcpl;
+ hid_t file = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t dset1 = H5I_INVALID_HID;
+ hid_t dset2 = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
/* Handles */
herr_t status;
H5D_space_status_t space_status;
- hsize_t dims[2] = {DIM0, DIM1}, storage_size;
- int wdata[DIM0][DIM1], /* Write buffer */
- i, j;
+ hsize_t dims[2] = {DIM0, DIM1};
+ hsize_t storage_size;
+ int wdata[DIM0][DIM1]; /* Write buffer */
+ hsize_t i, j;
/*
* Initialize data.
diff --git a/HDF5Examples/C/H5D/16/h5ex_d_checksum.c b/HDF5Examples/C/H5D/16/h5ex_d_checksum.c
index ce057aa..a03e004 100644
--- a/HDF5Examples/C/H5D/16/h5ex_d_checksum.c
+++ b/HDF5Examples/C/H5D/16/h5ex_d_checksum.c
@@ -27,7 +27,10 @@
int
main(void)
{
- hid_t file, space, dset, dcpl;
+ hid_t file = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
/* Handles */
herr_t status;
htri_t avail;
@@ -35,9 +38,10 @@ main(void)
hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1};
size_t nelmts;
unsigned int flags, filter_info;
- int wdata[DIM0][DIM1], /* Write buffer */
- rdata[DIM0][DIM1], /* Read buffer */
- max, i, j;
+ int wdata[DIM0][DIM1]; /* Write buffer */
+ int rdata[DIM0][DIM1]; /* Read buffer */
+ int max;
+ hsize_t i, j;
/*
* Check if the Fletcher32 filter is available and can be used for
diff --git a/HDF5Examples/C/H5D/16/h5ex_d_chunk.c b/HDF5Examples/C/H5D/16/h5ex_d_chunk.c
index b19e7c7..4697261 100644
--- a/HDF5Examples/C/H5D/16/h5ex_d_chunk.c
+++ b/HDF5Examples/C/H5D/16/h5ex_d_chunk.c
@@ -27,13 +27,21 @@
int
main(void)
{
- hid_t file, space, dset, dcpl; /* Handles */
+ hid_t file = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
herr_t status;
H5D_layout_t layout;
- hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}, start[2], stride[2], count[2], block[2];
- int wdata[DIM0][DIM1], /* Write buffer */
- rdata[DIM0][DIM1], /* Read buffer */
- i, j;
+ hsize_t dims[2] = {DIM0, DIM1};
+ hsize_t chunk[2] = {CHUNK0, CHUNK1};
+ hsize_t start[2];
+ hsize_t stride[2];
+ hsize_t count[2];
+ hsize_t block[2];
+ int wdata[DIM0][DIM1]; /* Write buffer */
+ int rdata[DIM0][DIM1]; /* Read buffer */
+ hsize_t i, j;
/*
* Initialize data to "1", to make it easier to see the selections.
diff --git a/HDF5Examples/C/H5D/16/h5ex_d_compact.c b/HDF5Examples/C/H5D/16/h5ex_d_compact.c
index 2d199ec..0c10a87 100644
--- a/HDF5Examples/C/H5D/16/h5ex_d_compact.c
+++ b/HDF5Examples/C/H5D/16/h5ex_d_compact.c
@@ -22,13 +22,16 @@
int
main(void)
{
- hid_t file, space, dset, dcpl; /* Handles */
+ hid_t file = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
herr_t status;
H5D_layout_t layout;
hsize_t dims[2] = {DIM0, DIM1};
- int wdata[DIM0][DIM1], /* Write buffer */
- rdata[DIM0][DIM1], /* Read buffer */
- i, j;
+ int wdata[DIM0][DIM1]; /* Write buffer */
+ int rdata[DIM0][DIM1]; /* Read buffer */
+ hsize_t i, j;
/*
* Initialize data.
diff --git a/HDF5Examples/C/H5D/16/h5ex_d_extern.c b/HDF5Examples/C/H5D/16/h5ex_d_extern.c
index f0cc60d..6291c3c 100644
--- a/HDF5Examples/C/H5D/16/h5ex_d_extern.c
+++ b/HDF5Examples/C/H5D/16/h5ex_d_extern.c
@@ -25,13 +25,16 @@
int
main(void)
{
- hid_t file, space, dset, dcpl; /* Handles */
+ hid_t file = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
herr_t status;
hsize_t dims[2] = {DIM0, DIM1};
char name[NAME_BUF_SIZE];
- int wdata[DIM0][DIM1], /* Write buffer */
- rdata[DIM0][DIM1], /* Read buffer */
- i, j;
+ int wdata[DIM0][DIM1]; /* Write buffer */
+ int rdata[DIM0][DIM1]; /* Read buffer */
+ hsize_t i, j;
/*
* Initialize data.
diff --git a/HDF5Examples/C/H5D/16/h5ex_d_fillval.c b/HDF5Examples/C/H5D/16/h5ex_d_fillval.c
index e2fd100..4f6eee3 100644
--- a/HDF5Examples/C/H5D/16/h5ex_d_fillval.c
+++ b/HDF5Examples/C/H5D/16/h5ex_d_fillval.c
@@ -30,15 +30,20 @@
int
main(void)
{
- hid_t file, space, dset, dcpl; /* Handles */
+ hid_t file = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
herr_t status;
- hsize_t dims[2] = {DIM0, DIM1}, extdims[2] = {EDIM0, EDIM1}, maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED},
- chunk[2] = {CHUNK0, CHUNK1};
- int wdata[DIM0][DIM1], /* Write buffer */
- rdata[DIM0][DIM1], /* Read buffer */
- rdata2[EDIM0][EDIM1], /* Read buffer for
- extension */
- fillval, i, j;
+ hsize_t dims[2] = {DIM0, DIM1};
+ hsize_t extdims[2] = {EDIM0, EDIM1};
+ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
+ hsize_t chunk[2] = {CHUNK0, CHUNK1};
+ int wdata[DIM0][DIM1]; /* Write buffer */
+ int rdata[DIM0][DIM1]; /* Read buffer */
+ int rdata2[EDIM0][EDIM1]; /* Read buffer for extension */
+ int fillval;
+ hsize_t i, j;
/*
* Initialize data.
diff --git a/HDF5Examples/C/H5D/16/h5ex_d_gzip.c b/HDF5Examples/C/H5D/16/h5ex_d_gzip.c
index cd44d8e..2b35559 100644
--- a/HDF5Examples/C/H5D/16/h5ex_d_gzip.c
+++ b/HDF5Examples/C/H5D/16/h5ex_d_gzip.c
@@ -26,16 +26,22 @@
int
main(void)
{
- hid_t file, space, dset, dcpl; /* Handles */
+ hid_t file = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
herr_t status;
htri_t avail;
H5Z_filter_t filter_type;
- hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1};
+ hsize_t dims[2] = {DIM0, DIM1};
+ hsize_t chunk[2] = {CHUNK0, CHUNK1};
size_t nelmts;
- unsigned int flags, filter_info;
- int wdata[DIM0][DIM1], /* Write buffer */
- rdata[DIM0][DIM1], /* Read buffer */
- max, i, j;
+ unsigned int flags;
+ unsigned int filter_info;
+ int wdata[DIM0][DIM1]; /* Write buffer */
+ int rdata[DIM0][DIM1]; /* Read buffer */
+ int max;
+ hsize_t i, j;
/*
* Check if gzip compression is available and can be used for both
diff --git a/HDF5Examples/C/H5D/16/h5ex_d_hyper.c b/HDF5Examples/C/H5D/16/h5ex_d_hyper.c
index df361d6..1d81ec2 100644
--- a/HDF5Examples/C/H5D/16/h5ex_d_hyper.c
+++ b/HDF5Examples/C/H5D/16/h5ex_d_hyper.c
@@ -25,12 +25,18 @@
int
main(void)
{
- hid_t file, space, dset; /* Handles */
+ hid_t file = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
herr_t status;
- hsize_t dims[2] = {DIM0, DIM1}, start[2], stride[2], count[2], block[2];
- int wdata[DIM0][DIM1], /* Write buffer */
- rdata[DIM0][DIM1], /* Read buffer */
- i, j;
+ hsize_t dims[2] = {DIM0, DIM1};
+ hsize_t start[2];
+ hsize_t stride[2];
+ hsize_t count[2];
+ hsize_t block[2];
+ int wdata[DIM0][DIM1]; /* Write buffer */
+ int rdata[DIM0][DIM1]; /* Read buffer */
+ hsize_t i, j;
/*
* Initialize data to "1", to make it easier to see the selections.
diff --git a/HDF5Examples/C/H5D/16/h5ex_d_rdwr.c b/HDF5Examples/C/H5D/16/h5ex_d_rdwr.c
index 4b6a56a..fbdc180 100644
--- a/HDF5Examples/C/H5D/16/h5ex_d_rdwr.c
+++ b/HDF5Examples/C/H5D/16/h5ex_d_rdwr.c
@@ -22,12 +22,14 @@
int
main(void)
{
- hid_t file, space, dset; /* Handles */
+ hid_t file = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
herr_t status;
hsize_t dims[2] = {DIM0, DIM1};
- int wdata[DIM0][DIM1], /* Write buffer */
- rdata[DIM0][DIM1], /* Read buffer */
- i, j;
+ int wdata[DIM0][DIM1]; /* Write buffer */
+ int rdata[DIM0][DIM1]; /* Read buffer */
+ hsize_t i, j;
/*
* Initialize data.
diff --git a/HDF5Examples/C/H5D/16/h5ex_d_shuffle.c b/HDF5Examples/C/H5D/16/h5ex_d_shuffle.c
index cff4730..137b4b8 100644
--- a/HDF5Examples/C/H5D/16/h5ex_d_shuffle.c
+++ b/HDF5Examples/C/H5D/16/h5ex_d_shuffle.c
@@ -27,16 +27,22 @@
int
main(void)
{
- hid_t file, space, dset, dcpl; /* Handles */
+ hid_t file = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
herr_t status;
htri_t avail;
H5Z_filter_t filter_type;
- hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1};
+ hsize_t dims[2] = {DIM0, DIM1};
+ hsize_t chunk[2] = {CHUNK0, CHUNK1};
size_t nelmts;
- unsigned int flags, filter_info;
- int wdata[DIM0][DIM1], /* Write buffer */
- rdata[DIM0][DIM1], /* Read buffer */
- max, nfilters, i, j;
+ unsigned int flags;
+ unsigned int filter_info;
+ int wdata[DIM0][DIM1]; /* Write buffer */
+ int rdata[DIM0][DIM1]; /* Read buffer */
+ int max, nfilters;
+ int i, j;
/*
* Check if gzip compression is available and can be used for both
diff --git a/HDF5Examples/C/H5D/16/h5ex_d_szip.c b/HDF5Examples/C/H5D/16/h5ex_d_szip.c
index 6ecc6ef..cf2f639 100644
--- a/HDF5Examples/C/H5D/16/h5ex_d_szip.c
+++ b/HDF5Examples/C/H5D/16/h5ex_d_szip.c
@@ -26,16 +26,23 @@
int
main(void)
{
- hid_t file, space, dset, dcpl; /* Handles */
+ hid_t file = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
+
herr_t status;
htri_t avail;
H5Z_filter_t filter_type;
- hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1};
+ hsize_t dims[2] = {DIM0, DIM1};
+ hsize_t chunk[2] = {CHUNK0, CHUNK1};
size_t nelmts;
- unsigned int flags, filter_info;
- int wdata[DIM0][DIM1], /* Write buffer */
- rdata[DIM0][DIM1], /* Read buffer */
- max, i, j;
+ unsigned int flags;
+ unsigned int filter_info;
+ int wdata[DIM0][DIM1]; /* Write buffer */
+ int rdata[DIM0][DIM1]; /* Read buffer */
+ int max;
+ hsize_t i, j;
/*
* Check if szip compression is available and can be used for both
diff --git a/HDF5Examples/C/H5D/16/h5ex_d_unlimadd.c b/HDF5Examples/C/H5D/16/h5ex_d_unlimadd.c
index 1c271d3..6f855ea 100644
--- a/HDF5Examples/C/H5D/16/h5ex_d_unlimadd.c
+++ b/HDF5Examples/C/H5D/16/h5ex_d_unlimadd.c
@@ -29,15 +29,22 @@
int
main(void)
{
- hid_t file, space, dset, dcpl; /* Handles */
+ hid_t file = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
herr_t status;
- hsize_t dims[2] = {DIM0, DIM1}, extdims[2] = {EDIM0, EDIM1}, maxdims[2], chunk[2] = {CHUNK0, CHUNK1},
- start[2], count[2];
- int wdata[DIM0][DIM1], /* Write buffer */
- wdata2[EDIM0][EDIM1], /* Write buffer for
- extension */
- **rdata, /* Read buffer */
- ndims, i, j;
+ hsize_t dims[2] = {DIM0, DIM1};
+ hsize_t extdims[2] = {EDIM0, EDIM1};
+ hsize_t maxdims[2];
+ hsize_t chunk[2] = {CHUNK0, CHUNK1};
+ hsize_t start[2];
+ hsize_t count[2];
+ int wdata[DIM0][DIM1]; /* Write buffer */
+ int wdata2[EDIM0][EDIM1]; /* Write buffer for extension */
+ int **rdata = NULL; /* Read buffer */
+ int ndims;
+ hsize_t i, j;
/*
* Initialize data.
diff --git a/HDF5Examples/C/H5D/16/h5ex_d_unlimgzip.c b/HDF5Examples/C/H5D/16/h5ex_d_unlimgzip.c
index 3e90506..227b3aa 100644
--- a/HDF5Examples/C/H5D/16/h5ex_d_unlimgzip.c
+++ b/HDF5Examples/C/H5D/16/h5ex_d_unlimgzip.c
@@ -30,19 +30,26 @@
int
main(void)
{
- hid_t file, space, dset, dcpl; /* Handles */
+ hid_t file = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
herr_t status;
htri_t avail;
H5Z_filter_t filter_type;
- hsize_t dims[2] = {DIM0, DIM1}, extdims[2] = {EDIM0, EDIM1}, maxdims[2], chunk[2] = {CHUNK0, CHUNK1},
- start[2], count[2];
+ hsize_t dims[2] = {DIM0, DIM1};
+ hsize_t extdims[2] = {EDIM0, EDIM1};
+ hsize_t maxdims[2];
+ hsize_t chunk[2] = {CHUNK0, CHUNK1};
+ hsize_t start[2];
+ hsize_t count[2];
size_t nelmts;
unsigned int flags, filter_info;
- int wdata[DIM0][DIM1], /* Write buffer */
- wdata2[EDIM0][EDIM1], /* Write buffer for
- extension */
- **rdata, /* Read buffer */
- ndims, i, j;
+ int wdata[DIM0][DIM1]; /* Write buffer */
+ int wdata2[EDIM0][EDIM1]; /* Write buffer for extension */
+ int **rdata = NULL; /* Read buffer */
+ int ndims;
+ hsize_t i, j;
/*
* Check if gzip compression is available and can be used for both
diff --git a/HDF5Examples/C/H5D/16/h5ex_d_unlimmod.c b/HDF5Examples/C/H5D/16/h5ex_d_unlimmod.c
index 6601427..f06a1ff 100644
--- a/HDF5Examples/C/H5D/16/h5ex_d_unlimmod.c
+++ b/HDF5Examples/C/H5D/16/h5ex_d_unlimmod.c
@@ -29,14 +29,20 @@
int
main(void)
{
- hid_t file, space, dset, dcpl; /* Handles */
+ hid_t file = H5I_INVALID_HID;
+ hid_t space = H5I_INVALID_HID;
+ hid_t dset = H5I_INVALID_HID;
+ hid_t dcpl = H5I_INVALID_HID;
herr_t status;
- hsize_t dims[2] = {DIM0, DIM1}, extdims[2] = {EDIM0, EDIM1}, maxdims[2], chunk[2] = {CHUNK0, CHUNK1};
- int wdata[DIM0][DIM1], /* Write buffer */
- wdata2[EDIM0][EDIM1], /* Write buffer for
- extension */
- **rdata, /* Read buffer */
- ndims, i, j;
+ hsize_t dims[2] = {DIM0, DIM1};
+ hsize_t extdims[2] = {EDIM0, EDIM1};
+ hsize_t maxdims[2];
+ hsize_t chunk[2] = {CHUNK0, CHUNK1};
+ int wdata[DIM0][DIM1]; /* Write buffer */
+ int wdata2[EDIM0][EDIM1]; /* Write buffer for extension */
+ int **rdata = NULL; /* Read buffer */
+ int ndims;
+ hsize_t i, j;
/*
* Initialize data.
diff --git a/HDF5Examples/C/H5D/CMakeLists.txt b/HDF5Examples/C/H5D/CMakeLists.txt
index 02f9ac7..b530f4c 100644
--- a/HDF5Examples/C/H5D/CMakeLists.txt
+++ b/HDF5Examples/C/H5D/CMakeLists.txt
@@ -7,7 +7,7 @@ project (HDF5Examples_C_H5D C)
include (C_sourcefiles.cmake)
foreach (example_name ${common_examples})
- if (${H5_LIBVER_DIR} EQUAL 16)
+ if (${H5_LIBVER_DIR} EQUAL 16 OR ${EXAMPLE_VARNAME}_USE_16_API)
add_executable (${EXAMPLE_VARNAME}_${example_name} ${PROJECT_SOURCE_DIR}/16/${example_name}.c)
else ()
add_executable (${EXAMPLE_VARNAME}_${example_name} ${PROJECT_SOURCE_DIR}/${example_name}.c)
diff --git a/HDF5Examples/C/H5G/CMakeLists.txt b/HDF5Examples/C/H5G/CMakeLists.txt
index f517199..308349a 100644
--- a/HDF5Examples/C/H5G/CMakeLists.txt
+++ b/HDF5Examples/C/H5G/CMakeLists.txt
@@ -7,7 +7,7 @@ project (HDF5Examples_C_H5G C)
include (C_sourcefiles.cmake)
foreach (example_name ${common_examples})
- if (${H5_LIBVER_DIR} EQUAL 16)
+ if (${H5_LIBVER_DIR} EQUAL 16 OR ${EXAMPLE_VARNAME}_USE_16_API)
add_executable (${EXAMPLE_VARNAME}_${example_name} ${PROJECT_SOURCE_DIR}/16/${example_name}.c)
else ()
add_executable (${EXAMPLE_VARNAME}_${example_name} ${PROJECT_SOURCE_DIR}/${example_name}.c)
@@ -37,7 +37,7 @@ foreach (example_name ${common_examples})
endif ()
endforeach ()
-if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.8")
+if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.8" AND NOT ${EXAMPLE_VARNAME}_USE_16_API)
foreach (example_name ${1_8_examples})
add_executable (${EXAMPLE_VARNAME}_${example_name} ${PROJECT_SOURCE_DIR}/${example_name}.c)
target_compile_options(${EXAMPLE_VARNAME}_${example_name}
@@ -212,7 +212,7 @@ if (H5EX_BUILD_TESTING)
h5ex_g_iterate
h5ex_g_traverse
)
- if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.8")
+ if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.8" AND NOT ${EXAMPLE_VARNAME}_USE_16_API)
set (exfiles ${exfiles}
h5ex_g_visit
)
@@ -369,7 +369,7 @@ if (H5EX_BUILD_TESTING)
ADD_DUMP_TEST (h5ex_g_create)
ADD_H5_CMP_TEST (h5ex_g_iterate)
ADD_H5_CMP_TEST (h5ex_g_traverse)
- if (NOT ${H5_LIBVER_DIR} EQUAL 16)
+ if (HDF5_VERSION_MAJOR VERSION_GREATER_EQUAL "1.8" AND NOT ${EXAMPLE_VARNAME}_USE_16_API)
ADD_H5_DUMP2_TEST (h5ex_g_compact)
ADD_H5_CMP_TEST (h5ex_g_corder)
ADD_H5_CMP_TEST (h5ex_g_phase)
diff --git a/HDF5Examples/C/H5T/CMakeLists.txt b/HDF5Examples/C/H5T/CMakeLists.txt
index fb5a4e4..8c4084f 100644
--- a/HDF5Examples/C/H5T/CMakeLists.txt
+++ b/HDF5Examples/C/H5T/CMakeLists.txt
@@ -7,7 +7,7 @@ project (HDF5Examples_C_H5T C)
include (C_sourcefiles.cmake)
foreach (example_name ${common_examples})
- if (${H5_LIBVER_DIR} EQUAL 16)
+ if (${H5_LIBVER_DIR} EQUAL 16 OR ${EXAMPLE_VARNAME}_USE_16_API)
add_executable (${EXAMPLE_VARNAME}_${example_name} ${PROJECT_SOURCE_DIR}/16/${example_name}.c)
else ()
add_executable (${EXAMPLE_VARNAME}_${example_name} ${PROJECT_SOURCE_DIR}/${example_name}.c)
diff --git a/HDF5Examples/JAVA/H5J/Java_sourcefiles.cmake b/HDF5Examples/JAVA/H5J/Java_sourcefiles.cmake
index c643a16..e78e12e 100644
--- a/HDF5Examples/JAVA/H5J/Java_sourcefiles.cmake
+++ b/HDF5Examples/JAVA/H5J/Java_sourcefiles.cmake
@@ -10,7 +10,7 @@ set (HDF_JAVA_EXAMPLES
HDF5GroupDatasetCreate.java
HDF5SubsetSelect.java
)
-if (NOT ${EXAMPLE_VARNAME}_USE_110_API AND H5_LIBVER_DIR EQUAL 110)
+if (H5_LIBVER_DIR EQUAL 110)
set (HDF_JAVA_EXAMPLES ${HDF_JAVA_EXAMPLES}
110/HDF5FileStructure.java
)