mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
[svn-r29231] Check if szip is enabled before attempting to run example with szip.
This commit is contained in:
parent
6e9e1d67f5
commit
83b5bed5d4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user