From b38491a7c2580661ea7117b093799d49c93e34c7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 19 Apr 2016 14:45:07 -0500 Subject: [svn-r29748] HDFFV-9770: Fix h5watch and CMake for HL. Convert CMake sources tags from _SRCS to _SOURCES(closer match to Makefile). --- CMakeInstallation.cmake | 1 + MANIFEST | 2 + c++/src/CMakeLists.txt | 6 +- c++/test/CMakeLists.txt | 4 +- fortran/src/CMakeLists.txt | 22 +- fortran/test/CMakeLists.txt | 8 +- hl/c++/src/CMakeLists.txt | 6 +- hl/fortran/src/CMakeLists.txt | 22 +- hl/src/CMakeLists.txt | 6 +- hl/test/CMakeLists.txt | 27 +- hl/test/CMakeTests.cmake | 24 +- hl/tools/gif2h5/CMakeLists.txt | 8 +- hl/tools/h5watch/CMakeLists.txt | 12 +- hl/tools/h5watch/extend_dset.c | 399 ++++++++++++++------------- hl/tools/h5watch/h5watch.c | 7 - hl/tools/h5watch/h5watchgentest.c | 141 +++++----- java/src/hdf/hdf5lib/CMakeLists.txt | 12 +- java/test/CMakeLists.txt | 4 +- java/test/junit.sh.in | 17 +- src/CMakeLists.txt | 246 ++++++++--------- test/CMakeLists.txt | 298 ++++++++------------ test/CMakeTests.cmake | 537 ++++++++++++++++++++---------------- test/atomic_reader.c | 332 +++++++++++----------- test/atomic_writer.c | 233 ++++++++-------- testpar/CMakeLists.txt | 4 +- tools/h5repack/CMakeLists.txt | 6 +- tools/lib/CMakeLists.txt | 6 +- tools/perform/CMakeLists.txt | 36 +-- 28 files changed, 1238 insertions(+), 1188 deletions(-) diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index bb5f046..8dcaf85 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -530,6 +530,7 @@ The HDF5 data model, file format, API, library, and tools are open and distribut ) cpack_add_component (configinstall DISPLAY_NAME "HDF5 CMake files" + HIDDEN DEPENDS libraries GROUP Development INSTALL_TYPES Full Developer User diff --git a/MANIFEST b/MANIFEST index 6641a76..a3b879e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3042,6 +3042,8 @@ ./tools/h5dump/CMakeTestsPBITS.cmake ./tools/h5dump/CMakeTestsXML.cmake ./tools/h5dump/CMakeTestsVDS.cmake +./tools/h5format_convert/CMakeLists.txt +./tools/h5format_convert/CMakeTests.cmake ./tools/h5import/CMakeLists.txt ./tools/h5import/CMakeTests.cmake ./tools/h5jam/CMakeLists.txt diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 1a182e3..526b223 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -11,7 +11,7 @@ configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in #----------------------------------------------------------------------------- # Define cpp Library #----------------------------------------------------------------------------- -set (CPP_SRCS +set (CPP_SOURCES ${HDF5_CPP_SRC_SOURCE_DIR}/H5AbstractDs.cpp ${HDF5_CPP_SRC_SOURCE_DIR}/H5ArrayType.cpp ${HDF5_CPP_SRC_SOURCE_DIR}/H5AtomType.cpp @@ -78,7 +78,7 @@ set (CPP_HDRS ${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.h ) -add_library (${HDF5_CPP_LIB_TARGET} STATIC ${CPP_SRCS} ${CPP_HDRS}) +add_library (${HDF5_CPP_LIB_TARGET} STATIC ${CPP_SOURCES} ${CPP_HDRS}) TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}") @@ -90,7 +90,7 @@ set_target_properties (${HDF5_CPP_LIB_TARGET} PROPERTIES set (install_targets ${HDF5_CPP_LIB_TARGET}) if (BUILD_SHARED_LIBS) - add_library (${HDF5_CPP_LIBSH_TARGET} SHARED ${CPP_SRCS} ${CPP_HDRS}) + add_library (${HDF5_CPP_LIBSH_TARGET} SHARED ${CPP_SOURCES} ${CPP_HDRS}) TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_CPP_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIBSH_TARGET}") diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index 4bebeac..dffe7a4 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -11,7 +11,7 @@ PROJECT (HDF5_CPP_TEST) #----------------------------------------------------------------------------- # Define Sources #----------------------------------------------------------------------------- -set (CPP_TEST_SRCS +set (CPP_TEST_SOURCES ${HDF5_CPP_TEST_SOURCE_DIR}/testhdf5.cpp ${HDF5_CPP_TEST_SOURCE_DIR}/tarray.cpp ${HDF5_CPP_TEST_SOURCE_DIR}/tattr.cpp @@ -35,7 +35,7 @@ set (CPP_TEST_SRCS set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}) configure_file (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY) -add_executable (cpp_testhdf5 ${CPP_TEST_SRCS} ) +add_executable (cpp_testhdf5 ${CPP_TEST_SOURCES} ) TARGET_NAMING (cpp_testhdf5 STATIC) TARGET_C_PROPERTIES (cpp_testhdf5 STATIC " " " ") target_link_libraries (cpp_testhdf5 diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 8ebbbd0..51e4887 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -96,7 +96,7 @@ add_custom_command ( #----------------------------------------------------------------------------- # f90CStub lib #----------------------------------------------------------------------------- -set (f90CStub_C_SRCS +set (f90CStub_C_SOURCES # normal distribution ${HDF5_F90_SRC_SOURCE_DIR}/H5f90kit.c ${HDF5_F90_SRC_SOURCE_DIR}/H5_f.c @@ -115,14 +115,14 @@ set (f90CStub_C_SRCS ${HDF5_F90_SRC_SOURCE_DIR}/H5Zf.c ) -set_source_files_properties (${f90CStub_C_SRCS} PROPERTIES LANGUAGE C) +set_source_files_properties (${f90CStub_C_SOURCES} PROPERTIES LANGUAGE C) set (f90CStub_C_HDRS # generated files ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h ) -add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SRCS} ${f90CStub_C_HDRS}) +add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS}) TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}") @@ -135,7 +135,7 @@ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES set (install_targets ${HDF5_F90_C_LIB_TARGET}) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) - add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SRCS} ${f90CStub_C_HDRS}) + add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS}) TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_SHARED_LIBS}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIBSH_TARGET}") @@ -155,7 +155,7 @@ set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5_gen.F90 PROPERTIES GENERA #----------------------------------------------------------------------------- # Fortran Modules #----------------------------------------------------------------------------- -set (f90_F_BASE_SRCS +set (f90_F_BASE_SOURCES # generated files ${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 @@ -178,8 +178,8 @@ set (f90_F_BASE_SRCS ${HDF5_F90_SRC_SOURCE_DIR}/H5Zff.F90 ) -set (f90_F_SRCS - ${f90_F_BASE_SRCS} +set (f90_F_SOURCES + ${f90_F_BASE_SOURCES} # generated file ${HDF5_F90_BINARY_DIR}/H5_gen.F90 @@ -193,15 +193,15 @@ add_custom_target (H5gen ALL COMMAND ${CMD} #v3.2 BYPRODUCT ${HDF5_F90_BINARY_DIR}/H5_gen.F90 WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} - DEPENDS ${f90_F_BASE_SRCS} + DEPENDS ${f90_F_BASE_SOURCES} ) -set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran) +set_source_files_properties (${f90_F_SOURCES} PROPERTIES LANGUAGE Fortran) #----------------------------------------------------------------------------- # Add Main fortran library #----------------------------------------------------------------------------- -add_library (${HDF5_F90_LIB_TARGET} STATIC ${f90_F_SRCS}) +add_library (${HDF5_F90_LIB_TARGET} STATIC ${f90_F_SOURCES}) set (SHARED_LINK_FLAGS " ") TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET}) @@ -224,7 +224,7 @@ endif (WIN32) set (install_targets ${install_targets} ${HDF5_F90_LIB_TARGET}) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) - add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${f90_F_SRCS}) + add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${f90_F_SOURCES}) set (SHARED_LINK_FLAGS " ") if (WIN32 AND MSVC) set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def") diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 005a5c8..d1ca6e8 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -75,7 +75,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) ) endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) -set (HDF5_F90_TF_SRCS +set (HDF5_F90_TF_SOURCES # generated files ${HDF5_F90_BINARY_DIR}/tf_gen.F90 ) @@ -83,7 +83,7 @@ set_source_files_properties ( ${HDF5_F90_BINARY_DIR}/tf_gen.F90 PROPERTIES GENERATED TRUE ) -set_source_files_properties (tf.F90 ${HDF5_F90_BINARY_DIR}/${HDF5_F90_TF_SRCS} PROPERTIES LANGUAGE Fortran) +set_source_files_properties (tf.F90 ${HDF5_F90_BINARY_DIR}/${HDF5_F90_TF_SOURCES} PROPERTIES LANGUAGE Fortran) set (CMD $) add_custom_target (H5testgen ALL @@ -93,9 +93,9 @@ add_custom_target (H5testgen ALL DEPENDS H5_test_buildiface ) -add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf.F90 ${HDF5_F90_TF_SRCS}) +add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf.F90 ${HDF5_F90_TF_SOURCES}) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) - add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf.F90 ${HDF5_F90_TF_SRCS}) + add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf.F90 ${HDF5_F90_TF_SOURCES}) endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} STATIC " " " ") diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index 425a2fe..cec9406 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -7,10 +7,10 @@ PROJECT (HDF5_HL_CPP_SRC) INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src) INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_SOURCE_DIR}) -set (HDF5_HL_CPP_SRCS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.cpp) +set (HDF5_HL_CPP_SOURCES ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.cpp) set (HDF5_HL_CPP_HDRS ${HDF5_HL_CPP_SRC_SOURCE_DIR}/H5PacketTable.h) -add_library (${HDF5_HL_CPP_LIB_TARGET} STATIC ${HDF5_HL_CPP_SRCS}) +add_library (${HDF5_HL_CPP_LIB_TARGET} STATIC ${HDF5_HL_CPP_SOURCES}) TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC " " " ") target_link_libraries ( ${HDF5_HL_CPP_LIB_TARGET} @@ -26,7 +26,7 @@ set_target_properties (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES set (install_targets ${HDF5_HL_CPP_LIB_TARGET}) if (BUILD_SHARED_LIBS) - add_library (${HDF5_HL_CPP_LIBSH_TARGET} SHARED ${HDF5_HL_CPP_SRCS}) + add_library (${HDF5_HL_CPP_LIBSH_TARGET} SHARED ${HDF5_HL_CPP_SOURCES}) TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED " " " ") target_link_libraries ( ${HDF5_HL_CPP_LIBSH_TARGET} diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index a566314..6419ab8 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -63,18 +63,18 @@ INCLUDE_DIRECTORIES ( #----------------------------------------------------------------------------- # hl_f90CStub lib #----------------------------------------------------------------------------- -set (HDF5_HL_F90_C_SRCS +set (HDF5_HL_F90_C_SOURCES ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5DSfc.c ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTfc.c ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMfc.c ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMcc.c ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBfc.c ) -set_source_files_properties (${HDF5_HL_F90_C_SRCS} PROPERTIES LANGUAGE C) +set_source_files_properties (${HDF5_HL_F90_C_SOURCES} PROPERTIES LANGUAGE C) set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h) -add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS}) +add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS}) TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}") @@ -87,7 +87,7 @@ set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES set (install_targets ${HDF5_HL_F90_C_LIB_TARGET}) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) - add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS}) + add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS}) TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIBSH_TARGET}") @@ -105,21 +105,21 @@ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) #----------------------------------------------------------------------------- # Fortran Modules #----------------------------------------------------------------------------- -set (HDF5_HL_F90_F_BASE_SRCS +set (HDF5_HL_F90_F_BASE_SOURCES ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5DSff.F90 ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5TBff.F90 ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTff.F90 ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.F90 ) -set (HDF5_HL_F90_F_SRCS - ${HDF5_HL_F90_F_BASE_SRCS} +set (HDF5_HL_F90_F_SOURCES + ${HDF5_HL_F90_F_BASE_SOURCES} # generated files ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 ) -set_source_files_properties (${HDF5_HL_F90_F_SRCS} PROPERTIES LANGUAGE Fortran) +set_source_files_properties (${HDF5_HL_F90_F_SOURCES} PROPERTIES LANGUAGE Fortran) set_source_files_properties ( ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 @@ -133,10 +133,10 @@ add_custom_target (H5HLgen ALL #v3.2 BYPRODUCT ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 #v3.2 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90 WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR} - DEPENDS ${HDF5_HL_F90_F_BASE_SRCS} + DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES} ) -add_library (${HDF5_HL_F90_LIB_TARGET} STATIC ${HDF5_HL_F90_F_SRCS}) +add_library (${HDF5_HL_F90_LIB_TARGET} STATIC ${HDF5_HL_F90_F_SOURCES}) TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}") @@ -155,7 +155,7 @@ endif (WIN32) set (install_targets ${install_targets} ${HDF5_HL_F90_LIB_TARGET}) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) - add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${HDF5_HL_F90_F_SRCS}) + add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${HDF5_HL_F90_F_SOURCES}) set (SHARED_LINK_FLAGS " ") if (WIN32 AND MSVC) set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def") diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 872e42d..a55a16b 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -4,7 +4,7 @@ PROJECT (HDF5_HL_SRC) #----------------------------------------------------------------------------- # List Source files #----------------------------------------------------------------------------- -set (HL_SRCS +set (HL_SOURCES ${HDF5_HL_SRC_SOURCE_DIR}/H5DO.c ${HDF5_HL_SRC_SOURCE_DIR}/H5DS.c ${HDF5_HL_SRC_SOURCE_DIR}/H5IM.c @@ -29,7 +29,7 @@ set (HL_HEADERS ${HDF5_HL_SRC_SOURCE_DIR}/hdf5_hl.h ) -add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SRCS} ${HL_HEADERS}) +add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS}) TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC) @@ -41,7 +41,7 @@ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF set (install_targets ${HDF5_HL_LIB_TARGET}) if (BUILD_SHARED_LIBS) - add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SRCS} ${HL_HEADERS}) + add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS}) TARGET_C_PROPERTIES (${HDF5_HL_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_HL_LIBSH_TARGET} ${HDF5_HL_LIB_NAME} SHARED ${HDF5_HL_PACKAGE_SOVERSION}) diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt index bf598c4..42a175f 100644 --- a/hl/test/CMakeLists.txt +++ b/hl/test/CMakeLists.txt @@ -26,8 +26,8 @@ MACRO (HL_ADD_EXE hl_name) TARGET_C_PROPERTIES (hl_${hl_name} STATIC " " " ") target_link_libraries (hl_${hl_name} ${HDF5_HL_LIB_TARGET} - ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} + ${HDF5_LIB_TARGET} ) set_target_properties (hl_${hl_name} PROPERTIES FOLDER test/hl) ENDMACRO (HL_ADD_EXE) @@ -38,17 +38,20 @@ MACRO (HL_ADD_SHEXE hl_name) TARGET_C_PROPERTIES (hl_${hl_name} SHARED " " " ") target_link_libraries (hl_${hl_name} ${HDF5_HL_LIBSH_TARGET} - ${HDF5_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET} + ${HDF5_LIBSH_TARGET} ) set_target_properties (hl_${hl_name} PROPERTIES FOLDER test/hl) ENDMACRO (HL_ADD_SHEXE) -HL_ADD_EXE (test_ds) -HL_ADD_EXE (test_dset_opt) -HL_ADD_EXE (test_image) HL_ADD_EXE (test_lite) +HL_ADD_EXE (test_image) +HL_ADD_EXE (test_file_image) HL_ADD_EXE (test_table) +HL_ADD_EXE (test_ds) +HL_ADD_EXE (test_dset_opt) +HL_ADD_EXE (test_ld) +HL_ADD_EXE (test_dset_append) # test_packet has two source files add_executable (hl_test_packet test_packet.c test_packet_vlen.c) @@ -56,8 +59,8 @@ TARGET_NAMING (hl_test_packet STATIC) TARGET_C_PROPERTIES (hl_test_packet STATIC " " " ") target_link_libraries (hl_test_packet ${HDF5_HL_LIB_TARGET} - ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} + ${HDF5_LIB_TARGET} ) set_target_properties (hl_test_packet PROPERTIES FOLDER test/hl) @@ -71,10 +74,20 @@ if (HDF5_BUILD_GENERATORS) TARGET_C_PROPERTIES (hl_gen_test_ds STATIC " " " ") target_link_libraries (hl_gen_test_ds ${HDF5_HL_LIB_TARGET} - ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} + ${HDF5_LIB_TARGET} ) set_target_properties (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen) + + add_executable (hl_gen_test_ld gen_test_ld.c) + TARGET_NAMING (hl_gen_test_ld STATIC) + TARGET_C_PROPERTIES (hl_gen_test_ld STATIC " " " ") + target_link_libraries (hl_gen_test_ld + ${HDF5_HL_LIB_TARGET} + ${HDF5_TEST_LIB_TARGET} + ${HDF5_LIB_TARGET} + ) + set_target_properties (hl_gen_test_ld PROPERTIES FOLDER test/hl/gen) endif (HDF5_BUILD_GENERATORS) include (CMakeTests.cmake) diff --git a/hl/test/CMakeTests.cmake b/hl/test/CMakeTests.cmake index 7d632cc..95eca4b 100644 --- a/hl/test/CMakeTests.cmake +++ b/hl/test/CMakeTests.cmake @@ -11,7 +11,10 @@ MACRO (HL_ADD_TEST hl_name files) add_test (NAME HL_${hl_name} COMMAND $) if (NOT "${last_test}" STREQUAL "") - set_tests_properties (HL_${hl_name} PROPERTIES DEPENDS ${last_test}) + set_tests_properties (HL_${hl_name} PROPERTIES DEPENDS ${last_test} + ENVIRONMENT "srcdir=${HDF5_HL_TEST_BINARY_DIR}" + WORKING_DIRECTORY ${HDF5_HL_TEST_BINARY_DIR} + ) endif (NOT "${last_test}" STREQUAL "") # -------------------------------------------------------------------- @@ -34,9 +37,12 @@ ENDMACRO (HL_ADD_TEST) add_test ( NAME HL_test-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove combine_tables1.h5 combine_tables2.h5 + file_img1.h5 + file_img2.h5 + test_append.h5 test_detach.h5 test_ds1.h5 test_ds2.h5 @@ -58,6 +64,8 @@ add_test ( test_lite4.h5 test_packet_compress.h5 test_packet_table.h5 + test_packet_table_vlen.h5 + testfl_packet_table_vlen.h5 test_table.h5 ) if (NOT "${last_test}" STREQUAL "") @@ -65,9 +73,13 @@ if (NOT "${last_test}" STREQUAL "") endif (NOT "${last_test}" STREQUAL "") set (last_test "HL_test-clear-objects") -HL_add_test (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5") -HL_add_test (test_dset_opt "") -HL_add_test (test_image "image8.txt;sepia.pal;earth.pal;image24pixel.txt;image24plane.txt;usa.wri") HL_add_test (test_lite "dtype_file.txt") -HL_add_test (test_packet "") +HL_add_test (test_image "image8.txt;sepia.pal;earth.pal;image24pixel.txt;image24plane.txt;usa.wri") +HL_add_test (test_file_image "") HL_add_test (test_table "test_table_be.h5;test_table_cray.h5;test_table_le.h5") +HL_add_test (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5") +HL_add_test (test_packet "") +HL_add_test (test_dset_opt "") +HL_add_test (test_ld "test_ld.h5") +HL_add_test (test_dset_append "") + diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt index d7c4319..3a55501 100644 --- a/hl/tools/gif2h5/CMakeLists.txt +++ b/hl/tools/gif2h5/CMakeLists.txt @@ -4,7 +4,7 @@ PROJECT (HDF5_HL_TOOLS_GIF2H5) #----------------------------------------------------------------------------- # Define Sources #----------------------------------------------------------------------------- -set (GIF2H5_SRCS +set (GIF2H5_SOURCES ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/gif.h ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/decompress.c ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/gif2hdf.c @@ -17,18 +17,18 @@ set (GIF2H5_SRCS INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}) -add_executable (gif2h5 ${GIF2H5_SRCS}) +add_executable (gif2h5 ${GIF2H5_SOURCES}) TARGET_NAMING (gif2h5 STATIC) TARGET_C_PROPERTIES (gif2h5 STATIC " " " ") target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl) #-- Add h52gif program -set (hdf2gif_SRCS +set (hdf2gif_SOURCES ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdf2gif.c ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdfgifwr.c ) -add_executable (h52gif ${hdf2gif_SRCS}) +add_executable (h52gif ${hdf2gif_SOURCES}) TARGET_NAMING (h52gif STATIC) TARGET_C_PROPERTIES (h52gif STATIC " " " ") target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt index a016d53..e3a7e9d 100644 --- a/hl/tools/h5watch/CMakeLists.txt +++ b/hl/tools/h5watch/CMakeLists.txt @@ -4,7 +4,7 @@ PROJECT (HDF5_HL_TOOLS_H5WATCH) #----------------------------------------------------------------------------- # Define Sources #----------------------------------------------------------------------------- -set (H5WATCH_SRCS +set (H5WATCH_SOURCES ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watch ) @@ -13,7 +13,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib) INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_DIR}/src) INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}) -add_executable (h5watch ${H5WATCH_SRCS}) +add_executable (h5watch ${H5WATCH_SOURCES}) TARGET_NAMING (h5watch STATIC) TARGET_C_PROPERTIES (h5watch STATIC " " " ") target_link_libraries (h5watch ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) @@ -21,20 +21,20 @@ set_target_properties (h5watch PROPERTIES FOLDER tools/hl) if (BUILD_TESTING) #-- Add swmr_check_compat_vfd program - set (hl_swmr_check_compat_vfd_SRCS + set (hl_swmr_check_compat_vfd_SOURCES ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/swmr_check_compat_vfd.c ) - add_executable (hl_swmr_check_compat_vfd ${hl_swmr_check_compat_vfd_SRCS}) + add_executable (hl_swmr_check_compat_vfd ${hl_swmr_check_compat_vfd_SOURCES}) TARGET_NAMING (hl_swmr_check_compat_vfd STATIC) TARGET_C_PROPERTIES (hl_swmr_check_compat_vfd STATIC " " " ") target_link_libraries (hl_swmr_check_compat_vfd ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (hl_swmr_check_compat_vfd PROPERTIES FOLDER tools/hl) #-- Add extend_dset program - set (extend_dset_SRCS + set (extend_dset_SOURCES ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/extend_dset.c ) - add_executable (extend_dset ${extend_dset_SRCS}) + add_executable (extend_dset ${extend_dset_SOURCES}) TARGET_NAMING (extend_dset STATIC) TARGET_C_PROPERTIES (extend_dset STATIC " " " ") target_link_libraries (extend_dset ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) diff --git a/hl/tools/h5watch/extend_dset.c b/hl/tools/h5watch/extend_dset.c index 7efdd3b..603893e 100644 --- a/hl/tools/h5watch/extend_dset.c +++ b/hl/tools/h5watch/extend_dset.c @@ -15,12 +15,25 @@ #include "H5HLprivate2.h" -#include -#include -#include -#include -#include -#include +#ifdef H5_STDC_HEADERS +# include +# include +# include +# include +#endif + +#ifdef H5_HAVE_UNISTD_H +# include +#endif + +#if defined(H5_TIME_WITH_SYS_TIME) +# include +# include +#elif defined(H5_HAVE_SYS_TIME_H) +# include +#else +# include +#endif /* * Extending datasets in WATCH.h5 generated by h5watchgentest.c @@ -43,24 +56,24 @@ /* Size of data buffer */ #define TEST_BUF_SIZE 100 -/* +/* * Test variations (incremental) for one-dimensional dataset: - * Varies from 10->13->12->12->1->3 + * Varies from 10->13->12->12->1->3 */ -#define ONE_NTESTS 5 +#define ONE_NTESTS 5 int one_tests[ONE_NTESTS] = {3, -1, 0, -11, 2}; -/* +/* * Test variations (incremental) for two-dimensional dataset: - * Varies from {4,10}->{6,12}->{8,1}->{10,1}-> - * {3,3}->{2,2}->{1,2}-> - * {1,4}->{1,3}->{1,3} + * Varies from {4,10}->{6,12}->{8,1}->{10,1}-> + * {3,3}->{2,2}->{1,2}-> + * {1,4}->{1,3}->{1,3} */ #define TWO_NTESTS 9 int two_tests[TWO_NTESTS][2] = { {2, 2}, {2, -11}, {2, 0}, {-7, 2}, {-1, -1}, {-1, 0}, - {0, 2}, {0, -1}, {0, 0} - }; + {0, 2}, {0, -1}, {0, 0} + }; static int extend_dset_two(const char *file, char *dname); static int extend_dset_one(const char *file, char *dname); @@ -145,7 +158,7 @@ done: *********************************************************************** * * Extending a two-dimensional dataset: - * dims[0] dims[1] + * dims[0] dims[1] * ------- ------- * case #1: increase increase * case #2: increase decrease @@ -157,30 +170,30 @@ done: * case #8: same decrease (no action) * case #9: same same (no action) * - * two_tests[TWO_NTESTS][2] = { {2,2}, {2,-11}, {2,0}, + * two_tests[TWO_NTESTS][2] = { {2,2}, {2,-11}, {2,0}, * {-7,2}, {-1,-1}, {-1,0}, * {0,2}, {0,-1}, {0,0} } - * varies from {4,10}->{6,12}->{8,1}->{10,1}-> - * {3,3}->{2,2}->{1,2}-> - * {1,4}->{1,3}->{1,3} + * varies from {4,10}->{6,12}->{8,1}->{10,1}-> + * {3,3}->{2,2}->{1,2}-> + * {1,4}->{1,3}->{1,3} *********************************************************************** */ static int extend_dset_two(const char *file, char *dname) { - hid_t fid = -1; /* file id */ - hid_t fapl = -1; /* file access property list id */ - hid_t did = -1; /* dataset id */ - hid_t sid = -1; /* dataspace id */ - hid_t dtid = -1; /* dataset's datatype id */ - int ndims; /* # of dimension sizes */ - unsigned i, j; /* local index variable */ - hsize_t ext_dims[2]; /* new dimension sizes after extension */ - hsize_t cur_dims[2]; /* current dimension sizes */ - size_t dtype_size; /* size of the dataset's datatype */ + hid_t fid = -1; /* file id */ + hid_t fapl = -1; /* file access property list id */ + hid_t did = -1; /* dataset id */ + hid_t sid = -1; /* dataspace id */ + hid_t dtid = -1; /* dataset's datatype id */ + int ndims; /* # of dimension sizes */ + unsigned i, j; /* local index variable */ + hsize_t ext_dims[2]; /* new dimension sizes after extension */ + hsize_t cur_dims[2]; /* current dimension sizes */ + size_t dtype_size; /* size of the dataset's datatype */ unsigned num_elmts; /* number of elements in the dataset */ - int ibuf[TEST_BUF_SIZE]; /* buffer for storing retrieved elements (integer) */ - set_t cbuf[TEST_BUF_SIZE]; /* buffer for storing retrieved elemnets (compound) */ + int ibuf[TEST_BUF_SIZE]; /* buffer for storing retrieved elements (integer) */ + set_t cbuf[TEST_BUF_SIZE]; /* buffer for storing retrieved elemnets (compound) */ /* Create a copy of file access property list */ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) @@ -192,27 +205,27 @@ extend_dset_two(const char *file, char *dname) /* Open the file and dataset with SWMR write */ if((fid = H5Fopen(file, H5F_ACC_RDWR|H5F_ACC_SWMR_WRITE, fapl)) < 0) - goto done; + goto done; if((did = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0) - goto done; + goto done; /* Send message to the test script to start "h5watch" */ send_message(WRITER_MESSAGE); if((sid = H5Dget_space(did)) < 0) - goto done; + goto done; if((ndims = H5Sget_simple_extent_ndims(sid)) < 0) - goto done; + goto done; /* Get the size of the dataset's datatype */ if((dtype_size = H5LDget_dset_type_size(did, NULL)) == 0) - goto done; + goto done; /* Get the dataset's data type */ if((dtid = H5Tget_native_type(H5Dget_type(did), H5T_DIR_DEFAULT)) < 0) - goto done; + goto done; /* Wait for message from the test script to start extending dataset */ if(wait_message(READER_MESSAGE) < 0) @@ -221,56 +234,56 @@ extend_dset_two(const char *file, char *dname) /* Loop through different variations of extending the dataset */ for(i = 0; i < TWO_NTESTS; i++) { - /* sleep to emulate about 2 seconds of application operation */ - sleep(2); + /* sleep to emulate about 2 seconds of application operation */ + sleep(2); - /* Get current dimension sizes */ + /* Get current dimension sizes */ if(H5LDget_dset_dims(did, cur_dims) < 0) - goto done; + goto done; - /* Set up the new extended dimension sizes */ + /* Set up the new extended dimension sizes */ ext_dims[0] = cur_dims[0] + (hsize_t)two_tests[i][0]; ext_dims[1] = cur_dims[1] + (hsize_t)two_tests[i][1]; - /* Extend the dataset */ - if(H5Dset_extent(did, ext_dims) < 0) - goto done; - - num_elmts = 1; - for(j = 0; j < (unsigned)ndims; j++) - num_elmts *= (unsigned)ext_dims[j]; - - /* Compound type */ - if(!HDstrcmp(dname, DSET_CMPD_TWO)) { - - HDmemset(cbuf, 0, sizeof(cbuf)); - for(j = 0; j < num_elmts; j++) { - cbuf[j].field1 = i + 1; - cbuf[j].field2.a = i + 1; - cbuf[j].field2.c = i + 1; - cbuf[j].field2.b.a = i + 1; - cbuf[j].field2.b.b = i + 1; - cbuf[j].field2.b.c = i + 1; - cbuf[j].field3 = i + 1; - cbuf[j].field4.a = i + 1; - cbuf[j].field4.b = i + 1; - } - - /* Write to the dataset */ - if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, cbuf) < 0) - goto done; - } else { /* Integer type */ - HDmemset(ibuf, 0, sizeof(ibuf)); - for(j = 0; j < num_elmts; j++) - ibuf[j] = (int)(i + 1); - - /* Write to the dataset */ - if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf) < 0) - goto done; - } - - if(H5Dflush(did) < 0) - goto done; + /* Extend the dataset */ + if(H5Dset_extent(did, ext_dims) < 0) + goto done; + + num_elmts = 1; + for(j = 0; j < (unsigned)ndims; j++) + num_elmts *= (unsigned)ext_dims[j]; + + /* Compound type */ + if(!HDstrcmp(dname, DSET_CMPD_TWO)) { + + HDmemset(cbuf, 0, sizeof(cbuf)); + for(j = 0; j < num_elmts; j++) { + cbuf[j].field1 = i + 1; + cbuf[j].field2.a = i + 1; + cbuf[j].field2.c = i + 1; + cbuf[j].field2.b.a = i + 1; + cbuf[j].field2.b.b = i + 1; + cbuf[j].field2.b.c = i + 1; + cbuf[j].field3 = i + 1; + cbuf[j].field4.a = i + 1; + cbuf[j].field4.b = i + 1; + } + + /* Write to the dataset */ + if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, cbuf) < 0) + goto done; + } else { /* Integer type */ + HDmemset(ibuf, 0, sizeof(ibuf)); + for(j = 0; j < num_elmts; j++) + ibuf[j] = (int)(i + 1); + + /* Write to the dataset */ + if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, ibuf) < 0) + goto done; + } + + if(H5Dflush(did) < 0) + goto done; } /* end for TWO_NTESTS */ @@ -286,8 +299,8 @@ done: H5E_BEGIN_TRY H5Tclose(dtid); H5Dclose(did); - H5Pclose(fapl); - H5Fclose(fid); + H5Pclose(fapl); + H5Fclose(fid); H5E_END_TRY return(FAIL); @@ -298,35 +311,35 @@ done: *********************************************************************** * * Extending a one-dimensional dataset - * Test cases: - * #1: increase - * #2: decrease - * #3: same - * #4: decrease - * #5: increase + * Test cases: + * #1: increase + * #2: decrease + * #3: same + * #4: decrease + * #5: increase * - * one_tests[ONE_NTESTS] = {3, -1, 0, -11, 2} - * varies from 10->13->12->12->1->3 + * one_tests[ONE_NTESTS] = {3, -1, 0, -11, 2} + * varies from 10->13->12->12->1->3 * *********************************************************************** */ static int extend_dset_one(const char *file, char *dname) { - hid_t fid = -1; /* file id */ - hid_t fapl = -1; /* file access property list id */ - hid_t did = -1; /* dataset id */ - hid_t dtid = -1; /* dataset's datatype id */ - hid_t sid = -1; /* dataspace id */ - hid_t mid = -1; /* memory space id */ - unsigned i, j; /* local index variable */ - int ibuf[TEST_BUF_SIZE]; /* buffer for storing retrieved elements (integer) */ - set_t cbuf[TEST_BUF_SIZE]; /* buffer for storing retrieved elemnets (compound) */ - hsize_t cur_dims[1]; /* current dimension sizes */ - hsize_t ext_dims[1]; /* new dimension sizes after extension */ - hsize_t offset[1]; /* starting offsets of appended data */ - hsize_t count[1]; /* dimension sizes of appended data */ - size_t dtype_size; /* size of the dataset's datatype */ + hid_t fid = -1; /* file id */ + hid_t fapl = -1; /* file access property list id */ + hid_t did = -1; /* dataset id */ + hid_t dtid = -1; /* dataset's datatype id */ + hid_t sid = -1; /* dataspace id */ + hid_t mid = -1; /* memory space id */ + unsigned i, j; /* local index variable */ + int ibuf[TEST_BUF_SIZE]; /* buffer for storing retrieved elements (integer) */ + set_t cbuf[TEST_BUF_SIZE]; /* buffer for storing retrieved elemnets (compound) */ + hsize_t cur_dims[1]; /* current dimension sizes */ + hsize_t ext_dims[1]; /* new dimension sizes after extension */ + hsize_t offset[1]; /* starting offsets of appended data */ + hsize_t count[1]; /* dimension sizes of appended data */ + size_t dtype_size; /* size of the dataset's datatype */ /* Create a copy of file access property list */ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) @@ -337,21 +350,21 @@ extend_dset_one(const char *file, char *dname) /* Open the file and dataset with SWMR write */ if((fid = H5Fopen(file, H5F_ACC_RDWR|H5F_ACC_SWMR_WRITE, fapl)) < 0) - goto done; + goto done; /* Send message to the test script to start "h5watch" */ send_message(WRITER_MESSAGE); if((did = H5Dopen2(fid, dname, H5P_DEFAULT)) < 0) - goto done; + goto done; /* Get size of the dataset's datatype */ if((dtype_size = H5LDget_dset_type_size(did, NULL)) == 0) - goto done; + goto done; /* Get dataset's datatype */ if((dtid = H5Tget_native_type(H5Dget_type(did), H5T_DIR_DEFAULT)) < 0) - goto done; + goto done; /* Wait for message from the test script to start extending dataset */ wait_message(READER_MESSAGE); @@ -359,72 +372,72 @@ extend_dset_one(const char *file, char *dname) /* Loop through different variations of extending the dataset */ for(i = 0; i < ONE_NTESTS; i++) { - /* sleep to emulate about 2 seconds of application operation */ - sleep(2); - - /* Get current dimension sizes */ - if(H5LDget_dset_dims(did, cur_dims) < 0) - goto done; - - /* Set up the new extended dimension sizes */ - ext_dims[0] = cur_dims[0] + (hsize_t)one_tests[i]; - - /* Extend the dataset */ - if(H5Dset_extent(did, ext_dims) < 0) - goto done; - - /* Write to the new appended region of the dataset */ - if(one_tests[i] > 0) { - - /* Select the extended region */ - offset[0] = cur_dims[0]; - count[0] = (hsize_t)one_tests[i]; - if((sid = H5Dget_space(did)) < 0) - goto done; - if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0) - goto done; - - /* Set up memory space and get dataset's datatype */ - if((mid = H5Screate_simple(1, count, NULL)) < 0) - goto done; - - /* Initialize data for the extended region of the dataset */ - /* Compound type */ - if(!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) { - HDmemset(cbuf, 0, sizeof(cbuf)); - for(j = 0; j < (unsigned)one_tests[i]; j++) { - cbuf[j].field1 = j + 1; - cbuf[j].field2.a = j + 2; - cbuf[j].field2.b.a = j + 2; - cbuf[j].field2.b.b = j + 2; - cbuf[j].field2.b.c = j + 2; - cbuf[j].field2.c = j + 2; - - cbuf[j].field3 = j + 3; - - cbuf[j].field4.a = j + 4; - cbuf[j].field4.b = j + 4; - } /* end for */ - - /* Write to the extended region of the dataset */ - if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, cbuf) < 0) - goto done; - } else { /* Integer type */ - for(j = 0; j < (unsigned)one_tests[i]; j++) - ibuf[j] = (int)j; - - /* Write to the extended region of the dataset */ - if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, ibuf) < 0) - goto done; - } - - /* Closing */ - if(H5Sclose(sid) < 0) goto done; - if(H5Sclose(mid) < 0) goto done; - } /* end if */ - - if(H5Dflush(did) < 0) - goto done; + /* sleep to emulate about 2 seconds of application operation */ + sleep(2); + + /* Get current dimension sizes */ + if(H5LDget_dset_dims(did, cur_dims) < 0) + goto done; + + /* Set up the new extended dimension sizes */ + ext_dims[0] = cur_dims[0] + (hsize_t)one_tests[i]; + + /* Extend the dataset */ + if(H5Dset_extent(did, ext_dims) < 0) + goto done; + + /* Write to the new appended region of the dataset */ + if(one_tests[i] > 0) { + + /* Select the extended region */ + offset[0] = cur_dims[0]; + count[0] = (hsize_t)one_tests[i]; + if((sid = H5Dget_space(did)) < 0) + goto done; + if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, offset, NULL, count, NULL) < 0) + goto done; + + /* Set up memory space and get dataset's datatype */ + if((mid = H5Screate_simple(1, count, NULL)) < 0) + goto done; + + /* Initialize data for the extended region of the dataset */ + /* Compound type */ + if(!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) { + HDmemset(cbuf, 0, sizeof(cbuf)); + for(j = 0; j < (unsigned)one_tests[i]; j++) { + cbuf[j].field1 = j + 1; + cbuf[j].field2.a = j + 2; + cbuf[j].field2.b.a = j + 2; + cbuf[j].field2.b.b = j + 2; + cbuf[j].field2.b.c = j + 2; + cbuf[j].field2.c = j + 2; + + cbuf[j].field3 = j + 3; + + cbuf[j].field4.a = j + 4; + cbuf[j].field4.b = j + 4; + } /* end for */ + + /* Write to the extended region of the dataset */ + if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, cbuf) < 0) + goto done; + } else { /* Integer type */ + for(j = 0; j < (unsigned)one_tests[i]; j++) + ibuf[j] = (int)j; + + /* Write to the extended region of the dataset */ + if(H5Dwrite(did, dtid, mid, sid, H5P_DEFAULT, ibuf) < 0) + goto done; + } + + /* Closing */ + if(H5Sclose(sid) < 0) goto done; + if(H5Sclose(mid) < 0) goto done; + } /* end if */ + + if(H5Dflush(did) < 0) + goto done; } /* end for ONE_NTESTS */ @@ -438,12 +451,12 @@ extend_dset_one(const char *file, char *dname) done: H5E_BEGIN_TRY - H5Sclose(sid); - H5Sclose(mid); + H5Sclose(sid); + H5Sclose(mid); H5Tclose(dtid); H5Dclose(did); - H5Pclose(fapl); - H5Fclose(fid); + H5Pclose(fapl); + H5Fclose(fid); H5E_END_TRY return(FAIL); @@ -457,8 +470,8 @@ main(int argc, const char *argv[]) char *fname = NULL; if(argc != 3) { - fprintf(stderr, "Should have file name and dataset name to be extended...\n"); - goto done; + fprintf(stderr, "Should have file name and dataset name to be extended...\n"); + goto done; } /* Get the dataset name to be extended */ @@ -466,19 +479,19 @@ main(int argc, const char *argv[]) dname = strdup(argv[2]); if(!HDstrcmp(dname, DSET_CMPD) || !HDstrcmp(dname, DSET_CMPD_ESC)) { - if(extend_dset_one(fname, dname) < 0) - goto done; - } else if(!HDstrcmp(dname, DSET_ONE) || - !HDstrcmp(dname, DSET_ALLOC_LATE) || - !HDstrcmp(dname, DSET_ALLOC_EARLY)) { - if(extend_dset_one(fname, dname) < 0) - goto done; + if(extend_dset_one(fname, dname) < 0) + goto done; + } else if(!HDstrcmp(dname, DSET_ONE) || + !HDstrcmp(dname, DSET_ALLOC_LATE) || + !HDstrcmp(dname, DSET_ALLOC_EARLY)) { + if(extend_dset_one(fname, dname) < 0) + goto done; } else if(!HDstrcmp(dname, DSET_TWO) || !HDstrcmp(dname, DSET_CMPD_TWO)) { - if(extend_dset_two(fname, dname) < 0) - goto done; + if(extend_dset_two(fname, dname) < 0) + goto done; } else { - fprintf(stdout, "Dataset cannot be extended...\n"); - goto done; + fprintf(stdout, "Dataset cannot be extended...\n"); + goto done; } exit(EXIT_SUCCESS); diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c index 1812087..ac2f6de 100644 --- a/hl/tools/h5watch/h5watch.c +++ b/hl/tools/h5watch/h5watch.c @@ -13,13 +13,6 @@ * access to either file, you may request a copy from help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include -#include -#include -#include -#include -#include - #include "h5tools.h" #include "h5tools_dump.h" #include "H5LDprivate.h" diff --git a/hl/tools/h5watch/h5watchgentest.c b/hl/tools/h5watch/h5watchgentest.c index d70a690..12298ca 100644 --- a/hl/tools/h5watch/h5watchgentest.c +++ b/hl/tools/h5watch/h5watchgentest.c @@ -15,12 +15,6 @@ #include "hdf5.h" #include "H5HLprivate2.h" -#include -#include -#include -#include -#include -#include /* * WATCH.h5: file with various types of datasets for testing-- @@ -97,7 +91,7 @@ typedef struct set_t { * ************************************************************************************** */ -static int +static herr_t generate_dset(hid_t fid, const char *dname, int ndims, hsize_t *dims, hsize_t *maxdims, hid_t dtid, void *data) { hid_t dcpl=-1; /* Dataset creation property */ @@ -108,42 +102,42 @@ generate_dset(hid_t fid, const char *dname, int ndims, hsize_t *dims, hsize_t *m /* Create the dataspace */ if((sid = H5Screate_simple(ndims, dims, maxdims)) < 0) - goto done; + goto done; /* Set up dataset's creation properties */ if(!HDstrcmp(dname, DSET_NONE)) - dcpl = H5P_DEFAULT; + dcpl = H5P_DEFAULT; else { - if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) - goto done; - for(i = 0; i < ndims; i++) - chunk_dims[i] = CHUNK_SIZE; - if(H5Pset_chunk(dcpl, ndims, chunk_dims) < 0) - goto done; - } + if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) + goto done; + for(i = 0; i < ndims; i++) + chunk_dims[i] = CHUNK_SIZE; + if(H5Pset_chunk(dcpl, ndims, chunk_dims) < 0) + goto done; + } /* end else */ if(!HDstrcmp(dname, DSET_ALLOC_LATE)) { - if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE) < 0) - goto done; + if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_LATE) < 0) + goto done; } else if(!HDstrcmp(dname, DSET_ALLOC_EARLY)) { - if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0) - goto done; - } + if(H5Pset_alloc_time(dcpl, H5D_ALLOC_TIME_EARLY) < 0) + goto done; + } /* end if-else */ /* Create the dataset */ if((did = H5Dcreate2(fid, dname, dtid, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - goto done; + goto done; /* Write to the dataset */ if(H5Dwrite(did, dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, data) < 0) - goto done; + goto done; /* Closing */ if(H5Pclose(dcpl) < 0) goto done; if(H5Sclose(sid) < 0) goto done; if(H5Dclose(did) < 0) goto done; - return(SUCCEED); + return SUCCEED; done: H5E_BEGIN_TRY @@ -152,8 +146,8 @@ done: H5Dclose(did); H5E_END_TRY - return(FAIL); -} /* generate_dset() */ + return FAIL; +} /* end generate_dset() */ int main(void) @@ -176,14 +170,14 @@ main(void) /* Create a copy of file access property list */ if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) - return -1; + HDexit(EXIT_FAILURE); /* Set to use the latest library format */ if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) - return -1; + HDexit(EXIT_FAILURE); /* Create a file with the latest format */ if((fid = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) - goto done; + HDexit(EXIT_FAILURE); /* Initialization for one-dimensional dataset */ cur_dims[0] = ONE_DIMS0; @@ -193,15 +187,15 @@ main(void) /* Generate DSET_ONE, DSET_NONE, DSET_NOMAX, DSET_ALLOC_LATE, DSET_EARLY */ if(generate_dset(fid, DSET_ONE, 1, cur_dims, max_dims, H5T_NATIVE_INT, one_data) < 0) - goto done; + goto done; if(generate_dset(fid, DSET_NONE, 1, cur_dims, NULL, H5T_NATIVE_INT, one_data) < 0) - goto done; + goto done; if(generate_dset(fid, DSET_NOMAX, 1, cur_dims, NULL, H5T_NATIVE_INT, one_data) < 0) - goto done; + goto done; if(generate_dset(fid, DSET_ALLOC_LATE, 1, cur_dims, max_dims, H5T_NATIVE_INT, one_data) < 0) - goto done; + goto done; if(generate_dset(fid, DSET_ALLOC_EARLY, 1, cur_dims, max_dims, H5T_NATIVE_INT, one_data) < 0) - goto done; + goto done; /* Initialization for two-dimensional dataset */ cur2_dims[0] = TWO_DIMS0; @@ -214,13 +208,13 @@ main(void) /* Generate DSET_TWO */ if(generate_dset(fid, DSET_TWO, 2, cur2_dims, max2_dims, H5T_NATIVE_INT, two_data) < 0) - goto done; + goto done; /* Initialization for one-dimensional compound typed dataset */ cur_dims[0] = ONE_DIMS0; max_dims[0] = MAX_ONE_DIMS0; - for (i = 0; i < ONE_DIMS0; i++) { + for(i = 0; i < ONE_DIMS0; i++) { one_cbuf[i].field1 = 1; one_cbuf[i].field2.a = 2; one_cbuf[i].field2.c = 4; @@ -230,78 +224,78 @@ main(void) one_cbuf[i].field3 = 3.0F; one_cbuf[i].field4.a = 4; one_cbuf[i].field4.b = 8; - } + } /* end for */ /* Create the compound type */ if((sub22_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub22_t))) < 0) - goto done; + goto done; if(H5Tinsert(sub22_tid, "a", HOFFSET(sub22_t, a), H5T_NATIVE_INT) < 0) - goto done; + goto done; if(H5Tinsert(sub22_tid, "b", HOFFSET(sub22_t, b), H5T_NATIVE_INT) < 0) - goto done; + goto done; if(H5Tinsert(sub22_tid, "c", HOFFSET(sub22_t, c), H5T_NATIVE_INT) < 0) - goto done; + goto done; if((sub2_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub2_t))) < 0) - goto done; + goto done; if(H5Tinsert(sub2_tid, "a", HOFFSET(sub2_t, a), H5T_NATIVE_INT) < 0) - goto done; + goto done; if(H5Tinsert(sub2_tid, "b", HOFFSET(sub2_t, b), sub22_tid) < 0) - goto done; + goto done; if(H5Tinsert(sub2_tid, "c", HOFFSET(sub2_t, c), H5T_NATIVE_INT) < 0) - goto done; + goto done; if((sub4_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub4_t))) < 0) - goto done; + goto done; if(H5Tinsert(sub4_tid, "a", HOFFSET(sub4_t, a), H5T_NATIVE_INT) < 0) - goto done; + goto done; if(H5Tinsert(sub4_tid, "b", HOFFSET(sub4_t, b), H5T_NATIVE_INT) < 0) - goto done; + goto done; if((set_tid = H5Tcreate(H5T_COMPOUND, sizeof(set_t))) < 0) - goto done; + goto done; if(H5Tinsert(set_tid, "field1", HOFFSET(set_t, field1), H5T_NATIVE_INT) < 0) - goto done; + goto done; if(H5Tinsert(set_tid, "field2", HOFFSET(set_t, field2), sub2_tid) < 0) - goto done; + goto done; if(H5Tinsert(set_tid, "field3", HOFFSET(set_t, field3), H5T_NATIVE_DOUBLE) < 0) - goto done; + goto done; if(H5Tinsert(set_tid, "field4", HOFFSET(set_t, field4), sub4_tid) < 0) - goto done; + goto done; /* Create the compound type with escape/separator characters */ if((esc_sub2_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub2_t))) < 0) - goto done; + goto done; if(H5Tinsert(esc_sub2_tid, ".a", HOFFSET(sub2_t, a), H5T_NATIVE_INT) < 0) - goto done; + goto done; if(H5Tinsert(esc_sub2_tid, ",b", HOFFSET(sub2_t, b), sub22_tid) < 0) - goto done; + goto done; if(H5Tinsert(esc_sub2_tid, "\\K", HOFFSET(sub2_t, c), H5T_NATIVE_INT) < 0) - goto done; + goto done; if((esc_sub4_tid = H5Tcreate(H5T_COMPOUND, sizeof(sub4_t))) < 0) - goto done; + goto done; if(H5Tinsert(esc_sub4_tid, "a.", HOFFSET(sub4_t, a), H5T_NATIVE_INT) < 0) - goto done; + goto done; if(H5Tinsert(esc_sub4_tid, "b,", HOFFSET(sub4_t, b), H5T_NATIVE_INT) < 0) - goto done; + goto done; if((esc_set_tid = H5Tcreate(H5T_COMPOUND, sizeof(set_t))) < 0) - goto done; + goto done; if(H5Tinsert(esc_set_tid, "field,1", HOFFSET(set_t, field1), H5T_NATIVE_INT) < 0) - goto done; + goto done; if(H5Tinsert(esc_set_tid, "field2.", HOFFSET(set_t, field2), esc_sub2_tid) < 0) - goto done; + goto done; if(H5Tinsert(esc_set_tid, "field\\3", HOFFSET(set_t, field3), H5T_NATIVE_DOUBLE) < 0) - goto done; + goto done; if(H5Tinsert(esc_set_tid, "field4,", HOFFSET(set_t, field4), esc_sub4_tid) < 0) - goto done; + goto done; /* Generate DSET_CMPD, DSET_CMPD_ESC */ if(generate_dset(fid, DSET_CMPD, 1, cur_dims, max_dims, set_tid, one_cbuf) < 0) - goto done; + goto done; if(generate_dset(fid, DSET_CMPD_ESC, 1, cur_dims, max_dims, esc_set_tid, one_cbuf) < 0) - goto done; + goto done; /* Initialization for two-dimensional compound typed dataset */ cur2_dims[0] = TWO_DIMS0; @@ -309,7 +303,7 @@ main(void) max2_dims[0] = MAX_TWO_DIMS0; max2_dims[0] = MAX_TWO_DIMS1; - for (i = 0; i < (TWO_DIMS0 * TWO_DIMS1); i++) { + for(i = 0; i < (TWO_DIMS0 * TWO_DIMS1); i++) { two_cbuf[i].field1 = 1; two_cbuf[i].field2.a = 2; two_cbuf[i].field2.c = 4; @@ -319,11 +313,11 @@ main(void) two_cbuf[i].field3 = 3.0F; two_cbuf[i].field4.a = 4; two_cbuf[i].field4.b = 8; - } + } /* end for */ /* Generate DSET_CMPD_TWO */ if(generate_dset(fid, DSET_CMPD_TWO, 2, cur2_dims, max2_dims, set_tid, two_cbuf) < 0) - goto done; + goto done; /* Closing */ if(H5Tclose(sub22_tid) < 0) goto done; @@ -336,7 +330,7 @@ main(void) if(H5Pclose(fapl) < 0) goto done; if(H5Fclose(fid) < 0) goto done; - exit(EXIT_SUCCESS); + HDexit(EXIT_SUCCESS); done: H5E_BEGIN_TRY @@ -351,5 +345,6 @@ done: H5Fclose(fid); H5E_END_TRY - exit(EXIT_FAILURE); -} /* main() */ + HDexit(EXIT_FAILURE); +} /* end main() */ + diff --git a/java/src/hdf/hdf5lib/CMakeLists.txt b/java/src/hdf/hdf5lib/CMakeLists.txt index 3f70bce..0ddf88c 100644 --- a/java/src/hdf/hdf5lib/CMakeLists.txt +++ b/java/src/hdf/hdf5lib/CMakeLists.txt @@ -14,7 +14,7 @@ SET_GLOBAL_VARIABLE (HDF5_JAVA_SOURCE_PACKAGES "${HDFJAVA_SOURCE_PACKAGES};hdf.hdf5lib.callbacks;hdf.hdf5lib.exceptions;hdf.hdf5lib.structs;hdf.hdf5lib" ) -set (HDF5_JAVA_HDF_HDF5_CALLBACKS_SRCS +set (HDF5_JAVA_HDF_HDF5_CALLBACKS_SOURCES callbacks/H5A_iterate_cb.java callbacks/H5A_iterate_t.java callbacks/H5D_append_cb.java @@ -45,7 +45,7 @@ set (HDF5_JAVA_HDF_HDF5_CALLBACKS_SRCS callbacks/Callbacks.java ) -set (HDF5_JAVA_HDF_HDF5_EXCEPTIONS_SRCS +set (HDF5_JAVA_HDF_HDF5_EXCEPTIONS_SOURCES exceptions/HDF5Exception.java exceptions/HDF5AtomException.java exceptions/HDF5AttributeException.java @@ -72,7 +72,7 @@ set (HDF5_JAVA_HDF_HDF5_EXCEPTIONS_SRCS exceptions/HDF5SymbolTableException.java ) -set (HDF5_JAVA_HDF_HDF5_STRUCTS_SRCS +set (HDF5_JAVA_HDF_HDF5_STRUCTS_SOURCES structs/H5_ih_info_t.java structs/H5A_info_t.java structs/H5AC_cache_config_t.java @@ -84,7 +84,7 @@ set (HDF5_JAVA_HDF_HDF5_STRUCTS_SRCS structs/H5O_info_t.java ) -set (HDF5_JAVA_HDF_HDF5_SRCS +set (HDF5_JAVA_HDF_HDF5_SOURCES HDFArray.java HDF5Constants.java HDF5GroupInfo.java @@ -101,7 +101,7 @@ file (WRITE ${PROJECT_BINARY_DIR}/Manifest.txt set (CMAKE_JAVA_INCLUDE_PATH "${HDF5_JAVA_LOGGING_JAR}") -add_jar (${HDF5_JAVA_HDF5_LIB_TARGET} OUTPUT_NAME "${HDF5_JAVA_HDF5_LIB_TARGET}-${HDF5_PACKAGE_VERSION}" OUTPUT_DIR ${CMAKE_JAVA_TARGET_OUTPUT_DIR} MANIFEST ${PROJECT_BINARY_DIR}/Manifest.txt ${HDF5_JAVA_HDF_HDF5_CALLBACKS_SRCS} ${HDF5_JAVA_HDF_HDF5_EXCEPTIONS_SRCS} ${HDF5_JAVA_HDF_HDF5_STRUCTS_SRCS} ${HDF5_JAVA_HDF_HDF5_SRCS}) +add_jar (${HDF5_JAVA_HDF5_LIB_TARGET} OUTPUT_NAME "${HDF5_JAVA_HDF5_LIB_TARGET}-${HDF5_PACKAGE_VERSION}" OUTPUT_DIR ${CMAKE_JAVA_TARGET_OUTPUT_DIR} MANIFEST ${PROJECT_BINARY_DIR}/Manifest.txt ${HDF5_JAVA_HDF_HDF5_CALLBACKS_SOURCES} ${HDF5_JAVA_HDF_HDF5_EXCEPTIONS_SOURCES} ${HDF5_JAVA_HDF_HDF5_STRUCTS_SOURCES} ${HDF5_JAVA_HDF_HDF5_SOURCES}) install_jar (${HDF5_JAVA_HDF5_LIB_TARGET} LIBRARY DESTINATION ${HDF5_INSTALL_JAR_DIR} COMPONENT libraries) #if (NOT WIN32) # install_jni_symlink (${HDF5_JAVA_HDF5_LIB_TARGET} ${HDF5_INSTALL_JAR_DIR} libraries) @@ -115,7 +115,7 @@ add_dependencies (${HDF5_JAVA_HDF5_LIB_TARGET} ${HDF5_JAVA_JNI_LIB_TARGET}) set_target_properties (${HDF5_JAVA_HDF5_LIB_TARGET} PROPERTIES FOLDER libraries/java) create_javadoc(hdf5_java_doc - FILES ${HDF5_JAVA_HDF_HDF5_CALLBACKS_SRCS} ${HDF5_JAVA_HDF_HDF5_EXCEPTIONS_SRCS} ${HDF5_JAVA_HDF_HDF5_STRUCTS_SRCS} ${HDF5_JAVA_HDF_HDF5_SRCS} + FILES ${HDF5_JAVA_HDF_HDF5_CALLBACKS_SOURCES} ${HDF5_JAVA_HDF_HDF5_EXCEPTIONS_SOURCES} ${HDF5_JAVA_HDF_HDF5_STRUCTS_SOURCES} ${HDF5_JAVA_HDF_HDF5_SOURCES} OVERVIEW ${HDF5_JAVA_HDF5_SRC_DIR}/overview.html CLASSPATH ${CMAKE_JAVA_INCLUDE_PATH} WINDOWTITLE "HDF5 Java" diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt index 068689b..92673e2 100644 --- a/java/test/CMakeLists.txt +++ b/java/test/CMakeLists.txt @@ -8,7 +8,7 @@ INCLUDE_DIRECTORIES ( ${HDF5_JAVA_HDF5_LIB_DIR} ) -set (HDF5_JAVA_TEST_SRCS +set (HDF5_JAVA_TEST_SOURCES TestH5.java TestH5E.java TestH5Edefault.java @@ -54,7 +54,7 @@ file (WRITE ${PROJECT_BINARY_DIR}/Manifest.txt set (CMAKE_JAVA_INCLUDE_PATH "${HDF5_JAVA_LIB_DIR}/junit.jar;${HDF5_JAVA_LIB_DIR}/hamcrest-core.jar;${HDF5_JAVA_JARS};${HDF5_JAVA_LOGGING_JAR};${HDF5_JAVA_LOGGING_SIMPLE_JAR}") -add_jar (${HDF5_JAVA_TEST_LIB_TARGET} MANIFEST ${PROJECT_BINARY_DIR}/Manifest.txt ${HDF5_JAVA_TEST_SRCS}) +add_jar (${HDF5_JAVA_TEST_LIB_TARGET} MANIFEST ${PROJECT_BINARY_DIR}/Manifest.txt ${HDF5_JAVA_TEST_SOURCES}) get_target_property (${HDF5_JAVA_TEST_LIB_TARGET}_JAR_FILE ${HDF5_JAVA_TEST_LIB_TARGET} JAR_FILE) #install_jar (${HDF5_JAVA_TEST_LIB_TARGET} ${HJAVA_INSTALL_DATA_DIR}/tests tests) diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index 74e8ba9..f37703a 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -234,13 +234,18 @@ sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ $actual_ext > $actual -if $CMP $expect $actual; then - echo " PASSED" +# SunOS does not support this. Skip it. +if [ $myos = SunOS ]; then + echo " SKIPPED" else - echo "*FAILED*" - echo " Expected result differs from actual result" - nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + if $CMP $expect $actual; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result differs from actual result" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + fi fi diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d93612b..00e79ef 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,7 +9,7 @@ add_definitions (${HDF_EXTRA_C_FLAGS}) #----------------------------------------------------------------------------- # List Source Files #----------------------------------------------------------------------------- -set (H5_SRCS +set (H5_SOURCES ${HDF5_SRC_DIR}/H5.c ${HDF5_SRC_DIR}/H5checksum.c ${HDF5_SRC_DIR}/H5dbg.c @@ -25,9 +25,9 @@ set (H5_HDRS #${HDF5_SRC_DIR}/H5version.h #${HDF5_SRC_DIR}/H5overflow.h ) -IDE_GENERATED_PROPERTIES ("H5" "${H5_HDRS}" "${H5_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5" "${H5_HDRS}" "${H5_SOURCES}" ) -set (H5A_SRCS +set (H5A_SOURCES ${HDF5_SRC_DIR}/H5A.c ${HDF5_SRC_DIR}/H5Abtree2.c ${HDF5_SRC_DIR}/H5Adense.c @@ -40,9 +40,9 @@ set (H5A_HDRS ${HDF5_SRC_DIR}/H5Apkg.h ${HDF5_SRC_DIR}/H5Apublic.h ) -IDE_GENERATED_PROPERTIES ("H5A" "${H5A_HDRS}" "${H5A_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5A" "${H5A_HDRS}" "${H5A_SOURCES}" ) -set (H5AC_SRCS +set (H5AC_SOURCES ${HDF5_SRC_DIR}/H5AC.c ${HDF5_SRC_DIR}/H5AClog.c ${HDF5_SRC_DIR}/H5ACmpio.c @@ -52,9 +52,9 @@ set (H5AC_HDRS ${HDF5_SRC_DIR}/H5ACpkg.h ${HDF5_SRC_DIR}/H5ACpublic.h ) -IDE_GENERATED_PROPERTIES ("H5AC" "${H5AC_HDRS}" "${H5AC_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5AC" "${H5AC_HDRS}" "${H5AC_SOURCES}" ) -set (H5B_SRCS +set (H5B_SOURCES ${HDF5_SRC_DIR}/H5B.c ${HDF5_SRC_DIR}/H5Bcache.c ${HDF5_SRC_DIR}/H5Bdbg.c @@ -63,10 +63,10 @@ set (H5B_HDRS ${HDF5_SRC_DIR}/H5Bpkg.h ${HDF5_SRC_DIR}/H5Bpublic.h ) -IDE_GENERATED_PROPERTIES ("H5B" "${H5B_HDRS}" "${H5B_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5B" "${H5B_HDRS}" "${H5B_SOURCES}" ) -set (H5B2_SRCS +set (H5B2_SOURCES ${HDF5_SRC_DIR}/H5B2.c ${HDF5_SRC_DIR}/H5B2cache.c ${HDF5_SRC_DIR}/H5B2dbg.c @@ -79,10 +79,10 @@ set (H5B2_HDRS ${HDF5_SRC_DIR}/H5B2pkg.h ${HDF5_SRC_DIR}/H5B2public.h ) -IDE_GENERATED_PROPERTIES ("H5B2" "${H5B2_HDRS}" "${H5B2_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5B2" "${H5B2_HDRS}" "${H5B2_SOURCES}" ) -set (H5C_SRCS +set (H5C_SOURCES ${HDF5_SRC_DIR}/H5C.c ${HDF5_SRC_DIR}/H5Cmpio.c ) @@ -90,18 +90,18 @@ set (H5C_HDRS ${HDF5_SRC_DIR}/H5Cpkg.h ${HDF5_SRC_DIR}/H5Cpublic.h ) -IDE_GENERATED_PROPERTIES ("H5C" "${H5C_HDRS}" "${H5C_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5C" "${H5C_HDRS}" "${H5C_SOURCES}" ) -set (H5CS_SRCS +set (H5CS_SOURCES ${HDF5_SRC_DIR}/H5CS.c ) set (H5CS_HDRS ) -IDE_GENERATED_PROPERTIES ("H5CS" "${H5CS_HDRS}" "${H5CS_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5CS" "${H5CS_HDRS}" "${H5CS_SOURCES}" ) -set (H5D_SRCS +set (H5D_SOURCES ${HDF5_SRC_DIR}/H5D.c ${HDF5_SRC_DIR}/H5Dbtree.c ${HDF5_SRC_DIR}/H5Dbtree2.c @@ -131,9 +131,9 @@ set (H5D_HDRS ${HDF5_SRC_DIR}/H5Dpkg.h ${HDF5_SRC_DIR}/H5Dpublic.h ) -IDE_GENERATED_PROPERTIES ("H5D" "${H5D_HDRS}" "${H5D_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5D" "${H5D_HDRS}" "${H5D_SOURCES}" ) -set (H5E_SRCS +set (H5E_SOURCES ${HDF5_SRC_DIR}/H5E.c ${HDF5_SRC_DIR}/H5Edeprec.c ${HDF5_SRC_DIR}/H5Eint.c @@ -147,10 +147,10 @@ set (H5E_HDRS ${HDF5_SRC_DIR}/H5Epublic.h #${HDF5_SRC_DIR}/H5Eterm.h ) -IDE_GENERATED_PROPERTIES ("H5E" "${H5E_HDRS}" "${H5E_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5E" "${H5E_HDRS}" "${H5E_SOURCES}" ) -set (H5EA_SRCS +set (H5EA_SOURCES ${HDF5_SRC_DIR}/H5EA.c ${HDF5_SRC_DIR}/H5EAcache.c ${HDF5_SRC_DIR}/H5EAdbg.c @@ -166,10 +166,10 @@ set (H5EA_SRCS set (H5EA_HDRS ${HDF5_SRC_DIR}/H5EApkg.h ) -IDE_GENERATED_PROPERTIES ("H5EA" "${H5EA_HDRS}" "${H5EA_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5EA" "${H5EA_HDRS}" "${H5EA_SOURCES}" ) -set (H5F_SRCS +set (H5F_SOURCES ${HDF5_SRC_DIR}/H5F.c ${HDF5_SRC_DIR}/H5Faccum.c ${HDF5_SRC_DIR}/H5Fcwfs.c @@ -192,10 +192,10 @@ set (H5F_HDRS ${HDF5_SRC_DIR}/H5Fpkg.h ${HDF5_SRC_DIR}/H5Fpublic.h ) -IDE_GENERATED_PROPERTIES ("H5F" "${H5F_HDRS}" "${H5F_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5F" "${H5F_HDRS}" "${H5F_SOURCES}" ) -set (H5FA_SRCS +set (H5FA_SOURCES ${HDF5_SRC_DIR}/H5FA.c ${HDF5_SRC_DIR}/H5FAcache.c ${HDF5_SRC_DIR}/H5FAdbg.c @@ -209,10 +209,10 @@ set (H5FA_SRCS set (H5FA_HDRS ${HDF5_SRC_DIR}/H5FApkg.h ) -IDE_GENERATED_PROPERTIES ("H5FA" "${H5FA_HDRS}" "${H5FA_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5FA" "${H5FA_HDRS}" "${H5FA_SOURCES}" ) -set (H5FD_SRCS +set (H5FD_SOURCES ${HDF5_SRC_DIR}/H5FD.c ${HDF5_SRC_DIR}/H5FDcore.c ${HDF5_SRC_DIR}/H5FDdirect.c @@ -243,26 +243,26 @@ set (H5FD_HDRS ${HDF5_SRC_DIR}/H5FDstdio.h ${HDF5_SRC_DIR}/H5FDwindows.h ) -IDE_GENERATED_PROPERTIES ("H5FD" "${H5FD_HDRS}" "${H5FD_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5FD" "${H5FD_HDRS}" "${H5FD_SOURCES}" ) -set (H5FL_SRCS +set (H5FL_SOURCES ${HDF5_SRC_DIR}/H5FL.c ) set (H5FL_HDRS ) -IDE_GENERATED_PROPERTIES ("H5FL" "${H5FL_HDRS}" "${H5FL_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5FL" "${H5FL_HDRS}" "${H5FL_SOURCES}" ) -set (H5FO_SRCS +set (H5FO_SOURCES ${HDF5_SRC_DIR}/H5FO.c ) set (H5FO_HDRS ) -IDE_GENERATED_PROPERTIES ("H5FO" "${H5FO_HDRS}" "${H5FO_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5FO" "${H5FO_HDRS}" "${H5FO_SOURCES}" ) -set (H5FS_SRCS +set (H5FS_SOURCES ${HDF5_SRC_DIR}/H5FS.c ${HDF5_SRC_DIR}/H5FScache.c ${HDF5_SRC_DIR}/H5FSdbg.c @@ -276,9 +276,9 @@ set (H5FS_HDRS ${HDF5_SRC_DIR}/H5FSpkg.h ${HDF5_SRC_DIR}/H5FSpublic.h ) -IDE_GENERATED_PROPERTIES ("H5FS" "${H5FS_HDRS}" "${H5FS_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5FS" "${H5FS_HDRS}" "${H5FS_SOURCES}" ) -set (H5G_SRCS +set (H5G_SOURCES ${HDF5_SRC_DIR}/H5G.c ${HDF5_SRC_DIR}/H5Gbtree2.c ${HDF5_SRC_DIR}/H5Gcache.c @@ -303,9 +303,9 @@ set (H5G_HDRS ${HDF5_SRC_DIR}/H5Gpkg.h ${HDF5_SRC_DIR}/H5Gpublic.h ) -IDE_GENERATED_PROPERTIES ("H5G" "${H5G_HDRS}" "${H5G_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5G" "${H5G_HDRS}" "${H5G_SOURCES}" ) -set (H5HF_SRCS +set (H5HF_SOURCES ${HDF5_SRC_DIR}/H5HF.c ${HDF5_SRC_DIR}/H5HFbtree2.c ${HDF5_SRC_DIR}/H5HFcache.c @@ -329,9 +329,9 @@ set (H5HF_HDRS ${HDF5_SRC_DIR}/H5HFpkg.h ${HDF5_SRC_DIR}/H5HFpublic.h ) -IDE_GENERATED_PROPERTIES ("H5HF" "${H5HF_HDRS}" "${H5HF_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5HF" "${H5HF_HDRS}" "${H5HF_SOURCES}" ) -set (H5HG_SRCS +set (H5HG_SOURCES ${HDF5_SRC_DIR}/H5HG.c ${HDF5_SRC_DIR}/H5HGcache.c ${HDF5_SRC_DIR}/H5HGdbg.c @@ -342,9 +342,9 @@ set (H5HG_HDRS ${HDF5_SRC_DIR}/H5HGpkg.h ${HDF5_SRC_DIR}/H5HGpublic.h ) -IDE_GENERATED_PROPERTIES ("H5HG" "${H5HG_HDRS}" "${H5HG_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5HG" "${H5HG_HDRS}" "${H5HG_SOURCES}" ) -set (H5HL_SRCS +set (H5HL_SOURCES ${HDF5_SRC_DIR}/H5HL.c ${HDF5_SRC_DIR}/H5HLcache.c ${HDF5_SRC_DIR}/H5HLdbg.c @@ -357,18 +357,18 @@ set (H5HL_HDRS ${HDF5_SRC_DIR}/H5HLpkg.h ${HDF5_SRC_DIR}/H5HLpublic.h ) -IDE_GENERATED_PROPERTIES ("H5HL" "${H5HL_HDRS}" "${H5HL_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5HL" "${H5HL_HDRS}" "${H5HL_SOURCES}" ) -set (H5HP_SRCS +set (H5HP_SOURCES ${HDF5_SRC_DIR}/H5HP.c ) set (H5HP_HDRS ) -IDE_GENERATED_PROPERTIES ("H5HP" "${H5HP_HDRS}" "${H5HP_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5HP" "${H5HP_HDRS}" "${H5HP_SOURCES}" ) -set (H5I_SRCS +set (H5I_SOURCES ${HDF5_SRC_DIR}/H5I.c ${HDF5_SRC_DIR}/H5Itest.c ) @@ -376,10 +376,10 @@ set (H5I_HDRS ${HDF5_SRC_DIR}/H5Ipkg.h ${HDF5_SRC_DIR}/H5Ipublic.h ) -IDE_GENERATED_PROPERTIES ("H5I" "${H5I_HDRS}" "${H5I_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5I" "${H5I_HDRS}" "${H5I_SOURCES}" ) -set (H5L_SRCS +set (H5L_SOURCES ${HDF5_SRC_DIR}/H5L.c ${HDF5_SRC_DIR}/H5Lexternal.c ) @@ -387,10 +387,10 @@ set (H5L_HDRS ${HDF5_SRC_DIR}/H5Lpkg.h ${HDF5_SRC_DIR}/H5Lpublic.h ) -IDE_GENERATED_PROPERTIES ("H5L" "${H5L_HDRS}" "${H5L_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5L" "${H5L_HDRS}" "${H5L_SOURCES}" ) -set (H5MF_SRCS +set (H5MF_SOURCES ${HDF5_SRC_DIR}/H5MF.c ${HDF5_SRC_DIR}/H5MFaggr.c ${HDF5_SRC_DIR}/H5MFdbg.c @@ -399,19 +399,19 @@ set (H5MF_SRCS set (H5MF_HDRS ) -IDE_GENERATED_PROPERTIES ("H5MF" "${H5MF_HDRS}" "${H5MF_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5MF" "${H5MF_HDRS}" "${H5MF_SOURCES}" ) -set (H5MM_SRCS +set (H5MM_SOURCES ${HDF5_SRC_DIR}/H5MM.c ) set (H5MM_HDRS ${HDF5_SRC_DIR}/H5MMpublic.h ) -IDE_GENERATED_PROPERTIES ("H5MM" "${H5MM_HDRS}" "${H5MM_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5MM" "${H5MM_HDRS}" "${H5MM_SOURCES}" ) -set (H5MP_SRCS +set (H5MP_SOURCES ${HDF5_SRC_DIR}/H5MP.c ${HDF5_SRC_DIR}/H5MPtest.c ) @@ -419,9 +419,9 @@ set (H5MP_SRCS set (H5MP_HDRS ${HDF5_SRC_DIR}/H5MPpkg.h ) -IDE_GENERATED_PROPERTIES ("H5MP" "${H5MP_HDRS}" "${H5MP_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5MP" "${H5MP_HDRS}" "${H5MP_SOURCES}" ) -set (H5O_SRCS +set (H5O_SOURCES ${HDF5_SRC_DIR}/H5O.c ${HDF5_SRC_DIR}/H5Oainfo.c ${HDF5_SRC_DIR}/H5Oalloc.c @@ -464,9 +464,9 @@ set (H5O_HDRS ${HDF5_SRC_DIR}/H5Opublic.h ${HDF5_SRC_DIR}/H5Oshared.h ) -IDE_GENERATED_PROPERTIES ("H5O" "${H5O_HDRS}" "${H5O_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5O" "${H5O_HDRS}" "${H5O_SOURCES}" ) -set (H5P_SRCS +set (H5P_SOURCES ${HDF5_SRC_DIR}/H5P.c ${HDF5_SRC_DIR}/H5Pacpl.c ${HDF5_SRC_DIR}/H5Pdapl.c @@ -491,9 +491,9 @@ set (H5P_HDRS ${HDF5_SRC_DIR}/H5Ppkg.h ${HDF5_SRC_DIR}/H5Ppublic.h ) -IDE_GENERATED_PROPERTIES ("H5P" "${H5P_HDRS}" "${H5P_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5P" "${H5P_HDRS}" "${H5P_SOURCES}" ) -set (H5PL_SRCS +set (H5PL_SOURCES ${HDF5_SRC_DIR}/H5PL.c ) @@ -501,10 +501,10 @@ set (H5PL_HDRS ${HDF5_SRC_DIR}/H5PLextern.h ${HDF5_SRC_DIR}/H5PLpublic.h ) -IDE_GENERATED_PROPERTIES ("H5PL" "${H5PL_HDRS}" "${H5PL_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5PL" "${H5PL_HDRS}" "${H5PL_SOURCES}" ) -set (H5R_SRCS +set (H5R_SOURCES ${HDF5_SRC_DIR}/H5R.c ${HDF5_SRC_DIR}/H5Rdeprec.c ) @@ -512,18 +512,18 @@ set (H5R_HDRS ${HDF5_SRC_DIR}/H5Rpkg.h ${HDF5_SRC_DIR}/H5Rpublic.h ) -IDE_GENERATED_PROPERTIES ("H5R" "${H5R_HDRS}" "${H5R_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5R" "${H5R_HDRS}" "${H5R_SOURCES}" ) -set (H5RS_SRCS +set (H5RS_SOURCES ${HDF5_SRC_DIR}/H5RS.c ) set (H5RS_HDRS ) -IDE_GENERATED_PROPERTIES ("H5RS" "${H5RS_HDRS}" "${H5RS_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5RS" "${H5RS_HDRS}" "${H5RS_SOURCES}" ) -set (H5S_SRCS +set (H5S_SOURCES ${HDF5_SRC_DIR}/H5S.c ${HDF5_SRC_DIR}/H5Sall.c ${HDF5_SRC_DIR}/H5Sdbg.c @@ -539,18 +539,18 @@ set (H5S_HDRS ${HDF5_SRC_DIR}/H5Spkg.h ${HDF5_SRC_DIR}/H5Spublic.h ) -IDE_GENERATED_PROPERTIES ("H5S" "${H5S_HDRS}" "${H5S_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5S" "${H5S_HDRS}" "${H5S_SOURCES}" ) -set (H5SL_SRCS +set (H5SL_SOURCES ${HDF5_SRC_DIR}/H5SL.c ) set (H5SL_HDRS ) -IDE_GENERATED_PROPERTIES ("H5SL" "${H5SL_HDRS}" "${H5SL_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5SL" "${H5SL_HDRS}" "${H5SL_SOURCES}" ) -set (H5SM_SRCS +set (H5SM_SOURCES ${HDF5_SRC_DIR}/H5SM.c ${HDF5_SRC_DIR}/H5SMbtree2.c ${HDF5_SRC_DIR}/H5SMcache.c @@ -561,18 +561,18 @@ set (H5SM_SRCS set (H5SM_HDRS ${HDF5_SRC_DIR}/H5SMpkg.h ) -IDE_GENERATED_PROPERTIES ("H5SM" "${H5SM_HDRS}" "${H5SM_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5SM" "${H5SM_HDRS}" "${H5SM_SOURCES}" ) -set (H5ST_SRCS +set (H5ST_SOURCES ${HDF5_SRC_DIR}/H5ST.c ) set (H5ST_HDRS ) -IDE_GENERATED_PROPERTIES ("H5ST" "${H5ST_HDRS}" "${H5ST_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5ST" "${H5ST_HDRS}" "${H5ST_SOURCES}" ) -set (H5T_SRCS +set (H5T_SOURCES ${HDF5_SRC_DIR}/H5T.c ${HDF5_SRC_DIR}/H5Tarray.c ${HDF5_SRC_DIR}/H5Tbit.c @@ -602,42 +602,42 @@ set (H5T_HDRS ${HDF5_SRC_DIR}/H5Tpkg.h ${HDF5_SRC_DIR}/H5Tpublic.h ) -IDE_GENERATED_PROPERTIES ("H5T" "${H5T_HDRS}" "${H5T_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5T" "${H5T_HDRS}" "${H5T_SOURCES}" ) -set (H5TS_SRCS +set (H5TS_SOURCES ${HDF5_SRC_DIR}/H5TS.c ) set (H5TS_HDRS ) -IDE_GENERATED_PROPERTIES ("H5TS" "${H5TS_HDRS}" "${H5TS_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5TS" "${H5TS_HDRS}" "${H5TS_SOURCES}" ) -set (H5UC_SRCS +set (H5UC_SOURCES ${HDF5_SRC_DIR}/H5UC.c ) set (H5UC_HDRS ) -IDE_GENERATED_PROPERTIES ("H5UC" "${H5UC_HDRS}" "${H5UC_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5UC" "${H5UC_HDRS}" "${H5UC_SOURCES}" ) -set (H5VM_SRCS +set (H5VM_SOURCES ${HDF5_SRC_DIR}/H5VM.c ) set (H5VM_HDRS ) -IDE_GENERATED_PROPERTIES ("H5VM" "${H5VM_HDRS}" "${H5VM_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5VM" "${H5VM_HDRS}" "${H5VM_SOURCES}" ) -set (H5WB_SRCS +set (H5WB_SOURCES ${HDF5_SRC_DIR}/H5WB.c ) set (H5WB_HDRS ) -IDE_GENERATED_PROPERTIES ("H5WB" "${H5WB_HDRS}" "${H5WB_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5WB" "${H5WB_HDRS}" "${H5WB_SOURCES}" ) -set (H5Z_SRCS +set (H5Z_SOURCES ${HDF5_SRC_DIR}/H5Z.c ${HDF5_SRC_DIR}/H5Zdeflate.c ${HDF5_SRC_DIR}/H5Zfletcher32.c @@ -657,50 +657,50 @@ set (H5Z_HDRS ${HDF5_SRC_DIR}/H5Zpkg.h ${HDF5_SRC_DIR}/H5Zpublic.h ) -IDE_GENERATED_PROPERTIES ("H5Z" "${H5Z_HDRS}" "${H5Z_SRCS}" ) +IDE_GENERATED_PROPERTIES ("H5Z" "${H5Z_HDRS}" "${H5Z_SOURCES}" ) set (common_SRCS - ${H5_SRCS} - ${H5A_SRCS} - ${H5AC_SRCS} - ${H5B_SRCS} - ${H5B2_SRCS} - ${H5C_SRCS} - ${H5CS_SRCS} - ${H5D_SRCS} - ${H5E_SRCS} - ${H5EA_SRCS} - ${H5F_SRCS} - ${H5FA_SRCS} - ${H5FD_SRCS} - ${H5FL_SRCS} - ${H5FO_SRCS} - ${H5FS_SRCS} - ${H5G_SRCS} - ${H5HF_SRCS} - ${H5HG_SRCS} - ${H5HL_SRCS} - ${H5HP_SRCS} - ${H5I_SRCS} - ${H5L_SRCS} - ${H5MF_SRCS} - ${H5MM_SRCS} - ${H5MP_SRCS} - ${H5O_SRCS} - ${H5P_SRCS} - ${H5PL_SRCS} - ${H5R_SRCS} - ${H5UC_SRCS} - ${H5RS_SRCS} - ${H5S_SRCS} - ${H5SL_SRCS} - ${H5SM_SRCS} - ${H5ST_SRCS} - ${H5T_SRCS} - ${H5TS_SRCS} - ${H5VM_SRCS} - ${H5WB_SRCS} - ${H5Z_SRCS} + ${H5_SOURCES} + ${H5A_SOURCES} + ${H5AC_SOURCES} + ${H5B_SOURCES} + ${H5B2_SOURCES} + ${H5C_SOURCES} + ${H5CS_SOURCES} + ${H5D_SOURCES} + ${H5E_SOURCES} + ${H5EA_SOURCES} + ${H5F_SOURCES} + ${H5FA_SOURCES} + ${H5FD_SOURCES} + ${H5FL_SOURCES} + ${H5FO_SOURCES} + ${H5FS_SOURCES} + ${H5G_SOURCES} + ${H5HF_SOURCES} + ${H5HG_SOURCES} + ${H5HL_SOURCES} + ${H5HP_SOURCES} + ${H5I_SOURCES} + ${H5L_SOURCES} + ${H5MF_SOURCES} + ${H5MM_SOURCES} + ${H5MP_SOURCES} + ${H5O_SOURCES} + ${H5P_SOURCES} + ${H5PL_SOURCES} + ${H5R_SOURCES} + ${H5UC_SOURCES} + ${H5RS_SOURCES} + ${H5S_SOURCES} + ${H5SL_SOURCES} + ${H5SM_SOURCES} + ${H5ST_SOURCES} + ${H5T_SOURCES} + ${H5TS_SOURCES} + ${H5VM_SOURCES} + ${H5WB_SOURCES} + ${H5Z_SOURCES} ) set (H5_PUBLIC_HEADERS diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2997fe4..aa05983 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -16,17 +16,20 @@ INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR}) #----------------------------------------------------------------------------- # Define Test Library Sources #----------------------------------------------------------------------------- -set (TEST_LIB_SRCS +set (TEST_LIB_SOURCES ${HDF5_TEST_SOURCE_DIR}/h5test.c ${HDF5_TEST_SOURCE_DIR}/testframe.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c + ${HDF5_TEST_SOURCE_DIR}/swmr_common.c ) set (TEST_LIB_HEADERS ${HDF5_TEST_SOURCE_DIR}/h5test.h + ${HDF5_TEST_SOURCE_DIR}/cache_common.h + ${HDF5_TEST_SOURCE_DIR}/swmr_common.h ) -add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS}) +add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS}) TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC " " " ") if (MSVC) target_link_libraries (${HDF5_TEST_LIB_TARGET} "ws2_32.lib") @@ -42,7 +45,7 @@ set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES ) if (BUILD_SHARED_LIBS) - add_library (${HDF5_TEST_LIBSH_TARGET} SHARED ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS}) + add_library (${HDF5_TEST_LIBSH_TARGET} SHARED ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS}) TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED " " " ") if (MSVC) target_link_libraries (${HDF5_TEST_LIBSH_TARGET} "ws2_32.lib") @@ -67,85 +70,6 @@ if (BUILD_SHARED_LIBS) endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- -# Build SWMR test programs -# -# These programs are currently not used in CMake tests but we build them -# here anyway for manual testing and to ensure that the code compiles -# on all platforms. -#----------------------------------------------------------------------------- -MACRO (ADD_H5_SWMR_EXE file) - add_executable (${file} - ${HDF5_TEST_SOURCE_DIR}/${file}.c - ${HDF5_TEST_SOURCE_DIR}/swmr_common.c - ${HDF5_TEST_SOURCE_DIR}/swmr_common.h - ) - TARGET_NAMING (${file} STATIC) - TARGET_C_PROPERTIES (${file} STATIC " " " ") - target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) - set_target_properties (${file} PROPERTIES FOLDER test) - if (BUILD_SHARED_LIBS) - add_executable (${file}-shared - ${HDF5_TEST_SOURCE_DIR}/${file}.c - ${HDF5_TEST_SOURCE_DIR}/swmr_common.c - ${HDF5_TEST_SOURCE_DIR}/swmr_common.h - ) - TARGET_NAMING (${file}-shared SHARED) - TARGET_C_PROPERTIES (${file}-shared SHARED " " " ") - target_link_libraries (${file}-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) - set_target_properties (${file}-shared PROPERTIES FOLDER test) - endif (BUILD_SHARED_LIBS) -ENDMACRO (ADD_H5_SWMR_EXE file) - -set (H5_SWMR_TESTS - swmr_addrem_writer - swmr_check_compat_vfd - swmr_generator - swmr_reader - swmr_remove_reader - swmr_remove_writer - swmr_sparse_reader - swmr_sparse_writer - swmr_start_write - swmr_writer -) - -foreach (test ${H5_SWMR_TESTS}) - ADD_H5_SWMR_EXE(${test}) -endforeach (test ${H5_SWMR_TESTS}) - -#----------------------------------------------------------------------------- -# Build VDS SWMR test programs -# -# These programs are currently not used in CMake tests but we build them -# here anyway for manual testing and to ensure that the code compiles -# on all platforms. -#----------------------------------------------------------------------------- -MACRO (ADD_H5_VDS_SWMR_EXE file) - add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) - TARGET_NAMING (${file} STATIC) - TARGET_C_PROPERTIES (${file} STATIC " " " ") - target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) - set_target_properties (${file} PROPERTIES FOLDER test) - if (BUILD_SHARED_LIBS) - add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c) - TARGET_NAMING (${file}-shared SHARED) - TARGET_C_PROPERTIES (${file}-shared SHARED " " " ") - target_link_libraries (${file}-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) - set_target_properties (${file}-shared PROPERTIES FOLDER test) - endif (BUILD_SHARED_LIBS) -ENDMACRO (ADD_H5_VDS_SWMR_EXE file) - -set (H5_VDS_SWMR_TESTS - vds_swmr_gen - vds_swmr_reader - vds_swmr_writer -) - -foreach (test ${H5_VDS_SWMR_TESTS}) - ADD_H5_VDS_SWMR_EXE(${test}) -endforeach (test ${H5_VDS_SWMR_TESTS}) - -#----------------------------------------------------------------------------- # If plugin library tests can be tested #----------------------------------------------------------------------------- # make plugins dir @@ -215,7 +139,7 @@ endforeach (test ${H5_VDS_SWMR_TESTS}) ) endforeach (test_lib ${TEST2_PLUGIN_LIBS}) -set (testhdf5_SRCS +set (testhdf5_SOURCES ${HDF5_TEST_SOURCE_DIR}/testhdf5.c ${HDF5_TEST_SOURCE_DIR}/tarray.c ${HDF5_TEST_SOURCE_DIR}/tattr.c @@ -244,13 +168,13 @@ set (testhdf5_SRCS ) #-- Adding test for testhdf5 -add_executable (testhdf5 ${testhdf5_SRCS}) +add_executable (testhdf5 ${testhdf5_SOURCES}) TARGET_NAMING (testhdf5 STATIC) TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (testhdf5 PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) - add_executable (testhdf5-shared ${testhdf5_SRCS}) + add_executable (testhdf5-shared ${testhdf5_SOURCES}) TARGET_NAMING (testhdf5-shared SHARED) TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ") target_link_libraries (testhdf5-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) @@ -273,21 +197,27 @@ MACRO (ADD_H5_EXE file) ENDMACRO (ADD_H5_EXE file) set (H5_TESTS - accum + #testhdf5 + cache + cache_api + cache_tagging lheap ohdr stab gheap - cache_logging - cork + farray + earray + btree2 + fheap pool + accum + #hyperslab istore bittests dt_arith dtypes dsets cmpd_dset - chunk_info filter_fail extend external @@ -295,6 +225,7 @@ set (H5_TESTS objcopy links unlink + twriteorder big mtime fillval @@ -304,7 +235,9 @@ set (H5_TESTS app_ref enum set_extent - space_overflow + #ttsafe + enc_dec_plist + enc_dec_plist_cross_platform getname vfd ntypes @@ -315,16 +248,10 @@ set (H5_TESTS freespace mf vds - farray - earray - btree2 - fheap - tcheck_version - testmeta file_image - enc_dec_plist - enc_dec_plist_cross_platform unregister + cache_logging + cork swmr ) @@ -332,54 +259,39 @@ foreach (test ${H5_TESTS}) ADD_H5_EXE(${test}) endforeach (test ${H5_TESTS}) +set (H5_SWMR_TESTS + swmr_addrem_writer + swmr_check_compat_vfd + swmr_generator + swmr_reader + swmr_remove_reader + swmr_remove_writer + swmr_sparse_reader + swmr_sparse_writer + swmr_start_write + swmr_writer +) + +foreach (test ${H5_SWMR_TESTS}) + ADD_H5_EXE(${test}) +endforeach (test ${H5_SWMR_TESTS}) + +set (H5_VDS_SWMR_TESTS + vds_swmr_gen + vds_swmr_reader + vds_swmr_writer +) + +foreach (test ${H5_VDS_SWMR_TESTS}) + ADD_H5_EXE(${test}) +endforeach (test ${H5_VDS_SWMR_TESTS}) + ############################################################################## ############################################################################## ### A D D I T I O N A L T E S T S ### ############################################################################## ############################################################################## -#-- Adding test for cache -add_executable (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) -TARGET_NAMING (cache STATIC) -TARGET_C_PROPERTIES (cache STATIC " " " ") -target_link_libraries (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -set_target_properties (cache PROPERTIES FOLDER test) -if (BUILD_SHARED_LIBS) - add_executable (cache-shared ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) - TARGET_NAMING (cache-shared SHARED) - TARGET_C_PROPERTIES (cache-shared SHARED " " " ") - target_link_libraries (cache-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) - set_target_properties (cache-shared PROPERTIES FOLDER test) -endif (BUILD_SHARED_LIBS) - -#-- Adding test for cache_api -add_executable (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) -TARGET_NAMING (cache_api STATIC) -TARGET_C_PROPERTIES (cache_api STATIC " " " ") -target_link_libraries (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -set_target_properties (cache_api PROPERTIES FOLDER test) -if (BUILD_SHARED_LIBS) - add_executable (cache_api-shared ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) - TARGET_NAMING (cache_api-shared SHARED) - TARGET_C_PROPERTIES (cache_api-shared SHARED " " " ") - target_link_libraries (cache_api-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) - set_target_properties (cache_api-shared PROPERTIES FOLDER test) -endif (BUILD_SHARED_LIBS) - -#-- Adding test for cache_tagging -add_executable (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) -TARGET_NAMING (cache_tagging STATIC) -TARGET_C_PROPERTIES (cache_tagging STATIC " " " ") -target_link_libraries (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -set_target_properties (cache_tagging PROPERTIES FOLDER test) -if (BUILD_SHARED_LIBS) - add_executable (cache_tagging-shared ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c) - TARGET_NAMING (cache_tagging-shared SHARED) - TARGET_C_PROPERTIES (cache_tagging-shared SHARED " " " ") - target_link_libraries (cache_tagging-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) - set_target_properties (cache_tagging-shared PROPERTIES FOLDER test) -endif (BUILD_SHARED_LIBS) - #-- Adding test for hyperslab add_executable (hyperslab ${HDF5_TEST_SOURCE_DIR}/hyperslab.c) TARGET_NAMING (hyperslab STATIC) @@ -432,49 +344,24 @@ if (BUILD_SHARED_LIBS) endif (HDF5_ENABLE_THREADSAFE) endif (BUILD_SHARED_LIBS) -#-- Adding test for err_compat -if (HDF5_ENABLE_DEPRECATED_SYMBOLS) - add_executable (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c) - TARGET_NAMING (err_compat STATIC) - TARGET_C_PROPERTIES (err_compat STATIC " " " ") - target_link_libraries (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) - set_target_properties (err_compat PROPERTIES FOLDER test) - if (BUILD_SHARED_LIBS) - add_executable (err_compat-shared ${HDF5_TEST_SOURCE_DIR}/err_compat.c) - TARGET_NAMING (err_compat-shared SHARED) - TARGET_C_PROPERTIES (err_compat-shared SHARED " " " ") - target_link_libraries (err_compat-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) - set_target_properties (err_compat-shared PROPERTIES FOLDER test) - endif (BUILD_SHARED_LIBS) -endif (HDF5_ENABLE_DEPRECATED_SYMBOLS) - -#-- Adding test for error_test -add_executable (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c) -TARGET_NAMING (error_test STATIC) -TARGET_C_PROPERTIES (error_test STATIC " " " ") -target_link_libraries (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -set_target_properties (error_test PROPERTIES FOLDER test) -if (BUILD_SHARED_LIBS) - add_executable (error_test-shared ${HDF5_TEST_SOURCE_DIR}/error_test.c) - TARGET_NAMING (error_test-shared SHARED) - TARGET_C_PROPERTIES (error_test-shared SHARED " " " ") - target_link_libraries (error_test-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) - set_target_properties (error_test-shared PROPERTIES FOLDER test) -endif (BUILD_SHARED_LIBS) +set (H5_CHECK_TESTS + error_test + err_compat + tcheck_version + testmeta + #accum_swmr_reader + atomic_writer + atomic_reader + links_env + flushrefresh + #use_append_chunk + #use_append_mchunks + #use_disable_mdc_flushes +) -#-- Adding test for links_env -add_executable (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c) -TARGET_NAMING (links_env STATIC) -TARGET_C_PROPERTIES (links_env STATIC " " " ") -target_link_libraries (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -set_target_properties (links_env PROPERTIES FOLDER test) -if (BUILD_SHARED_LIBS) - add_executable (links_env-shared ${HDF5_TEST_SOURCE_DIR}/links_env.c) - TARGET_NAMING (links_env-shared SHARED) - TARGET_C_PROPERTIES (links_env-shared SHARED " " " ") - target_link_libraries (links_env-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) - set_target_properties (links_env-shared PROPERTIES FOLDER test) -endif (BUILD_SHARED_LIBS) +foreach (test ${H5_CHECK_TESTS}) + ADD_H5_EXE(${test}) +endforeach (test ${H5_CHECK_TESTS}) #-- Adding test for accum_swmr_reader # This has to be copied to the test directory for execve() to find it @@ -488,7 +375,7 @@ set_target_properties (accum_swmr_reader PROPERTIES FOLDER test) #-- Set accum dependencies set_target_properties (accum PROPERTIES DEPENDS accum_swmr_reader) if (BUILD_SHARED_LIBS) - set_target_properties (accum-shared PROPERTIES DEPENDS accum_swmr_reader-shared) + set_target_properties (accum-shared PROPERTIES DEPENDS accum_swmr_reader) endif (BUILD_SHARED_LIBS) #-- Adding test for libinfo @@ -520,4 +407,49 @@ else (BUILD_SHARED_LIBS) set_target_properties (plugin PROPERTIES FOLDER test) endif (BUILD_SHARED_LIBS) +############################################################################## +### U S E C A S E S T E S T S +############################################################################## +set (use_append_chunk_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_chunk.c ${HDF5_TEST_SOURCE_DIR}/use_common.c) +add_executable (use_append_chunk ${use_append_chunk_SOURCES}) +TARGET_NAMING (use_append_chunk STATIC) +TARGET_C_PROPERTIES (use_append_chunk STATIC " " " ") +target_link_libraries (use_append_chunk ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +set_target_properties (use_append_chunk PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (use_append_chunk-shared ${use_append_chunk_SOURCES}) + TARGET_NAMING (use_append_chunk-shared SHARED) + TARGET_C_PROPERTIES (use_append_chunk-shared SHARED " " " ") + target_link_libraries (use_append_chunk-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (use_append_chunk-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) + +set (use_append_mchunks_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_append_mchunks.c ${HDF5_TEST_SOURCE_DIR}/use_common.c) +add_executable (use_append_mchunks ${use_append_mchunks_SOURCES}) +TARGET_NAMING (use_append_mchunks STATIC) +TARGET_C_PROPERTIES (use_append_mchunks STATIC " " " ") +target_link_libraries (use_append_mchunks ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +set_target_properties (use_append_mchunks PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (use_append_mchunks-shared ${use_append_mchunks_SOURCES}) + TARGET_NAMING (use_append_mchunks-shared SHARED) + TARGET_C_PROPERTIES (use_append_mchunks-shared SHARED " " " ") + target_link_libraries (use_append_mchunks-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (use_append_mchunks-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) + +set (use_disable_mdc_flushes_SOURCES ${HDF5_TEST_SOURCE_DIR}/use_disable_mdc_flushes.c) +add_executable (use_disable_mdc_flushes ${use_disable_mdc_flushes_SOURCES}) +TARGET_NAMING (use_disable_mdc_flushes STATIC) +TARGET_C_PROPERTIES (use_disable_mdc_flushes STATIC " " " ") +target_link_libraries (use_disable_mdc_flushes ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) +set_target_properties (use_disable_mdc_flushes PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (use_disable_mdc_flushes-shared ${use_disable_mdc_flushes_SOURCES}) + TARGET_NAMING (use_disable_mdc_flushes-shared SHARED) + TARGET_C_PROPERTIES (use_disable_mdc_flushes-shared SHARED " " " ") + target_link_libraries (use_disable_mdc_flushes-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (use_disable_mdc_flushes-shared PROPERTIES FOLDER test) +endif (BUILD_SHARED_LIBS) + include (CMakeTests.cmake) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index fc8fdc3..6f62e9a 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -252,9 +252,9 @@ set (HDF5_REFERENCE_TEST_FILES family_v16_00001.h5 family_v16_00002.h5 family_v16_00003.h5 + file_image_core_test.h5 filespace_1_6.h5 filespace_1_8.h5 - file_image_core_test.h5 fill_old.h5 filter_error.h5 group_old.h5 @@ -417,76 +417,282 @@ endif (HDF5_ENABLE_USING_MEMCHECKER) ############################################################################## ############################################################################## +set (test_CLEANFILES + accum.h5 + cmpd_dset.h5 + compact_dataset.h5 + dataset.h5 + dset_offset.h5 + max_compact_dataset.h5 + simple.h5 + set_local.h5 + random_chunks.h5 + huge_chunks.h5 + chunk_cache.h5 + big_chunk.h5 + chunk_fast.h5 + chunk_expand.h5 + chunk_fixed.h5 + copy_dcpl_newfile.h5 + partial_chunks.h5 + layout_extend.h5 + zero_chunk.h5 + chunk_single.h5 + swmr_non_latest.h5 + earray_hdr_fd.h5 + farray_hdr_fd.h5 + bt2_hdr_fd.h5 + storage_size.h5 + dls_01_strings.h5 + extend.h5 + istore.h5 + extlinks*.h5 + frspace.h5 + links*.h5 + sys_file1 + tfile*.h5 + th5s*.h5 + lheap.h5 + fheap.h5 + ohdr.h5 + stab.h5 + extern_*.h5 + extern_*.raw + gheap*.h5 + dt_arith1 + dt_arith2 + links.h5 + links*.h5 + extlinks16A00000.h5 + extlinks16A00001.h5 + extlinks16A00002.h5 + extlinks16B-b.h5 + extlinks16B-g.h5 + extlinks16B-l.h5 + extlinks16B-r.h5 + extlinks16B-s.h5 + extlinks19B00000.h5 + extlinks19B00001.h5 + extlinks19B00002.h5 + extlinks19B00003.h5 + extlinks19B00004.h5 + extlinks19B00005.h5 + extlinks19B00006.h5 + extlinks19B00007.h5 + extlinks19B00008.h5 + extlinks19B00009.h5 + extlinks19B00010.h5 + extlinks19B00011.h5 + extlinks19B00012.h5 + extlinks19B00013.h5 + extlinks19B00014.h5 + extlinks19B00015.h5 + extlinks19B00016.h5 + extlinks19B00017.h5 + extlinks19B00018.h5 + extlinks19B00019.h5 + extlinks19B00020.h5 + extlinks19B00021.h5 + extlinks19B00022.h5 + extlinks19B00023.h5 + extlinks19B00024.h5 + extlinks19B00025.h5 + extlinks19B00026.h5 + extlinks19B00027.h5 + extlinks19B00028.h5 + tmp + big.data + big*.h5 + stdio.h5 + sec2.h5 + dtypes0.h5 + dtypes1.h5 + dtypes2.h5 + dtypes3.h5 + dtypes4.h5 + dtypes5.h5 + dtypes6.h5 + dtypes7.h5 + dtypes8.h5 + dtypes9.h5 + dtypes10.h5 + dt_arith1.h5 + dt_arith2.h5 + tattr.h5 + tselect.h5 + mtime.h5 + unlink.h5 + unicode.h5 + coord.h5 + fillval_*.h5 + fillval.raw + mount_*.h5 + testmeta.h5 + ttime.h5 + trefer1.h5 + trefer2.h5 + trefer3.h5 + tvltypes.h5 + tvlstr.h5 + tvlstr2.h5 + twriteorder.dat + flush.h5 + enum1.h5 + titerate.h5 + ttsafe.h5 + tarray1.h5 + tgenprop.h5 + tmisc*.h5 + set_extent1.h5 + set_extent2.h5 + set_extent3.h5 + set_extent4.h5 + set_extent5.h5 + ext1.bin + ext2.bin + getname.h5 + getname1.h5 + getname2.h5 + getname3.h5 + sec2_file.h5 + direct_file.h5 + family_file000*.h5 + new_family_v16_000*.h5 + multi_file-r.h5 + multi_file-s.h5 + core_file + plugin.h5 + new_move_a.h5 + new_move_b.h5 + ntypes.h5 + dangle.h5 + error_test.h5 + err_compat.h5 + dtransform.h5 + test_filters.h5 + get_file_name.h5 + tstint1.h5 + tstint2.h5 + unlink_chunked.h5 + btree2.h5 + btree2_tmp.h5 + objcopy_src.h5 + objcopy_dst.h5 + objcopy_ext.dat + trefer1.h5 + trefer2.h5 + app_ref.h5 + farray.h5 + farray_tmp.h5 + earray.h5 + earray_tmp.h5 + efc0.h5 + efc1.h5 + efc2.h5 + efc3.h5 + efc4.h5 + efc5.h5 + log_vfd_out.log + new_multi_file_v16-r.h5 + new_multi_file_v16-s.h5 + split_get_file_image_test-m.h5 + split_get_file_image_test-r.h5 + file_image_core_test.h5.copy + unregister_filter_1.h5 + unregister_filter_2.h5 + vds_virt.h5 + vds_dapl.h5 + vds_src_0.h5 + vds_src_1.h5 + swmr_data.h5 + use_use_append_chunk.h5 + use_append_mchunks.h5 + use_disable_mdc_flushes.h5 + flushrefresh.h5 + flushrefresh_VERIFICATION_START + flushrefresh_VERIFICATION_CHECKPOINT1 + flushrefresh_VERIFICATION_CHECKPOINT2 + flushrefresh_VERIFICATION_DONE + atomic_data + accum_swmr_big.h5 + ohdr_swmr.h5 + test_swmr*.h5 + cache_logging.h5 + cache_logging.out + vds_swmr.h5 + vds_swmr_src_*.h5 +) + # Remove any output file left over from previous test run add_test ( NAME H5TEST-clear-objects COMMAND ${CMAKE_COMMAND} -E remove - dt_arith1.h5 - dt_arith2.h5 - dtransform.h5 - dtypes3.h5 - dtypes4.h5 - dtypes5.h5 - efc0.h5 - efc1.h5 - efc2.h5 - efc3.h5 - efc4.h5 - efc5.h5 - extlinks16A00000.h5 - extlinks16A00001.h5 - extlinks16A00002.h5 - extlinks16B-b.h5 - extlinks16B-g.h5 - extlinks16B-l.h5 - extlinks16B-r.h5 - extlinks16B-s.h5 - extlinks19B00000.h5 - extlinks19B00001.h5 - extlinks19B00002.h5 - extlinks19B00003.h5 - extlinks19B00004.h5 - extlinks19B00005.h5 - extlinks19B00006.h5 - extlinks19B00007.h5 - extlinks19B00008.h5 - extlinks19B00009.h5 - extlinks19B00010.h5 - extlinks19B00011.h5 - extlinks19B00012.h5 - extlinks19B00013.h5 - extlinks19B00014.h5 - extlinks19B00015.h5 - extlinks19B00016.h5 - extlinks19B00017.h5 - extlinks19B00018.h5 - extlinks19B00019.h5 - extlinks19B00020.h5 - extlinks19B00021.h5 - extlinks19B00022.h5 - extlinks19B00023.h5 - extlinks19B00024.h5 - extlinks19B00025.h5 - extlinks19B00026.h5 - extlinks19B00027.h5 - extlinks19B00028.h5 - fheap.h5 - log_vfd_out.log - new_multi_file_v16-r.h5 - new_multi_file_v16-s.h5 - objcopy_ext.dat - testmeta.h5 - tstint1.h5 - tstint2.h5 - unregister_filter_1.h5 - unregister_filter_2.h5 - vds_1.h5 + ${test_CLEANFILES} WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) -foreach (test ${H5_TESTS}) +set (H5TEST_TESTS + #testhdf5 + #cache + cache_api + cache_tagging + lheap + ohdr + stab + gheap + farray + earray + btree2 + fheap + pool + accum + #hyperslab + istore + bittests + dt_arith + dtypes + dsets + cmpd_dset + filter_fail + extend + external + efc + objcopy + links + unlink + twriteorder + big + mtime + fillval + mount + flush1 + flush2 + app_ref + enum + set_extent + ttsafe + enc_dec_plist + enc_dec_plist_cross_platform + getname + vfd + ntypes + dangle + dtransform + reserved + cross_read + freespace + mf + vds + file_image + unregister + cache_logging + cork + swmr +) + +foreach (test ${H5TEST_TESTS}) if (${test} STREQUAL "big" AND CYGWIN) add_test ( NAME H5TEST-${test} @@ -500,12 +706,12 @@ foreach (test ${H5_TESTS}) ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) -endforeach (test ${H5_TESTS}) +endforeach (test ${H5TEST_TESTS}) set_tests_properties (H5TEST-flush2 PROPERTIES DEPENDS H5TEST-flush1) set_tests_properties (H5TEST-fheap PROPERTIES TIMEOUT 1800) -set_tests_properties (H5TEST-testmeta PROPERTIES TIMEOUT 1800) set_tests_properties (H5TEST-big PROPERTIES TIMEOUT 1800) +set_tests_properties (H5TEST-btree2 PROPERTIES TIMEOUT 1800) set_tests_properties (H5TEST-objcopy PROPERTIES TIMEOUT 2400) if (BUILD_SHARED_LIBS) @@ -514,70 +720,12 @@ if (BUILD_SHARED_LIBS) NAME H5TEST-shared-clear-objects COMMAND ${CMAKE_COMMAND} -E remove - dt_arith1.h5 - dt_arith2.h5 - dtransform.h5 - dtypes3.h5 - dtypes4.h5 - dtypes5.h5 - efc0.h5 - efc1.h5 - efc2.h5 - efc3.h5 - efc4.h5 - efc5.h5 - extlinks16A00000.h5 - extlinks16A00001.h5 - extlinks16A00002.h5 - extlinks16B-b.h5 - extlinks16B-g.h5 - extlinks16B-l.h5 - extlinks16B-r.h5 - extlinks16B-s.h5 - extlinks19B00000.h5 - extlinks19B00001.h5 - extlinks19B00002.h5 - extlinks19B00003.h5 - extlinks19B00004.h5 - extlinks19B00005.h5 - extlinks19B00006.h5 - extlinks19B00007.h5 - extlinks19B00008.h5 - extlinks19B00009.h5 - extlinks19B00010.h5 - extlinks19B00011.h5 - extlinks19B00012.h5 - extlinks19B00013.h5 - extlinks19B00014.h5 - extlinks19B00015.h5 - extlinks19B00016.h5 - extlinks19B00017.h5 - extlinks19B00018.h5 - extlinks19B00019.h5 - extlinks19B00020.h5 - extlinks19B00021.h5 - extlinks19B00022.h5 - extlinks19B00023.h5 - extlinks19B00024.h5 - extlinks19B00025.h5 - extlinks19B00026.h5 - extlinks19B00027.h5 - extlinks19B00028.h5 - fheap.h5 - log_vfd_out.log - new_multi_file_v16-r.h5 - new_multi_file_v16-s.h5 - objcopy_ext.dat - testmeta.h5 - tstint1.h5 - tstint2.h5 - unregister_filter_1.h5 - unregister_filter_2.h5 + ${test_CLEANFILES} WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) - foreach (test ${H5_TESTS}) + foreach (test ${H5TEST_TESTS}) if (${test} STREQUAL "big" AND CYGWIN) add_test ( NAME H5TEST-shared-${test} @@ -591,12 +739,12 @@ if (BUILD_SHARED_LIBS) ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) - endforeach (test ${H5_TESTS}) + endforeach (test ${H5TEST_TESTS}) set_tests_properties (H5TEST-shared-flush2 PROPERTIES DEPENDS H5TEST-shared-flush1) set_tests_properties (H5TEST-shared-fheap PROPERTIES TIMEOUT 1800) - set_tests_properties (H5TEST-shared-testmeta PROPERTIES TIMEOUT 1800) set_tests_properties (H5TEST-shared-big PROPERTIES TIMEOUT 1800) + set_tests_properties (H5TEST-shared-btree2 PROPERTIES TIMEOUT 1800) set_tests_properties (H5TEST-shared-objcopy PROPERTIES TIMEOUT 2400) endif (BUILD_SHARED_LIBS) @@ -625,58 +773,6 @@ if (NOT CYGWIN) set_tests_properties (H5TEST-cache PROPERTIES TIMEOUT 2400) endif (NOT CYGWIN) -#-- Adding test for cache_api -add_test ( - NAME H5TEST-clear-cache_api-objects - COMMAND ${CMAKE_COMMAND} - -E remove - cache_api_test.h5 - WORKING_DIRECTORY - ${HDF5_TEST_BINARY_DIR}/H5TEST -) -add_test (NAME H5TEST-cache_api COMMAND $) -set_tests_properties (H5TEST-cache_api PROPERTIES - DEPENDS H5TEST-clear-cache_api-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST -) - -#-- Adding test for cache_tagging -add_test ( - NAME H5TEST-clear-cache_tagging-objects - COMMAND ${CMAKE_COMMAND} - -E remove - tagging_test.h5 - tagging_ext_test.h5 - WORKING_DIRECTORY - ${HDF5_TEST_BINARY_DIR}/H5TEST -) -add_test (NAME H5TEST-cache_tagging COMMAND $) -set_tests_properties (H5TEST-cache_tagging PROPERTIES - DEPENDS H5TEST-clear-cache_tagging-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST -) - -#-- Adding test for ttsafe -add_test ( - NAME H5TEST-clear-ttsafe-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ttsafe_error.h5 - ttsafe_dcreate.h5 - ttsafe_cancel.h5 - ttsafe_acreate.h5 - WORKING_DIRECTORY - ${HDF5_TEST_BINARY_DIR}/H5TEST -) -add_test (NAME H5TEST-ttsafe COMMAND $) -set_tests_properties (H5TEST-ttsafe PROPERTIES - DEPENDS H5TEST-clear-ttsafe-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST -) - #-- Adding test for err_compat if (HDF5_ENABLE_DEPRECATED_SYMBOLS) add_test ( @@ -789,58 +885,6 @@ if (BUILD_SHARED_LIBS) set_tests_properties (H5TEST-shared-cache PROPERTIES TIMEOUT 2400) endif (NOT CYGWIN) - #-- Adding test for cache_api - add_test ( - NAME H5TEST-shared-clear-cache_api-objects - COMMAND ${CMAKE_COMMAND} - -E remove - cache_api_test.h5 - WORKING_DIRECTORY - ${HDF5_TEST_BINARY_DIR}/H5TEST-shared - ) - add_test (NAME H5TEST-shared-cache_api COMMAND $) - set_tests_properties (H5TEST-shared-cache_api PROPERTIES - DEPENDS H5TEST-shared-clear-cache_api-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared - ) - - #-- Adding test for cache_tagging - add_test ( - NAME H5TEST-shared-clear-cache_tagging-objects - COMMAND ${CMAKE_COMMAND} - -E remove - tagging_test.h5 - tagging_ext_test.h5 - WORKING_DIRECTORY - ${HDF5_TEST_BINARY_DIR}/H5TEST-shared - ) - add_test (NAME H5TEST-shared-cache_tagging COMMAND $) - set_tests_properties (H5TEST-shared-cache_tagging PROPERTIES - DEPENDS H5TEST-shared-clear-cache_tagging-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared - ) - - #-- Adding test for ttsafe - add_test ( - NAME H5TEST-shared-clear-ttsafe-objects - COMMAND ${CMAKE_COMMAND} - -E remove - ttsafe_error.h5 - ttsafe_dcreate.h5 - ttsafe_cancel.h5 - ttsafe_acreate.h5 - WORKING_DIRECTORY - ${HDF5_TEST_BINARY_DIR}/H5TEST-shared - ) - add_test (NAME H5TEST-shared-ttsafe COMMAND $) - set_tests_properties (H5TEST-shared-ttsafe PROPERTIES - DEPENDS H5TEST-shared-clear-ttsafe-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared - ) - #-- Adding test for err_compat if (HDF5_ENABLE_DEPRECATED_SYMBOLS) add_test ( @@ -950,6 +994,14 @@ set_tests_properties (H5PLUGIN-plugin PROPERTIES ) ############################################################################## +### S W M R T E S T S +############################################################################## +# testflushrefresh.sh: flushrefresh +# test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes +# testswmr.sh: swmr* +# testvdsswmr.sh: vds_swmr* + +############################################################################## ############################################################################## ### V F D T E S T S ### ############################################################################## @@ -993,7 +1045,7 @@ if (HDF5_TEST_VFD) set_extent ttsafe getname - vfd +# vfd ntypes dangle dtransform @@ -1005,11 +1057,11 @@ if (HDF5_TEST_VFD) earray btree2 #fheap - error_test - err_compat - tcheck_version - testmeta - links_env +# error_test +# err_compat + #tcheck_version +# testmeta +# links_env unregister ) if (NOT CYGWIN) @@ -1177,17 +1229,17 @@ if (HDF5_TEST_VFD) set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10) set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10) set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT 1800) - if (NOT CYGWIN) - set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800) - endif (NOT CYGWIN) +# if (NOT CYGWIN) +# set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800) +# endif (NOT CYGWIN) if (BUILD_SHARED_LIBS) set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared) set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10) set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10) set_tests_properties (VFD-${vfdname}-istore-shared PROPERTIES TIMEOUT 1800) - if (NOT CYGWIN) - set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800) - endif (NOT CYGWIN) +# if (NOT CYGWIN) +# set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800) +# endif (NOT CYGWIN) endif (BUILD_SHARED_LIBS) if (HDF5_TEST_FHEAP_VFD) add_test ( @@ -1256,6 +1308,7 @@ if (HDF5_BUILD_GENERATORS) gen_cross gen_deflate gen_filters + gen_idx gen_new_array gen_new_fill gen_new_group diff --git a/test/atomic_reader.c b/test/atomic_reader.c index 5d9ea68..94d9c74 100644 --- a/test/atomic_reader.c +++ b/test/atomic_reader.c @@ -13,7 +13,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- * - * Created: atomic_reader.c + * Created: atomic_reader.c * * Purpose: This is the "reader" part of the standalone test to check * atomic read-write operation on a system. @@ -28,15 +28,17 @@ /* Headers */ /***********/ -#include -#include -#include -#include #include #include #include #include -#include + +#if !defined(WIN32) && !defined(__MINGW32__) + +#include +#include +#include +#include /****************/ /* Local Macros */ @@ -83,23 +85,23 @@ usage(void) * Function: verify * * Purpose: To verify that the data read is the pattern expected. - * Each integer read should be the same as the index. - * When a difference is encountered, the remaining integers - * read should be the same as the previous index. - * For example, the pattern expected should be either: - * a) 01234567....n-1 - * or - * b) if at index 4, a difference is encountered, - * the remaining integers should be all "3"s as: - * 012333333333333 + * Each integer read should be the same as the index. + * When a difference is encountered, the remaining integers + * read should be the same as the previous index. + * For example, the pattern expected should be either: + * a) 01234567....n-1 + * or + * b) if at index 4, a difference is encountered, + * the remaining integers should be all "3"s as: + * 012333333333333 * * Parameters: - * fd--the file descriptor - * k--the number of integers to read + * fd -- the file descriptor + * k -- the number of integers to read * * Return: - * positive on success - * negative on failure + * positive on success + * negative on failure * *------------------------------------------------------------------------- */ @@ -112,55 +114,57 @@ verify(int fd, unsigned int k) /* Allocate buffer for data read */ if((buf = (unsigned int *)malloc(k * sizeof(unsigned int))) == NULL) { - printf("READER: error from malloc\n"); - goto error; - } + printf("READER: error from malloc\n"); + goto error; + } /* end if */ /* Position the file at the beginning */ if(lseek(fd, (off_t)0, SEEK_SET) < 0) { - printf("READER: error from lseek\n"); - goto error; - } + printf("READER: error from lseek\n"); + goto error; + } /* end if */ /* Read the whole file */ if((bytes_read = read(fd, buf, (k * sizeof(unsigned int)))) < 0) { - printf("READER: error from read\n"); - goto error; - } + printf("READER: error from read\n"); + goto error; + } /* end if */ /* Verify the bytes read are correct */ if(bytes_read != (ssize_t)(k*sizeof(unsigned int))) { - printf("READER: error from bytes read=%lu\n", (unsigned long)bytes_read); - goto error; - } + printf("READER: error from bytes read=%lu\n", (unsigned long)bytes_read); + goto error; + } /* end if */ /* Verify data read */ for(i=0; i < k; i++) { - if(buf[i] != i) - break; - } + if(buf[i] != i) + break; + } /* end for */ if(i < k) { - /* Compare the beginning and ending sentinel values */ - if(buf[k-1] != (i-1)) { - printf("FAIL IN READER: ...beginning sentinel value=%u, i=%u\n", (i-1), i); - printf("FAIL IN READER: buf[%u]=%u\n", i-1, buf[i-1]); - printf("FAIL IN READER: buf[%u]=%u\n", i, buf[i]); - printf("FAIL IN READER: buf[%u]=%u\n", i+1, buf[i+1]); - printf("FAIL IN READER: ...ending sentinel value=%u\n", buf[k-1]); - goto error; - } - } + /* Compare the beginning and ending sentinel values */ + if(buf[k-1] != (i-1)) { + printf("FAIL IN READER: ...beginning sentinel value=%u, i=%u\n", (i-1), i); + printf("FAIL IN READER: buf[%u]=%u\n", i-1, buf[i-1]); + printf("FAIL IN READER: buf[%u]=%u\n", i, buf[i]); + printf("FAIL IN READER: buf[%u]=%u\n", i+1, buf[i+1]); + printf("FAIL IN READER: ...ending sentinel value=%u\n", buf[k-1]); + goto error; + } /* end if */ + } /* end if */ /* Free the buffer */ - if(buf) free(buf); - return(0); + if(buf) + free(buf); + return 0; error: /* Free the buffer */ - if(buf) free(buf); - return(-1); -} /* verify() */ + if(buf) + free(buf); + return -1; +} /* end verify() */ @@ -170,11 +174,11 @@ error: * Purpose: To print the statistics gathered for re-reads * * Parameters: - * info--the array storing the statistics for re-reads - * lastr--the last read completed - * iteration--the current iteration + * info -- the array storing the statistics for re-reads + * lastr -- the last read completed + * iteration -- the current iteration * - * Return: void + * Return: void * *------------------------------------------------------------------------- */ @@ -186,7 +190,7 @@ print_info(int *info, unsigned int lastr, unsigned iteration) printf("--------statistics for %u reads (iteration %u)--------\n", lastr, iteration); for(j = 0; j <= READ_TRIES; j++) - printf("# of %u re-tries = %u\n", j, info[j]); + printf("# of %u re-tries = %u\n", j, info[j]); printf("--------end statistics for %u reads (iteration %u)--------\n", lastr, iteration); } /* print_info() */ @@ -196,12 +200,12 @@ print_info(int *info, unsigned int lastr, unsigned iteration) * Function: main * * Purpose: To verify that the data read is the pattern expected. - * (1) Make sure the file opens successfully and the # of bytes read is as expected - * (2) Iterate the reader with i iterations - * (3) Read and verify n integers for each iteration - * (4) On verification error, re-read the data at most READ_TRIES - * times to see if correct data can be obtained - * (5) Print out statistics for the number of re-retries for each iteration + * (1) Make sure the file opens successfully and the # of bytes read is as expected + * (2) Iterate the reader with i iterations + * (3) Read and verify n integers for each iteration + * (4) On verification error, re-read the data at most READ_TRIES + * times to see if correct data can be obtained + * (5) Print out statistics for the number of re-retries for each iteration * * Note: * (a) The # of integers (via -n option) used by the writer and reader should be the same. @@ -212,27 +216,27 @@ print_info(int *info, unsigned int lastr, unsigned iteration) * 2) Use HDF library HD instead of the system calls * 3) Handle large sized buffer (gigabytes) if needed * - * Return: Success: 0 - * Failure: -1 + * Return: Success: EXIT_SUCCESS + * Failure: EXIT_FAILURE * *------------------------------------------------------------------------- */ int main(int argc, char *argv[]) { - int fd = -1; /* file descriptor */ - unsigned int j=0, i=0, m=0; /* local index variables */ - int temp; /* temporary variable */ - unsigned int iterations = 0; /* the input for "-i" */ - unsigned num = 0; /* the input for "-n" */ - int opt = 0; /* option char */ - int info[READ_TRIES+1]; /* re-tries statistics */ + int fd = -1; /* file descriptor */ + unsigned int j=0, i=0, m=0; /* local index variables */ + int temp; /* temporary variable */ + unsigned int iterations = 0; /* the input for "-i" */ + unsigned num = 0; /* the input for "-n" */ + int opt = 0; /* option char */ + int info[READ_TRIES+1]; /* re-tries statistics */ /* Ensure the expected # of arguments */ if(argc != 5) { usage(); - exit(-1); - } + exit(EXIT_FAILURE); + } /* end if */ /* Parse command line options */ while((opt = getopt(argc, argv, "n:i:")) != -1) { @@ -240,108 +244,120 @@ main(int argc, char *argv[]) case 'n': if((temp = atoi(optarg)) < 0) { usage(); - exit(-1); - } + exit(EXIT_FAILURE); + } /* end if */ num = (unsigned int)temp; break; case 'i': if((temp = atoi(optarg)) < 0) { usage(); - exit(-1); - } + exit(EXIT_FAILURE); + } /* end if */ iterations = (unsigned int)temp; break; default: printf("Invalid option encountered\n"); break; - } - } + } /* end switch */ + } /* end while */ printf("READER: number of integers to read = %u; # of iterations = %d\n", num, iterations); printf("\n"); - for(i = 1; i <= iterations; i++) { /* iteration loop */ - unsigned opens = OPEN_TRIES; - - printf("READER: *****start iteration %u*****\n", i); - - /* Ensure open and file size are done properly */ - while(opens--) { /* open loop */ - struct stat sinfo; - - memset(&sinfo, 0, sizeof(sinfo)); - - if((fd = open(FILENAME, O_RDONLY, 0644)) < 0) { - printf("READER: error from open--retry open again\n"); - } else { - printf("READER: open succeed\n"); - - if((fstat(fd, &sinfo) == 0) && - (sinfo.st_size == (off_t)(num * sizeof(unsigned int)))) { - printf("READER: file size is correct--%u\n", (unsigned int)sinfo.st_size); - break; - } - - printf("READER: error from fstat or file size of %u is incorrect--retry open again\n", (unsigned int)sinfo.st_size); - if(close(fd) < 0) { - printf("READER: error from close\n"); - return(-1); - } - fd = -1; - } - - } /* end while */ - - if(fd < 0) { - printf("READER: *****open failure/incorrect file size for all %u tries, continue next iteration*****\n\n", OPEN_TRIES); - continue; - } - - memset(info, 0, sizeof(info)); - - /* Read and verify data */ - for(j = 1; j <= num; j++) { /* read loop */ - - printf("READER: doing read %u\n", j); - if(verify(fd, num) < 0) { - printf("READER: error from read %u\n", j); - - /* Perform re-read to see if correct data is obtained */ - for(m = 1; m <= READ_TRIES; m++) { /* re-read loop */ - printf("READER: ===============going to do re-read try %u\n", m); - if(verify(fd, num) < 0) - printf("READER: ===============error from re-read try %u\n", m); - else { - ++info[m]; - printf("READER: ===============SUCCESS from re-read try %u\n", m); - break; - } - } /* end for */ - - if(m > READ_TRIES) { - printf("READER: ===============error from all re-read tries: %u\n", READ_TRIES); - printf("READER:*****ERROR--stop on read %u\n", j); - break; - } - } else { - ++info[0]; - printf("READER: success from read %u\n", j); - } - - } /* end for */ - - /* Print the statistics for re-reads */ - print_info(info, j-1, i); - - /* Close the file */ - if(close(fd) < 0) { - printf("READER: error from close\n"); - return(-1); - } - - printf("READER: *****end iteration %u*****\n\n", i); + for(i = 1; i <= iterations; i++) { + unsigned opens = OPEN_TRIES; + + printf("READER: *****start iteration %u*****\n", i); + + /* Ensure open and file size are done properly */ + while(opens--) { + struct stat sinfo; + + memset(&sinfo, 0, sizeof(sinfo)); + + if((fd = open(FILENAME, O_RDONLY, 0644)) < 0) { + printf("READER: error from open--retry open again\n"); + } else { + printf("READER: open succeed\n"); + + if((fstat(fd, &sinfo) == 0) && + (sinfo.st_size == (off_t)(num * sizeof(unsigned int)))) { + printf("READER: file size is correct--%u\n", (unsigned int)sinfo.st_size); + break; + } /* end if */ + + printf("READER: error from fstat or file size of %u is incorrect--retry open again\n", (unsigned int)sinfo.st_size); + if(close(fd) < 0) { + printf("READER: error from close\n"); + return EXIT_FAILURE; + } /* end if */ + fd = -1; + } /* end else */ + + } /* end while */ + + if(fd < 0) { + printf("READER: *****open failure/incorrect file size for all %u tries, continue next iteration*****\n\n", OPEN_TRIES); + continue; + } /* end if */ + + memset(info, 0, sizeof(info)); + + /* Read and verify data */ + for(j = 1; j <= num; j++) { + + printf("READER: doing read %u\n", j); + if(verify(fd, num) < 0) { + printf("READER: error from read %u\n", j); + + /* Perform re-read to see if correct data is obtained */ + for(m = 1; m <= READ_TRIES; m++) { + printf("READER: ===============going to do re-read try %u\n", m); + if(verify(fd, num) < 0) + printf("READER: ===============error from re-read try %u\n", m); + else { + ++info[m]; + printf("READER: ===============SUCCESS from re-read try %u\n", m); + break; + } /* end else */ + } /* end for */ + + if(m > READ_TRIES) { + printf("READER: ===============error from all re-read tries: %u\n", READ_TRIES); + printf("READER:*****ERROR--stop on read %u\n", j); + break; + } /* end if */ + } else { + ++info[0]; + printf("READER: success from read %u\n", j); + } /* end else */ + + } /* end for */ + + /* Print the statistics for re-reads */ + print_info(info, j-1, i); + + /* Close the file */ + if(close(fd) < 0) { + printf("READER: error from close\n"); + return EXIT_FAILURE; + } /* end if */ + + printf("READER: *****end iteration %u*****\n\n", i); } /* end for */ - return(0); + return EXIT_SUCCESS; } + +#else /* WIN32 / MINGW32 */ + +int +main(void) +{ + printf("Non-POSIX platform. Exiting.\n"); + return EXIT_FAILURE; +} /* end main() */ + +#endif /* WIN32 / MINGW32 */ + diff --git a/test/atomic_writer.c b/test/atomic_writer.c index 9f37ecc..ec1e8c9 100644 --- a/test/atomic_writer.c +++ b/test/atomic_writer.c @@ -14,14 +14,14 @@ /*------------------------------------------------------------------------- * - * Created: atomic_writer.c + * Created: atomic_writer.c + * + * Purpose: This is the "writer" part of the standalone test to check + * atomic read-write operation on a system. + * a) atomic_writer.c--the writer (this file) + * b) atomic_reader.c--the reader + * c) atomic_data--the name of the data file used by writer and reader * - * Purpose: This is the "writer" part of the standalone test to check - * atomic read-write operation on a system. - * a) atomic_writer.c--the writer (this file) - * b) atomic_reader.c--the reader - * c) atomic_data--the name of the data file used by writer and reader - * *------------------------------------------------------------------------- */ @@ -29,17 +29,19 @@ /* Headers */ /***********/ -#include -#include -#include -#include -#include #include +#include #include #include #include -#include -#include + +#if !defined(WIN32) && !defined(__MINGW32__) + +#include +#include +#include +#include +#include /****************/ /* Local Macros */ @@ -59,9 +61,9 @@ static void usage(void); * * Purpose: To print information about the command line options * - * Parameters: None + * Parameters: None * - * Return: void + * Return: void * *------------------------------------------------------------------------- */ @@ -81,21 +83,21 @@ usage(void) /*------------------------------------------------------------------------- * Function: main * - * Purpose: To write a series of integers to a file for the reader to verify the data. - * A write is atomic if the whole amount written in one operation is not interleaved - * with data from any other process. - * (1) Iterate with i iterations - * (2) Write a series of integers (0 to n-1) to the file with this pattern: - * offset 0: 0000000000000000000000000000000 - * offset 1: 111111111111111111111111111111 - * offset 2: 22222222222222222222222222222 - * offset 3: 3333333333333333333333333333 - * ... - * ... - * offset n-1: (n-1) + * Purpose: To write a series of integers to a file for the reader to verify the data. + * A write is atomic if the whole amount written in one operation is not interleaved + * with data from any other process. + * (1) Iterate with i iterations + * (2) Write a series of integers (0 to n-1) to the file with this pattern: + * offset 0: 0000000000000000000000000000000 + * offset 1: 111111111111111111111111111111 + * offset 2: 22222222222222222222222222222 + * offset 3: 3333333333333333333333333333 + * ... + * ... + * offset n-1: (n-1) * - * At the end of the writes, the data in the file will be: - * 01234567........(n-1) + * At the end of the writes, the data in the file will be: + * 01234567........(n-1) * * Note: * (a) The # of integers (via -n option) used by the writer and reader should be the same. @@ -105,126 +107,139 @@ usage(void) * 1) Provide default values for n and i and allow user to run with either 0 or 1 option * 2) Use HDF library HD instead of the system calls * 3) Handle large sized buffer (gigabytes) if needed - * - * Return: Success: 0 - * Failure: -1 + * + * Return: Success: EXIT_SUCCESS + * Failure: EXIT_FAILURE * *------------------------------------------------------------------------- */ int main(int argc, char *argv[]) { - int fd = -1; /* file descriptor */ - ssize_t bytes_wrote; /* the nubmer of bytes written */ - unsigned int *buf = NULL; /* buffer to hold written data */ - unsigned int n, u, i; /* local index variable */ - int temp; /* temporary variable */ - unsigned int iterations = 0; /* the input for "-i" */ - unsigned int num = 0; /* the input for "-n" */ - int opt = 0; /* option char */ + int fd = -1; /* file descriptor */ + ssize_t bytes_wrote; /* the nubmer of bytes written */ + unsigned int *buf = NULL; /* buffer to hold written data */ + unsigned int n, u, i; /* local index variable */ + int temp; /* temporary variable */ + unsigned int iterations = 0; /* the input for "-i" */ + unsigned int num = 0; /* the input for "-n" */ + int opt = 0; /* option char */ /* Ensure the # of arguments is as expected */ if(argc != 5) { usage(); - exit(-1); - } + exit(EXIT_FAILURE); + } /* end if */ /* Parse command line options */ while((opt = getopt(argc, argv, "n:i:")) != -1) { - switch(opt) { - case 'n': - if((temp = atoi(optarg)) < 0) { - usage(); - exit(-1); - } - num = (unsigned int)temp; - break; - case 'i': - if((temp = atoi(optarg)) < 0) { - usage(); - exit(-1); - } - iterations = (unsigned int)temp; - break; - default: - printf("Invalid option encountered\n"); - break; - } - } + switch(opt) { + case 'n': + if((temp = atoi(optarg)) < 0) { + usage(); + exit(EXIT_FAILURE); + } /* end if */ + num = (unsigned int)temp; + break; + case 'i': + if((temp = atoi(optarg)) < 0) { + usage(); + exit(EXIT_FAILURE); + } /* end if */ + iterations = (unsigned int)temp; + break; + default: + printf("Invalid option encountered\n"); + break; + } /* end switch */ + } /* end while */ printf("WRITER: # of integers to write = %u; # of iterations = %d\n", num, iterations); /* Remove existing data file if needed */ if(remove(FILENAME) < 0) { - if(errno == ENOENT) - printf("WRITER: remove %s--%s\n", FILENAME, strerror(errno)); - else { - printf("WRITER: error from remove: %d--%s\n", errno, strerror(errno)); - goto error; - } + if(errno == ENOENT) + printf("WRITER: remove %s--%s\n", FILENAME, strerror(errno)); + else { + printf("WRITER: error from remove: %d--%s\n", errno, strerror(errno)); + goto error; + } /* end else */ } else - printf("WRITER: %s is removed\n", FILENAME); + printf("WRITER: %s is removed\n", FILENAME); /* Create the data file */ if((fd = open(FILENAME, O_RDWR|O_TRUNC|O_CREAT, 0664)) < 0) { - printf("WRITER: error from open\n"); - goto error; - } + printf("WRITER: error from open\n"); + goto error; + } /* end if */ /* Allocate buffer for holding data to be written */ if((buf = (unsigned int *)malloc(num * sizeof(unsigned int))) == NULL) { - printf("WRITER: error from malloc\n"); - if(fd >= 0 && close(fd) < 0) - printf("WRITER: error from close\n"); - goto error; - } + printf("WRITER: error from malloc\n"); + if(fd >= 0 && close(fd) < 0) + printf("WRITER: error from close\n"); + goto error; + } /* end if */ printf("\n"); - for(i = 1; i <= iterations; i++) { /* iteration loop */ - printf("WRITER: *****start iteration %u*****\n", i); + for(i = 1; i <= iterations; i++) { + printf("WRITER: *****start iteration %u*****\n", i); - /* Write the series of integers to the file */ - for(n = 0; n < num; n++) { /* write loop */ + /* Write the series of integers to the file */ + for(n = 0; n < num; n++) { - /* Set up data to be written */ - for(u=0; u < num; u++) - buf[u] = n; + /* Set up data to be written */ + for(u=0; u < num; u++) + buf[u] = n; - /* Position the file to the proper location */ - if(lseek(fd, (off_t)(n*sizeof(unsigned int)), SEEK_SET) < 0) { - printf("WRITER: error from lseek\n"); - goto error; - } + /* Position the file to the proper location */ + if(lseek(fd, (off_t)(n*sizeof(unsigned int)), SEEK_SET) < 0) { + printf("WRITER: error from lseek\n"); + goto error; + } /* end if */ - /* Write the data */ - if((bytes_wrote = write(fd, buf, ((num-n) * sizeof(unsigned int)))) < 0) { - printf("WRITER: error from write\n"); - goto error; - } + /* Write the data */ + if((bytes_wrote = write(fd, buf, ((num-n) * sizeof(unsigned int)))) < 0) { + printf("WRITER: error from write\n"); + goto error; + } /* end if */ - /* Verify the bytes written is correct */ - if(bytes_wrote != (ssize_t)((num-n) * sizeof(unsigned int))) { - printf("WRITER: error from bytes written\n"); - goto error; - } - } /* end for */ + /* Verify the bytes written is correct */ + if(bytes_wrote != (ssize_t)((num-n) * sizeof(unsigned int))) { + printf("WRITER: error from bytes written\n"); + goto error; + } /* end if */ + } /* end for */ - printf("WRITER: *****end iteration %u*****\n\n", i); + printf("WRITER: *****end iteration %u*****\n\n", i); } /* end for */ /* Close the file */ if(close(fd) < 0) { - printf("WRITER: error from close\n"); - goto error; - } + printf("WRITER: error from close\n"); + goto error; + } /* end if */ /* Free the buffer */ - if(buf) free(buf); + if(buf) + free(buf); - return(0); + return EXIT_SUCCESS; error: - return(-1); -} /* main() */ + return EXIT_FAILURE; +} /* end main() */ + +#else /* WIN32 / MINGW32 */ + +int +main(void) +{ + printf("Non-POSIX platform. Exiting.\n"); + return EXIT_FAILURE; +} /* end main() */ + +#endif /* WIN32 / MINGW32 */ + diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index 634afe3..9ebed77 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -12,7 +12,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib ) # Define Tests #----------------------------------------------------------------------------- -set (testphdf5_SRCS +set (testphdf5_SOURCES ${HDF5_TEST_PAR_SOURCE_DIR}/testphdf5.c ${HDF5_TEST_PAR_SOURCE_DIR}/t_dset.c ${HDF5_TEST_PAR_SOURCE_DIR}/t_file.c @@ -27,7 +27,7 @@ set (testphdf5_SRCS ) #-- Adding test for testhdf5 -add_executable (testphdf5 ${testphdf5_SRCS}) +add_executable (testphdf5 ${testphdf5_SOURCES}) TARGET_NAMING (testphdf5 STATIC) TARGET_C_PROPERTIES (testphdf5 STATIC " " " ") target_link_libraries (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS}) diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index d8542a4..6dca5f1 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -10,7 +10,7 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR}) # -------------------------------------------------------------------- # Add h5Repack executables # -------------------------------------------------------------------- -set (REPACK_COMMON_SRCS +set (REPACK_COMMON_SOURCES ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_copy.c ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_filters.c ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_opttable.c @@ -20,7 +20,7 @@ set (REPACK_COMMON_SRCS ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack.c ) -add_executable (h5repack ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c) +add_executable (h5repack ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c) TARGET_NAMING (h5repack STATIC) TARGET_C_PROPERTIES (h5repack STATIC " " " ") target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) @@ -38,7 +38,7 @@ if (BUILD_TESTING) target_link_libraries (testh5repack_detect_szip ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (testh5repack_detect_szip PROPERTIES FOLDER tools) - add_executable (h5repacktest ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repacktst.c) + add_executable (h5repacktest ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repacktst.c) TARGET_NAMING (h5repacktest STATIC) TARGET_C_PROPERTIES (h5repacktest STATIC " " " ") target_link_libraries (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index ce1ad34..33c6b02 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -10,7 +10,7 @@ add_definitions (${HDF_EXTRA_C_FLAGS}) # Define Sources #----------------------------------------------------------------------------- -set (H5_TOOLS_LIB_SRCS +set (H5_TOOLS_LIB_SOURCES ${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.c ${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff_array.c ${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff_attr.c @@ -37,7 +37,7 @@ set (H5_TOOLS_LIB_HDRS ${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.h ) -add_library (${HDF5_TOOLS_LIB_TARGET} STATIC ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS}) +add_library (${HDF5_TOOLS_LIB_TARGET} STATIC ${H5_TOOLS_LIB_SOURCES} ${H5_TOOLS_LIB_HDRS}) TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} STATIC " " " ") target_link_libraries (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}") @@ -50,7 +50,7 @@ set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES set (install_targets ${HDF5_TOOLS_LIB_TARGET}) if (BUILD_SHARED_LIBS) - add_library (${HDF5_TOOLS_LIBSH_TARGET} SHARED ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS}) + add_library (${HDF5_TOOLS_LIBSH_TARGET} SHARED ${H5_TOOLS_LIB_SOURCES} ${H5_TOOLS_LIB_HDRS}) TARGET_C_PROPERTIES (${HDF5_TOOLS_LIBSH_TARGET} SHARED " " " ") target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIBSH_TARGET}") diff --git a/tools/perform/CMakeLists.txt b/tools/perform/CMakeLists.txt index 3a60a84..bcb3247 100644 --- a/tools/perform/CMakeLists.txt +++ b/tools/perform/CMakeLists.txt @@ -16,11 +16,11 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib ) # Add the executables # -------------------------------------------------------------------- #-- Adding test for h5perf_serial -set (h5perf_serial_SRCS +set (h5perf_serial_SOURCES ${HDF5_PERFORM_SOURCE_DIR}/sio_perf.c ${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c ) -add_executable (h5perf_serial ${h5perf_serial_SRCS}) +add_executable (h5perf_serial ${h5perf_serial_SOURCES}) TARGET_NAMING (h5perf_serial STATIC) TARGET_C_PROPERTIES (h5perf_serial STATIC " " " ") target_link_libraries (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) @@ -28,11 +28,11 @@ set_target_properties (h5perf_serial PROPERTIES FOLDER perform) if (HDF5_BUILD_PERFORM_STANDALONE) #-- Adding test for h5perf_serial_alone - set (h5perf_serial_alone_SRCS + set (h5perf_serial_alone_SOURCES ${HDF5_PERFORM_SOURCE_DIR}/sio_perf.c ${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c ) - add_executable (h5perf_serial_alone ${h5perf_serial_alone_SRCS}) + add_executable (h5perf_serial_alone ${h5perf_serial_alone_SOURCES}) TARGET_NAMING (h5perf_serial_alone STATIC) TARGET_C_PROPERTIES (h5perf_serial_alone STATIC " " " ") target_link_libraries (h5perf_serial_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) @@ -43,30 +43,30 @@ if (HDF5_BUILD_PERFORM_STANDALONE) endif (HDF5_BUILD_PERFORM_STANDALONE) #-- Adding test for chunk -set (chunk_SRCS +set (chunk_SOURCES ${HDF5_PERFORM_SOURCE_DIR}/chunk.c ) -ADD_EXECUTABLE(chunk ${chunk_SRCS}) +ADD_EXECUTABLE(chunk ${chunk_SOURCES}) TARGET_NAMING (chunk STATIC) TARGET_C_PROPERTIES (chunk STATIC " " " ") TARGET_LINK_LIBRARIES(chunk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (chunk PROPERTIES FOLDER perform) #-- Adding test for iopipe -set (iopipe_SRCS +set (iopipe_SOURCES ${HDF5_PERFORM_SOURCE_DIR}/iopipe.c ) -add_executable (iopipe ${iopipe_SRCS}) +add_executable (iopipe ${iopipe_SOURCES}) TARGET_NAMING (iopipe STATIC) TARGET_C_PROPERTIES (iopipe STATIC " " " ") target_link_libraries (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (iopipe PROPERTIES FOLDER perform) #-- Adding test for overhead -set (overhead_SRCS +set (overhead_SOURCES ${HDF5_PERFORM_SOURCE_DIR}/overhead.c ) -add_executable (overhead ${overhead_SRCS}) +add_executable (overhead ${overhead_SOURCES}) TARGET_NAMING (overhead STATIC) TARGET_C_PROPERTIES (overhead STATIC " " " ") target_link_libraries (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) @@ -74,10 +74,10 @@ set_target_properties (overhead PROPERTIES FOLDER perform) if (BUILD_TESTING) #-- Adding test for perf_meta - set (perf_meta_SRCS + set (perf_meta_SOURCES ${HDF5_PERFORM_SOURCE_DIR}/perf_meta.c ) - add_executable (perf_meta ${perf_meta_SRCS}) + add_executable (perf_meta ${perf_meta_SOURCES}) TARGET_NAMING (perf_meta STATIC) TARGET_C_PROPERTIES (perf_meta STATIC " " " ") target_link_libraries (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) @@ -85,10 +85,10 @@ if (BUILD_TESTING) endif (BUILD_TESTING) #-- Adding test for zip_perf -set (zip_perf_SRCS +set (zip_perf_SOURCES ${HDF5_PERFORM_SOURCE_DIR}/zip_perf.c ) -add_executable (zip_perf ${zip_perf_SRCS}) +add_executable (zip_perf ${zip_perf_SOURCES}) TARGET_NAMING (zip_perf STATIC) TARGET_C_PROPERTIES (zip_perf STATIC " " " ") target_link_libraries (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) @@ -96,11 +96,11 @@ set_target_properties (zip_perf PROPERTIES FOLDER perform) if (H5_HAVE_PARALLEL AND BUILD_TESTING) #-- Adding test for h5perf - set (h5perf_SRCS + set (h5perf_SOURCES ${HDF5_PERFORM_SOURCE_DIR}/pio_perf.c ${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c ) - add_executable (h5perf ${h5perf_SRCS}) + add_executable (h5perf ${h5perf_SOURCES}) TARGET_NAMING (h5perf STATIC) TARGET_C_PROPERTIES (h5perf STATIC " " " ") target_link_libraries (h5perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) @@ -108,11 +108,11 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING) if (HDF5_BUILD_PERFORM_STANDALONE) #-- Adding test for h5perf - set (h5perf_alone_SRCS + set (h5perf_alone_SOURCES ${HDF5_PERFORM_SOURCE_DIR}/pio_perf.c ${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c ) - add_executable (h5perf_alone ${h5perf_alone_SRCS}) + add_executable (h5perf_alone ${h5perf_alone_SOURCES}) TARGET_NAMING (h5perf_alone STATIC) TARGET_C_PROPERTIES (h5perf_alone STATIC " " " ") target_link_libraries (h5perf_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -- cgit v0.12