diff options
-rw-r--r-- | java/examples/datasets/CMakeLists.txt | 13 | ||||
-rw-r--r-- | java/examples/datatypes/CMakeLists.txt | 11 | ||||
-rw-r--r-- | java/examples/groups/CMakeLists.txt | 19 | ||||
-rw-r--r-- | java/examples/intro/CMakeLists.txt | 11 |
4 files changed, 33 insertions, 21 deletions
diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt index 077c6bb..5f5f37c 100644 --- a/java/examples/datasets/CMakeLists.txt +++ b/java/examples/datasets/CMakeLists.txt @@ -62,12 +62,15 @@ foreach (HDFJAVA_JAR ${CMAKE_JAVA_INCLUDE_PATH}) endforeach (HDFJAVA_JAR) MACRO (ADD_H5_TEST resultfile resultcode) + if (CMAKE_BUILD_TYPE MATCHES Debug) + set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;") + endif(CMAKE_BUILD_TYPE MATCHES Debug) add_test ( NAME JAVA_datasets-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_TESTER=${CMAKE_Java_RUNTIME};${CMAKE_Java_RUNTIME_FLAGS}" -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${resultfile}_JAR_FILE}" - -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_ARGS:STRING=${CMD_ARGS}${ARGN}" -D "TEST_PROGRAM=examples.datasets.${resultfile}" -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" -D "TEST_FOLDER=${HDFJAVA_EXAMPLES_BINARY_DIR}" @@ -96,7 +99,7 @@ if (BUILD_TESTING) foreach (example ${HDF_JAVA_EXAMPLES}) if (${example} STREQUAL "H5Ex_D_External") add_test ( - NAME JAVA_datasets-${example}-clearall-objects + NAME JAVA_datasets-${example}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 @@ -106,7 +109,7 @@ if (BUILD_TESTING) ) else (${example} STREQUAL "H5Ex_D_External") add_test ( - NAME JAVA_datasets-${example}-clearall-objects + NAME JAVA_datasets-${example}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 @@ -115,7 +118,7 @@ if (BUILD_TESTING) ) endif (${example} STREQUAL "H5Ex_D_External") if (NOT "${last_test}" STREQUAL "") - set_tests_properties (JAVA_datasets-${example}-clearall-objects PROPERTIES DEPENDS ${last_test}) + set_tests_properties (JAVA_datasets-${example}-clear-objects PROPERTIES DEPENDS ${last_test}) endif (NOT "${last_test}" STREQUAL "") add_test ( NAME JAVA_datasets-${example}-copy-objects @@ -124,7 +127,7 @@ if (BUILD_TESTING) ${HDFJAVA_EXAMPLES_SOURCE_DIR}/testfiles/examples.datasets.${example}.txt ${HDFJAVA_EXAMPLES_DATASETS_BINARY_DIR}/${example}.txt ) - set_tests_properties (JAVA_datasets-${example}-copy-objects PROPERTIES DEPENDS JAVA_datasets-${example}-clearall-objects) + set_tests_properties (JAVA_datasets-${example}-copy-objects PROPERTIES DEPENDS JAVA_datasets-${example}-clear-objects) set (last_test "JAVA_datasets-${example}-copy-objects") if (${example} STREQUAL "H5Ex_D_Szip") if (USE_FILTER_SZIP) diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt index 6525506..1e305be 100644 --- a/java/examples/datatypes/CMakeLists.txt +++ b/java/examples/datatypes/CMakeLists.txt @@ -62,12 +62,15 @@ foreach (HDFJAVA_JAR ${CMAKE_JAVA_INCLUDE_PATH}) endforeach (HDFJAVA_JAR) MACRO (ADD_H5_TEST resultfile resultcode) + if (CMAKE_BUILD_TYPE MATCHES Debug) + set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;") + endif(CMAKE_BUILD_TYPE MATCHES Debug) add_test ( NAME JAVA_datatypes-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_TESTER=${CMAKE_Java_RUNTIME};${CMAKE_Java_RUNTIME_FLAGS}" -D "TEST_PROGRAM=examples.datatypes.${resultfile}" - -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_ARGS:STRING=${CMD_ARGS}${ARGN}" -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${resultfile}_JAR_FILE}" -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" -D "TEST_FOLDER=${HDFJAVA_EXAMPLES_BINARY_DIR}" @@ -85,7 +88,7 @@ ENDMACRO (ADD_H5_TEST file) if (BUILD_TESTING) foreach (example ${HDF_JAVA_EXAMPLES}) add_test ( - NAME JAVA_datatypes-${example}-clearall-objects + NAME JAVA_datatypes-${example}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 @@ -93,7 +96,7 @@ if (BUILD_TESTING) ${example}.out.err ) if (NOT "${last_test}" STREQUAL "") - set_tests_properties (JAVA_datatypes-${example}-clearall-objects PROPERTIES DEPENDS ${last_test}) + set_tests_properties (JAVA_datatypes-${example}-clear-objects PROPERTIES DEPENDS ${last_test}) endif (NOT "${last_test}" STREQUAL "") add_test ( NAME JAVA_datatypes-${example}-copy-objects @@ -102,7 +105,7 @@ if (BUILD_TESTING) ${HDFJAVA_EXAMPLES_SOURCE_DIR}/testfiles/examples.datatypes.${example}.txt ${HDFJAVA_EXAMPLES_DATATYPES_BINARY_DIR}/${example}.txt ) - set_tests_properties (JAVA_datatypes-${example}-copy-objects PROPERTIES DEPENDS JAVA_datatypes-${example}-clearall-objects) + set_tests_properties (JAVA_datatypes-${example}-copy-objects PROPERTIES DEPENDS JAVA_datatypes-${example}-clear-objects) set (last_test "JAVA_datatypes-${example}-copy-objects") ADD_H5_TEST (${example} 0) endforeach (example ${HDF_JAVA_EXAMPLES}) diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt index 0849f0c..1d61614 100644 --- a/java/examples/groups/CMakeLists.txt +++ b/java/examples/groups/CMakeLists.txt @@ -67,12 +67,15 @@ foreach (h5_file ${HDF_JAVA_TEST_FILES}) endforeach (h5_file ${HDF_JAVA_TEST_FILES}) MACRO (ADD_H5_TEST resultfile resultcode) + if (CMAKE_BUILD_TYPE MATCHES Debug) + set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;") + endif(CMAKE_BUILD_TYPE MATCHES Debug) add_test ( NAME JAVA_groups-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_TESTER=${CMAKE_Java_RUNTIME};${CMAKE_Java_RUNTIME_FLAGS}" -D "TEST_PROGRAM=examples.groups.${resultfile}" - -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_ARGS:STRING=${CMD_ARGS}${ARGN}" -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${resultfile}_JAR_FILE}" -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" -D "TEST_FOLDER=${HDFJAVA_EXAMPLES_BINARY_DIR}" @@ -90,20 +93,20 @@ ENDMACRO (ADD_H5_TEST file) if (BUILD_TESTING) foreach (example ${HDF_JAVA_EXAMPLES}) add_test ( - NAME JAVA_groups-${example}-clearall-objects + NAME JAVA_groups-${example}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove ${example}.out ${example}.out.err ) if (NOT "${last_test}" STREQUAL "") - set_tests_properties (JAVA_groups-${example}-clearall-objects PROPERTIES DEPENDS ${last_test}) + set_tests_properties (JAVA_groups-${example}-clear-objects PROPERTIES DEPENDS ${last_test}) endif (NOT "${last_test}" STREQUAL "") - set (last_test "JAVA_groups-${example}-clearall-objects") + set (last_test "JAVA_groups-${example}-clear-objects") if (NOT ${example} STREQUAL "H5Ex_G_Iterate" AND NOT ${example} STREQUAL "H5Ex_G_Visit") if (${example} STREQUAL "H5Ex_G_Compact") add_test ( - NAME JAVA_groups-${example}-clearall-h5s + NAME JAVA_groups-${example}-clear-h5s COMMAND ${CMAKE_COMMAND} -E remove ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}1.h5 @@ -111,16 +114,16 @@ if (BUILD_TESTING) ) else (${example} STREQUAL "H5Ex_G_Compact") add_test ( - NAME JAVA_groups-${example}-clearall-h5s + NAME JAVA_groups-${example}-clear-h5s COMMAND ${CMAKE_COMMAND} -E remove ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 ) endif (${example} STREQUAL "H5Ex_G_Compact") if (NOT "${last_test}" STREQUAL "") - set_tests_properties (JAVA_groups-${example}-clearall-h5s PROPERTIES DEPENDS ${last_test}) + set_tests_properties (JAVA_groups-${example}-clear-h5s PROPERTIES DEPENDS ${last_test}) endif (NOT "${last_test}" STREQUAL "") - set (last_test "JAVA_groups-${example}-clearall-h5s") + set (last_test "JAVA_groups-${example}-clear-h5s") endif (NOT ${example} STREQUAL "H5Ex_G_Iterate" AND NOT ${example} STREQUAL "H5Ex_G_Visit") add_test ( NAME JAVA_groups-${example}-copy-objects diff --git a/java/examples/intro/CMakeLists.txt b/java/examples/intro/CMakeLists.txt index ae3f585..8679943 100644 --- a/java/examples/intro/CMakeLists.txt +++ b/java/examples/intro/CMakeLists.txt @@ -63,12 +63,15 @@ foreach (example ${HDF_JAVA_OBJECT_EXAMPLES}) endforeach (example ${HDF_JAVA_OBJECT_EXAMPLES}) MACRO (ADD_H5_TEST resultfile resultcode) + if (CMAKE_BUILD_TYPE MATCHES Debug) + set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=hdf5_java_debug;") + endif(CMAKE_BUILD_TYPE MATCHES Debug) add_test ( NAME JAVA_intro-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_TESTER=${CMAKE_Java_RUNTIME};${CMAKE_Java_RUNTIME_FLAGS}" -D "TEST_PROGRAM=examples.intro.${resultfile}" - -D "TEST_ARGS:STRING=${ARGN}" + -D "TEST_ARGS:STRING=${CMD_ARGS}${ARGN}" -D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${resultfile}_JAR_FILE}" -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" -D "TEST_FOLDER=${HDFJAVA_EXAMPLES_BINARY_DIR}" @@ -87,7 +90,7 @@ if (BUILD_TESTING) foreach (example ${HDF_JAVA_EXAMPLES}) add_test ( - NAME JAVA_intro-${example}-clearall-objects + NAME JAVA_intro-${example}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove ${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 @@ -95,7 +98,7 @@ if (BUILD_TESTING) ${example}.out.err ) if (NOT "${last_test}" STREQUAL "") - set_tests_properties (JAVA_intro-${example}-clearall-objects PROPERTIES DEPENDS ${last_test}) + set_tests_properties (JAVA_intro-${example}-clear-objects PROPERTIES DEPENDS ${last_test}) endif (NOT "${last_test}" STREQUAL "") add_test ( NAME JAVA_intro-${example}-copy-objects @@ -104,7 +107,7 @@ if (BUILD_TESTING) ${HDFJAVA_EXAMPLES_SOURCE_DIR}/testfiles/examples.intro.${example}.txt ${HDFJAVA_EXAMPLES_INTRO_BINARY_DIR}/${example}.txt ) - set_tests_properties (JAVA_intro-${example}-copy-objects PROPERTIES DEPENDS JAVA_intro-${example}-clearall-objects) + set_tests_properties (JAVA_intro-${example}-copy-objects PROPERTIES DEPENDS JAVA_intro-${example}-clear-objects) set (last_test "JAVA_intro-${example}-copy-objects") ADD_H5_TEST (${example} 0) endforeach (example ${HDF_JAVA_EXAMPLES}) |