summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2016-02-29 20:47:35 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2016-02-29 20:47:35 (GMT)
commit83b5bed5d437e8a09d1c94038b3ada966947c2b9 (patch)
tree8198f8ebb476422dbc4ff3125bcb9fe394cf6049 /java
parent6e9e1d67f5ad5712b5ccdf710dd237f6f2e85a5d (diff)
downloadhdf5-83b5bed5d437e8a09d1c94038b3ada966947c2b9.zip
hdf5-83b5bed5d437e8a09d1c94038b3ada966947c2b9.tar.gz
hdf5-83b5bed5d437e8a09d1c94038b3ada966947c2b9.tar.bz2
[svn-r29231] Check if szip is enabled before attempting to run example with szip.
Diffstat (limited to 'java')
-rw-r--r--java/examples/datasets/CMakeLists.txt19
1 files changed, 18 insertions, 1 deletions
diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt
index 2338325..077c6bb 100644
--- a/java/examples/datasets/CMakeLists.txt
+++ b/java/examples/datasets/CMakeLists.txt
@@ -83,6 +83,16 @@ MACRO (ADD_H5_TEST resultfile resultcode)
ENDMACRO (ADD_H5_TEST file)
if (BUILD_TESTING)
+
+# detect whether the encoder is present.
+ if (H5_HAVE_FILTER_DEFLATE)
+ set (USE_FILTER_DEFLATE "true")
+ endif (H5_HAVE_FILTER_DEFLATE)
+
+ if (H5_HAVE_FILTER_SZIP)
+ set (USE_FILTER_SZIP "true")
+ endif (H5_HAVE_FILTER_SZIP)
+
foreach (example ${HDF_JAVA_EXAMPLES})
if (${example} STREQUAL "H5Ex_D_External")
add_test (
@@ -116,6 +126,13 @@ if (BUILD_TESTING)
)
set_tests_properties (JAVA_datasets-${example}-copy-objects PROPERTIES DEPENDS JAVA_datasets-${example}-clearall-objects)
set (last_test "JAVA_datasets-${example}-copy-objects")
- ADD_H5_TEST (${example} 0)
+ if (${example} STREQUAL "H5Ex_D_Szip")
+ if (USE_FILTER_SZIP)
+ ADD_H5_TEST (${example} 0)
+ endif (USE_FILTER_SZIP)
+ else (${example} STREQUAL "H5Ex_D_Szip")
+ ADD_H5_TEST (${example} 0)
+ endif (${example} STREQUAL "H5Ex_D_Szip")
+
endforeach (example ${HDF_JAVA_EXAMPLES})
endif (BUILD_TESTING)