Merge branch 'develop' into h5do_direct_chunk_hl_to_src

This commit is contained in:
Dana Robinson 2018-04-30 15:22:09 -07:00
commit 64e13ca220
103 changed files with 2737 additions and 2892 deletions

View File

@ -23,16 +23,6 @@ if (WIN32)
find_program (WIX_EXECUTABLE candle PATHS "${CPACK_WIX_ROOT}/bin")
endif ()
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
if (NOT HDF5_INSTALL_NO_DEVELOPMENT)
install (
FILES ${PROJECT_BINARY_DIR}/H5pubconf.h
DESTINATION ${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT headers
)
endif ()
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5 C CXX)
project (HDF5 C)
#-----------------------------------------------------------------------------
# Instructions for use : Normal Build
@ -554,11 +554,6 @@ endif ()
include (${HDF_RESOURCES_DIR}/HDFCompilerFlags.cmake)
#-----------------------------------------------------------------------------
# All libs/tests/examples need the main include directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR} ${HDF5_SRC_DIR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
#-----------------------------------------------------------------------------
# Option to Enable MPI Parallel
#-----------------------------------------------------------------------------

View File

@ -1,31 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_CPP)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
add_definitions (${HDF_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Generate configure file
#-----------------------------------------------------------------------------
configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in
${HDF5_BINARY_DIR}/H5cxx_pubconf.h
)
#-----------------------------------------------------------------------------
# Setup Include directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_CPP_SOURCE_DIR}/src)
INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR})
#-----------------------------------------------------------------------------
# Parallel/MPI, prevent spurious cpp/cxx warnings
#-----------------------------------------------------------------------------
if (H5_HAVE_PARALLEL)
add_definitions ("-DMPICH_SKIP_MPICXX")
add_definitions ("-DMPICH_IGNORE_CXX_SEEK")
endif ()
project (HDF5_CPP CXX)
add_subdirectory (src)

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_CPP_EXAMPLES)
project (HDF5_CPP_EXAMPLES CXX)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
@ -34,6 +34,7 @@ set (tutr_examples
foreach (example ${examples})
add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
set_property(TARGET cpp_ex_${example} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (cpp_ex_${example} STATIC " " " ")
target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
@ -41,6 +42,7 @@ endforeach ()
foreach (example ${tutr_examples})
add_executable (cpp_ex_${example} ${HDF5_CPP_EXAMPLES_SOURCE_DIR}/${example}.cpp)
set_property(TARGET cpp_ex_${example} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (cpp_ex_${example} STATIC " " " ")
target_link_libraries (cpp_ex_${example} ${HDF5_CPP_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)

View File

@ -1,5 +1,18 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_CPP_SRC)
project (HDF5_CPP_SRC CXX)
#-----------------------------------------------------------------------------
# Parallel/MPI, prevent spurious cpp/cxx warnings
#-----------------------------------------------------------------------------
if (H5_HAVE_PARALLEL)
add_definitions ("-DMPICH_SKIP_MPICXX")
add_definitions ("-DMPICH_IGNORE_CXX_SEEK")
endif ()
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
add_definitions (${HDF_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Generate configure file
@ -83,6 +96,7 @@ set (CPP_HDRS
)
add_library (${HDF5_CPP_LIB_TARGET} STATIC ${CPP_SOURCES} ${CPP_HDRS})
set_property(TARGET ${HDF5_CPP_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_CPP_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIB_TARGET}")
@ -95,6 +109,7 @@ set (install_targets ${HDF5_CPP_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_CPP_LIBSH_TARGET} SHARED ${CPP_SOURCES} ${CPP_HDRS})
set_property(TARGET ${HDF5_CPP_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_CPP_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_CPP_LIBSH_TARGET}")

View File

@ -1,5 +1,19 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_CPP_TEST)
project (HDF5_CPP_TEST CXX)
#-----------------------------------------------------------------------------
# Parallel/MPI, prevent spurious cpp/cxx warnings
#-----------------------------------------------------------------------------
if (H5_HAVE_PARALLEL)
add_definitions ("-DMPICH_SKIP_MPICXX")
add_definitions ("-DMPICH_IGNORE_CXX_SEEK")
endif ()
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
add_definitions (${HDF_EXTRA_C_FLAGS})
# --------------------------------------------------------------------
# Notes: When creating unit test executables they should be prefixed
# with "cpp_". This allows for easier filtering of the test suite when
@ -37,6 +51,7 @@ 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_SOURCES} )
set_property(TARGET cpp_testhdf5 APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR}")
TARGET_C_PROPERTIES (cpp_testhdf5 STATIC " " " ")
target_link_libraries (cpp_testhdf5
${HDF5_CPP_LIB_TARGET}

View File

@ -254,18 +254,3 @@ H5ConversionTests (H5_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting
# Check if pointer alignments are enforced
#
H5ConversionTests (H5_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced")
# -----------------------------------------------------------------------
# wrapper script variables
#
set (prefix ${CMAKE_INSTALL_PREFIX})
set (exec_prefix "\${prefix}")
set (libdir "${exec_prefix}/lib")
set (includedir "\${prefix}/include")
set (host_os ${CMAKE_HOST_SYSTEM_NAME})
set (CC ${CMAKE_C_COMPILER})
set (CXX ${CMAKE_CXX_COMPILER})
set (FC ${CMAKE_Fortran_COMPILER})
foreach (LINK_LIB ${LINK_LIBS})
set (LIBS "${LIBS} -l${LINK_LIB}")
endforeach ()

View File

@ -50,8 +50,10 @@ if (HDF5_DISABLE_COMPILER_WARNINGS)
set (HDF5_WARNINGS_BLOCKED 1)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W0")
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0")
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0")
endif ()
endif ()
if (WIN32)
add_definitions (-D_CRT_SECURE_NO_WARNINGS)
@ -65,7 +67,9 @@ if (HDF5_DISABLE_COMPILER_WARNINGS)
# Most compilers use -w to suppress warnings.
if (NOT HDF5_WARNINGS_BLOCKED)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
endif ()
endif ()
endif ()
@ -212,13 +216,17 @@ if (HDF5_ENABLE_ALL_WARNINGS)
if (HDF5_ENABLE_DEV_WARNINGS)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Wall /wd4668")
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall /wd4668")
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall /wd4668")
endif ()
else ()
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
endif ()
endif ()
else ()
if (CMAKE_COMPILER_IS_GNUCC)
@ -235,8 +243,10 @@ if (HDF5_ENABLE_GROUPZERO_WARNINGS)
if (MSVC)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W1")
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W1")
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W1")
endif ()
else ()
if (CMAKE_COMPILER_IS_GNUCC)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic")
@ -252,8 +262,10 @@ if (HDF5_ENABLE_GROUPONE_WARNINGS)
if (MSVC)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W2")
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W2")
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W2")
endif ()
else ()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS1}")
endif ()
@ -267,8 +279,10 @@ if (HDF5_ENABLE_GROUPTWO_WARNINGS)
if (MSVC)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
endif ()
else ()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS2}")
endif ()
@ -282,8 +296,10 @@ if (HDF5_ENABLE_GROUPTHREE_WARNINGS)
if (MSVC)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
string (REGEX REPLACE "(^| )([/-])W[0-9]( |$)" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif ()
else ()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${H5_CFLAGS3}")
endif ()

View File

@ -14,7 +14,6 @@
#-----------------------------------------------------------------------------
include (CheckFunctionExists)
include (CheckIncludeFile)
include (CheckIncludeFileCXX)
include (CheckIncludeFiles)
include (CheckLibraryExists)
include (CheckSymbolExists)
@ -23,6 +22,7 @@ include (CheckVariableExists)
include (CheckFortranFunctionExists)
include (TestBigEndian)
if (CMAKE_CXX_COMPILER AND CMAKE_CXX_COMPILER_LOADED)
include (CheckIncludeFileCXX)
include (TestForSTDNamespace)
endif ()

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_EXAMPLES)
project (HDF5_EXAMPLES C)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
@ -46,11 +46,13 @@ set (examples
foreach (example ${examples})
add_executable (${example} ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
set_property(TARGET ${example} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${example} STATIC " " " ")
target_link_libraries (${example} ${HDF5_LIB_TARGET})
set_target_properties (${example} PROPERTIES FOLDER examples)
if (BUILD_SHARED_LIBS)
add_executable (${example}-shared ${HDF5_EXAMPLES_SOURCE_DIR}/${example}.c)
set_property(TARGET ${example}-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${example}-shared SHARED " " " ")
target_link_libraries (${example}-shared ${HDF5_LIBSH_TARGET})
set_target_properties (${example}-shared PROPERTIES FOLDER examples)
@ -59,11 +61,13 @@ endforeach ()
if (H5_HAVE_PARALLEL)
add_executable (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
set_property(TARGET ph5example APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (ph5example STATIC " " " ")
target_link_libraries (ph5example ${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES})
set_target_properties (ph5example PROPERTIES FOLDER examples)
if (BUILD_SHARED_LIBS)
add_executable (ph5example-shared ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
set_property(TARGET ph5example-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (ph5example-shared SHARED " " " ")
target_link_libraries (ph5example-shared ${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES})
set_target_properties (ph5example-shared PROPERTIES FOLDER examples)

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_F90 C CXX Fortran)
project (HDF5_F90 C Fortran)
if (H5_HAVE_PARALLEL)
if (MPI_Fortran_LINK_FLAGS)

View File

@ -1,15 +1,10 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_F90_EXAMPLES C CXX Fortran)
project (HDF5_F90_EXAMPLES C Fortran)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
# with "f90_ex_". This allows for easier filtering of the examples.
# --------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
@ -46,6 +41,7 @@ foreach (example ${examples})
${HDF5_LIB_TARGET}
)
target_include_directories (f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_property(TARGET f90_ex_${example} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
set_target_properties (f90_ex_${example} PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/fortran
@ -59,6 +55,7 @@ foreach (example ${examples})
${HDF5_LIBSH_TARGET}
)
target_include_directories (f90_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
set_property(TARGET f90_ex_${example}-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
set_target_properties (f90_ex_${example}-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/fortran
@ -75,6 +72,7 @@ foreach (example ${F2003_examples})
${HDF5_LIB_TARGET}
)
target_include_directories (f03_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_property(TARGET f03_ex_${example} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
set_target_properties (f03_ex_${example} PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/fortran03
@ -88,6 +86,7 @@ foreach (example ${F2003_examples})
${HDF5_LIBSH_TARGET}
)
target_include_directories (f03_ex_${example}-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
set_property(TARGET f03_ex_${example}-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
set_target_properties (f03_ex_${example}-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/fortran03
@ -104,6 +103,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
${HDF5_LIB_TARGET}
)
target_include_directories (f90_ex_ph5example PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_property(TARGET f90_ex_ph5example APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
set_target_properties (f90_ex_ph5example PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/fortran
@ -117,6 +117,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
${HDF5_LIBSH_TARGET}
)
target_include_directories (f90_ex_ph5example-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
set_property(TARGET f90_ex_ph5example-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
set_target_properties (f90_ex_ph5example-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/fortran

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
project (HDF5_F90_SRC C CXX Fortran)
project (HDF5_F90_SRC C Fortran)
#-----------------------------------------------------------------------------
# configure def file for shared libs on windows
@ -32,7 +32,7 @@ if (HAVE_FLOAT128)
set (CMAKE_H5_HAVE_FLOAT128 1)
endif ()
configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${CMAKE_BINARY_DIR}/H5config_f.inc @ONLY)
configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${HDF5_F90_BINARY_DIR}/H5config_f.inc @ONLY)
configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.in ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h @ONLY)
set (Fortran_COMPILER_ID CMAKE_Fortran_COMPILER_ID)
@ -46,7 +46,7 @@ set (Fortran_COMPILER_ID CMAKE_Fortran_COMPILER_ID)
add_executable (H5_buildiface
${HDF5_F90_SRC_SOURCE_DIR}/H5_buildiface.F90
)
target_include_directories(H5_buildiface PRIVATE "${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}")
if (WIN32 AND MSVC)
if (BUILD_SHARED_LIBS)
set_target_properties (H5_buildiface
@ -71,13 +71,12 @@ endif ()
file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static")
set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE})
INCLUDE_DIRECTORIES (${HDF5_F90_SOURCE_DIR} ${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY})
#-----------------------------------------------------------------------------
add_executable (H5match_types
${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
)
target_include_directories(H5match_types PRIVATE "${HDF5_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR}")
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
@ -132,7 +131,7 @@ set (f90CStub_C_SHHDRS
)
add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS})
target_include_directories(${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/static)
set_property(TARGET ${HDF5_F90_C_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}")
@ -146,7 +145,7 @@ set (install_targets ${HDF5_F90_C_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_SHHDRS})
target_include_directories(${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/shared)
set_property(TARGET ${HDF5_F90_C_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIBSH_TARGET}")
@ -250,7 +249,7 @@ set (SHARED_LINK_FLAGS " ")
TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_F90_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET})
target_link_libraries (${HDF5_F90_LIB_TARGET} PRIVATE ${LINK_Fortran_LIBS})
target_include_directories (${HDF5_F90_LIB_TARGET} PUBLIC ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
target_include_directories (${HDF5_F90_LIB_TARGET} PUBLIC "${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR}")
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
target_include_directories (${HDF5_F90_LIB_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
endif ()
@ -279,7 +278,7 @@ if (BUILD_SHARED_LIBS)
TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS})
target_link_libraries (${HDF5_F90_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET})
target_link_libraries (${HDF5_F90_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS})
target_include_directories (${HDF5_F90_LIBSH_TARGET} PUBLIC ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
target_include_directories (${HDF5_F90_LIBSH_TARGET} PUBLIC "${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR}")
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
target_include_directories (${HDF5_F90_LIBSH_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
endif ()

View File

@ -1,10 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_FORTRAN_TESTS_SOURCE_DIR} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
project (HDF5_FORTRAN_TESTS C Fortran)
#-----------------------------------------------------------------------------
# Setup the Fortran auto-detection utilities
@ -14,7 +9,7 @@ INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_FORTRAN_TESTS_SOUR
add_executable (H5_test_buildiface
${HDF5_F90_SRC_DIR}/test/H5_test_buildiface.F90
)
target_include_directories(H5_test_buildiface PRIVATE ${HDF5_BINARY_DIR} ${HDF5_F90_BINARY_DIR})
if (WIN32 AND MSVC)
if (BUILD_SHARED_LIBS)
set_target_properties (H5_test_buildiface
@ -44,7 +39,7 @@ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE
#-----------------------------------------------------------------------------
add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c)
set_source_files_properties (t.c PROPERTIES LANGUAGE C)
target_include_directories(${HDF5_F90_C_TEST_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/static)
set_property(TARGET ${HDF5_F90_C_TEST_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET}
${HDF5_F90_C_LIB_TARGET}
@ -58,7 +53,7 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
)
if (BUILD_SHARED_LIBS)
add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c)
target_include_directories(${HDF5_F90_C_TEST_LIBSH_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/shared)
set_property(TARGET ${HDF5_F90_C_TEST_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET}
${HDF5_F90_C_LIBSH_TARGET}
@ -128,6 +123,7 @@ target_link_libraries (${HDF5_F90_TEST_LIB_TARGET}
)
H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} STATIC 0)
target_include_directories (${HDF5_F90_TEST_LIB_TARGET} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
set_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES
FOLDER libraries/test/fortran
LINKER_LANGUAGE Fortran
@ -155,6 +151,7 @@ if (BUILD_SHARED_LIBS)
)
H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_TEST_LIB_NAME} SHARED "F")
target_include_directories (${HDF5_F90_TEST_LIBSH_TARGET} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
set_target_properties (${HDF5_F90_TEST_LIBSH_TARGET} PROPERTIES
FOLDER libraries/test/fortran
LINKER_LANGUAGE Fortran
@ -203,6 +200,7 @@ if (WIN32 AND MSVC)
target_link_libraries (testhdf5_fortran "ws2_32.lib")
endif ()
target_include_directories (testhdf5_fortran PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_property(TARGET testhdf5_fortran APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
set_target_properties (testhdf5_fortran PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@ -238,6 +236,7 @@ if (BUILD_SHARED_LIBS)
target_link_libraries (testhdf5_fortran-shared "ws2_32.lib")
endif ()
target_include_directories (testhdf5_fortran-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
set_property(TARGET testhdf5_fortran-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
set_target_properties (testhdf5_fortran-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@ -265,6 +264,7 @@ if (WIN32 AND MSVC)
target_link_libraries (testhdf5_fortran_1_8 "ws2_32.lib")
endif ()
target_include_directories (testhdf5_fortran_1_8 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
set_target_properties (testhdf5_fortran_1_8 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@ -291,6 +291,7 @@ if (BUILD_SHARED_LIBS)
target_link_libraries (testhdf5_fortran_1_8-shared "ws2_32.lib")
endif ()
target_include_directories (testhdf5_fortran_1_8-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
set_property(TARGET testhdf5_fortran_1_8-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
set_target_properties (testhdf5_fortran_1_8-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@ -320,6 +321,7 @@ if (WIN32 AND MSVC)
target_link_libraries (fortranlib_test_F03 "ws2_32.lib")
endif ()
target_include_directories (fortranlib_test_F03 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_property(TARGET fortranlib_test_F03 APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
set_target_properties (fortranlib_test_F03 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@ -349,6 +351,7 @@ if (BUILD_SHARED_LIBS)
endif ()
target_include_directories (fortranlib_test_F03-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
set_property(TARGET fortranlib_test_F03-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
set_target_properties (fortranlib_test_F03-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran)
project (HDF5_FORTRAN_TESTPAR C Fortran)
#-----------------------------------------------------------------------------
# Setup include Directories

View File

@ -1,16 +1,9 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL C CXX)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
add_definitions (${HDF_EXTRA_C_FLAGS})
project (HDF5_HL C)
#-----------------------------------------------------------------------------
# List Source files
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_HL_SOURCE_DIR}/src )
add_subdirectory (src)

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_CPP)
project (HDF5_HL_CPP CXX)
#-----------------------------------------------------------------------------
# Main HL lib is in /src

View File

@ -1,16 +1,11 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_CPP_EXAMPLES)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src)
INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_DIR}/src)
project (HDF5_HL_CPP_EXAMPLES CXX)
# --------------------------------------------------------------------
# Add in the examples for the Packet Table codes
# --------------------------------------------------------------------
add_executable (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp)
set_property(TARGET ptExampleFL APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (ptExampleFL STATIC " " " ")
target_link_libraries (
ptExampleFL

View File

@ -1,16 +1,15 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_CPP_SRC)
project (HDF5_HL_CPP_SRC CXX)
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src)
INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_SOURCE_DIR})
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_SOURCES})
set_property(TARGET ${HDF5_HL_CPP_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_HL_CPP_LIB_TARGET} PUBLIC ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIB_TARGET}")
@ -23,6 +22,7 @@ set (install_targets ${HDF5_HL_CPP_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_HL_CPP_LIBSH_TARGET} SHARED ${HDF5_HL_CPP_SOURCES})
set_property(TARGET ${HDF5_HL_CPP_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_HL_CPP_LIBSH_TARGET} PUBLIC ${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIBSH_TARGET}")

View File

@ -1,21 +1,8 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_CPP_TEST)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/src)
INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/c++/src)
# --------------------------------------------------------------------
# Add in the unit tests for the packet table c++ wrapper
# --------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/test)
INCLUDE_DIRECTORIES (${HDF5_CPP_SRC_DIR}/src)
project (HDF5_HL_CPP_TEST CXX)
add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
set_property(TARGET hl_ptableTest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_HL_SRC_DIR}/test;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (hl_ptableTest STATIC " " " ")
target_link_libraries (
hl_ptableTest

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_EXAMPLES )
project (HDF5_HL_EXAMPLES C)
#-----------------------------------------------------------------------------
# Define Sources
@ -28,6 +28,7 @@ set (examples
foreach (example ${examples})
add_executable (hl_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.c)
set_property(TARGET hl_ex_${example} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (hl_ex_${example} STATIC " " " ")
target_link_libraries (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (hl_ex_${example} PROPERTIES FOLDER examples/hl)

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_F90 C CXX Fortran)
project (HDF5_HL_F90 C Fortran)
#-----------------------------------------------------------------------------
# List Source files

View File

@ -1,13 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_F90_EXAMPLES C CXX Fortran)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (
${HDF5_F90_BINARY_DIR}
${HDF5_F90_SRC_DIR}/src
)
project (HDF5_HL_F90_EXAMPLES C Fortran)
set (examples
exlite
@ -23,6 +15,7 @@ foreach (example ${examples})
${HDF5_LIB_TARGET}
)
target_include_directories (hl_f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_property(TARGET hl_f90_ex_${example} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
set_target_properties (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran)

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
project (HDF5_HL_F90_SRC C CXX Fortran)
project (HDF5_HL_F90_SRC C Fortran)
#-----------------------------------------------------------------------------
# configure def file for shared libs on windows
@ -18,7 +18,7 @@ endif ()
add_executable (H5HL_buildiface
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5HL_buildiface.F90
)
target_include_directories(H5HL_buildiface PRIVATE "${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}")
if (WIN32 AND MSVC)
if (BUILD_SHARED_LIBS)
set_target_properties (H5HL_buildiface
@ -43,18 +43,6 @@ endif ()
file (MAKE_DIRECTORY "${HDF5_HL_F90_BINARY_DIR}/static")
set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE})
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (
${HDF5_HL_SRC_DIR}/src
${HDF5_F90_SRC_DIR}/src
${HDF5_HL_F90_SRC_SOURCE_DIR}
${HDF5_F90_BINARY_DIR}
${CMAKE_Fortran_MODULE_DIRECTORY}
${MOD_BUILD_DIR}
)
#-----------------------------------------------------------------------------
# hl_f90CStub lib
#-----------------------------------------------------------------------------
@ -70,7 +58,8 @@ 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_SOURCES} ${HDF5_HL_F90_HEADERS})
target_include_directories(${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/static)
target_include_directories(${HDF5_HL_F90_C_LIB_TARGET} PUBLIC "${HDF5_F90_BINARY_DIR}/static")
set_property(TARGET ${HDF5_HL_F90_C_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} PUBLIC ${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}")
@ -84,7 +73,8 @@ set (install_targets ${HDF5_HL_F90_C_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED ${HDF5_HL_F90_C_SOURCES} ${HDF5_HL_F90_HEADERS})
target_include_directories(${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_F90_BINARY_DIR}/shared)
target_include_directories(${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC "${HDF5_F90_BINARY_DIR}/shared")
set_property(TARGET ${HDF5_HL_F90_C_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} PUBLIC ${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}")
@ -165,10 +155,11 @@ endif ()
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} PUBLIC ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
target_include_directories (${HDF5_HL_F90_LIB_TARGET} PUBLIC ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
target_include_directories (${HDF5_HL_F90_LIB_TARGET} PUBLIC "${CMAKE_Fortran_MODULE_DIRECTORY}/static")
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
target_include_directories (${HDF5_HL_F90_LIB_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
endif ()
set_property(TARGET ${HDF5_HL_F90_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR}")
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} STATIC 0)
set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES
@ -194,7 +185,8 @@ if (BUILD_SHARED_LIBS)
TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS})
target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} PUBLIC ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET})
target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS})
target_include_directories (${HDF5_HL_F90_LIBSH_TARGET} PUBLIC ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
target_include_directories (${HDF5_HL_F90_LIBSH_TARGET} PUBLIC "${CMAKE_Fortran_MODULE_DIRECTORY}/shared")
set_property(TARGET ${HDF5_HL_F90_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR}")
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
target_include_directories (${HDF5_HL_F90_LIBSH_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
endif ()

View File

@ -1,16 +1,16 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran)
project (HDF5_HL_FORTRAN_TESTS C Fortran)
#-----------------------------------------------------------------------------
# Add Tests
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
#-- Adding test for hl_f90_tstds
add_executable (hl_f90_tstds tstds.F90)
TARGET_FORTRAN_PROPERTIES (hl_f90_tstds STATIC " " " ")
target_link_libraries (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
target_include_directories (hl_f90_tstds PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_property(TARGET hl_f90_tstds APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
set_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran)
if (BUILD_SHARED_LIBS)
@ -18,6 +18,7 @@ if (BUILD_SHARED_LIBS)
TARGET_FORTRAN_PROPERTIES (hl_f90_tstds-shared SHARED " " " ")
target_link_libraries (hl_f90_tstds-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET})
target_include_directories (hl_f90_tstds-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
set_property(TARGET hl_f90_tstds-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
set_target_properties (hl_f90_tstds-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/hl/fortran
@ -30,6 +31,7 @@ add_executable (hl_f90_tstlite tstlite.F90)
TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite STATIC " " " ")
target_link_libraries (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET})
target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_property(TARGET hl_f90_tstlite APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
set_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran)
if (BUILD_SHARED_LIBS)
@ -37,6 +39,7 @@ if (BUILD_SHARED_LIBS)
TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite-shared SHARED " " " ")
target_link_libraries (hl_f90_tstlite-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET})
target_include_directories (hl_f90_tstlite-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
set_property(TARGET hl_f90_tstlite-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
set_target_properties (hl_f90_tstlite-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/hl/fortran
@ -49,6 +52,7 @@ add_executable (hl_f90_tstimage tstimage.F90)
TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage STATIC " " " ")
target_link_libraries (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
target_include_directories (hl_f90_tstimage PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_property(TARGET hl_f90_tstimage APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
set_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran)
if (BUILD_SHARED_LIBS)
@ -56,6 +60,7 @@ if (BUILD_SHARED_LIBS)
TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage-shared SHARED " " " ")
target_link_libraries (hl_f90_tstimage-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET})
target_include_directories (hl_f90_tstimage-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
set_property(TARGET hl_f90_tstimage-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
set_target_properties (hl_f90_tstimage-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/hl/fortran
@ -68,6 +73,7 @@ add_executable (hl_f90_tsttable tsttable.F90)
TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable STATIC " " " ")
target_link_libraries (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET})
target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_property(TARGET hl_f90_tsttable APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
set_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran)
if (BUILD_SHARED_LIBS)
@ -75,6 +81,7 @@ if (BUILD_SHARED_LIBS)
TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable-shared SHARED " " " ")
target_link_libraries (hl_f90_tsttable-shared ${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET})
target_include_directories (hl_f90_tsttable-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
set_property(TARGET hl_f90_tsttable-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_F90_BINARY_DIR};${HDF5_F90_SRC_DIR}/src")
set_target_properties (hl_f90_tsttable-shared PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/hl/fortran

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_SRC)
project (HDF5_HL_SRC C)
#-----------------------------------------------------------------------------
# List Source files
@ -30,6 +30,7 @@ set (HL_HEADERS
)
add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS})
set_property(TARGET ${HDF5_HL_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_HL_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC 0)
@ -42,6 +43,7 @@ set (install_targets ${HDF5_HL_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS})
set_property(TARGET ${HDF5_HL_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_HL_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_HL_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_HL_LIBSH_TARGET} ${HDF5_HL_LIB_NAME} SHARED "HL")

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_TEST)
project (HDF5_HL_TEST C)
# --------------------------------------------------------------------
# Notes: When creating unit test executables they should be prefixed
# with "hl_". This allows for easier filtering of the test suite when
@ -14,14 +14,12 @@ PROJECT (HDF5_HL_TEST)
set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
configure_file (${HDF5_HL_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
include_directories (${CMAKE_CURRENT_BINARY_DIR})
include_directories (${HDF5_TEST_SRC_DIR})
# --------------------------------------------------------------------
# Macro used to add a unit test
# --------------------------------------------------------------------
MACRO (HL_ADD_EXE hl_name)
add_executable (hl_${hl_name} ${hl_name}.c)
set_property(TARGET hl_${hl_name} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (hl_${hl_name} STATIC " " " ")
target_link_libraries (hl_${hl_name}
${HDF5_HL_LIB_TARGET}
@ -33,6 +31,7 @@ ENDMACRO ()
MACRO (HL_ADD_SHEXE hl_name)
add_executable (hl_${hl_name} ${hl_name}.c)
set_property(TARGET hl_${hl_name} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (hl_${hl_name} SHARED " " " ")
target_link_libraries (hl_${hl_name}
${HDF5_HL_LIBSH_TARGET}
@ -52,6 +51,7 @@ HL_ADD_EXE (test_dset_append)
# test_packet has two source files
add_executable (hl_test_packet test_packet.c test_packet_vlen.c)
set_property(TARGET hl_test_packet APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TEST_SRC_DIR};${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (hl_test_packet STATIC " " " ")
target_link_libraries (hl_test_packet
${HDF5_HL_LIB_TARGET}
@ -66,6 +66,7 @@ set_target_properties (hl_test_packet PROPERTIES FOLDER test/hl)
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (hl_gen_test_ds gen_test_ds.c)
set_property(TARGET hl_gen_test_ds APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (hl_gen_test_ds STATIC " " " ")
target_link_libraries (hl_gen_test_ds
${HDF5_HL_LIB_TARGET}
@ -75,6 +76,7 @@ if (HDF5_BUILD_GENERATORS)
set_target_properties (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen)
add_executable (hl_gen_test_ld gen_test_ld.c)
set_property(TARGET hl_gen_test_ld APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (hl_gen_test_ld STATIC " " " ")
target_link_libraries (hl_gen_test_ld
${HDF5_HL_LIB_TARGET}

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_TOOLS C CXX)
project (HDF5_HL_TOOLS C)
add_subdirectory (gif2h5)

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_TOOLS_GIF2H5)
project (HDF5_HL_TOOLS_GIF2H5 C)
#-----------------------------------------------------------------------------
# Define Sources
@ -14,10 +14,8 @@ set (GIF2H5_SOURCES
)
#-- Add gif2hdf5 program
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR})
add_executable (gif2h5 ${GIF2H5_SOURCES})
set_property(TARGET gif2h5 APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
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)
@ -29,6 +27,7 @@ set (hdf2gif_SOURCES
${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdfgifwr.c
)
add_executable (h52gif ${hdf2gif_SOURCES})
set_property(TARGET h52gif APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h52gif STATIC " " " ")
target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h52gif PROPERTIES FOLDER tools/hl)
@ -42,6 +41,7 @@ if (BUILD_TESTING)
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/h52gifgentst.c)
set_property(TARGET hl_h52gifgentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (hl_h52gifgentest STATIC " " " ")
target_link_libraries (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl)

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_TOOLS_H5WATCH)
project (HDF5_HL_TOOLS_H5WATCH C)
#-----------------------------------------------------------------------------
# Define Sources
@ -9,25 +9,21 @@ set (H5WATCH_SOURCES
)
#-- Add h5watch program
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_SOURCES})
set_property(TARGET h5watch APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5watch STATIC " " " ")
target_link_libraries (h5watch ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5watch PROPERTIES FOLDER tools/hl)
if (BUILD_TESTING)
include_directories (${HDF5_TEST_SRC_DIR})
include_directories(${HDF5_HL_SRC_DIR}/test)
#-- Add swmr_check_compat_vfd program
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_SOURCES})
set_property(TARGET hl_swmr_check_compat_vfd APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
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})
target_link_libraries (hl_swmr_check_compat_vfd ${HDF5_LIB_TARGET})
set_target_properties (hl_swmr_check_compat_vfd PROPERTIES FOLDER tools/hl)
#-- Add extend_dset program
@ -35,11 +31,13 @@ if (BUILD_TESTING)
${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/extend_dset.c
)
add_executable (extend_dset ${extend_dset_SOURCES})
set_property(TARGET extend_dset APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_HL_SRC_DIR}/test;${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (extend_dset STATIC " " " ")
target_link_libraries (extend_dset ${HDF5_HL_LIB_TARGET} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (extend_dset PROPERTIES FOLDER tools/hl)
add_executable (h5watchgentest ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watchgentest.c)
set_property(TARGET h5watchgentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5watchgentest STATIC " " " ")
target_link_libraries (h5watchgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5watchgentest PROPERTIES FOLDER generator/tools/hl)

View File

@ -1,8 +1,9 @@
cmake_minimum_required (VERSION 3.10)
PROJECT ( HDF5_JAVA C Java )
project (HDF5_JAVA C Java)
set (CMAKE_MODULE_PATH "${HDF_RESOURCES_DIR};${HDF_RESOURCES_EXT_DIR}")
find_package (Java)
#-----------------------------------------------------------------------------
# Include some macros for reusable code
#-----------------------------------------------------------------------------
@ -13,7 +14,6 @@ find_package (JNI)
message ("JNI_LIBRARIES=${JNI_LIBRARIES}")
message ("JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}")
INCLUDE_DIRECTORIES ( ${JNI_INCLUDE_DIRS} )
if (WIN32)
set (HDF_JRE_DIRECTORY "C:/Program Files/Java/jre8")
@ -25,13 +25,14 @@ endif ()
# Include the main src and config directories
#-----------------------------------------------------------------------------
set (HDF5_JAVA_INCLUDE_DIRECTORIES
${JNI_INCLUDE_DIRS}
${HDF5_JAVA_JNI_SRC_DIR}
${JAVA_INCLUDE_PATH}
${JAVA_INCLUDE_PATH2}
)
INCLUDE_DIRECTORIES (${HDF5_JAVA_INCLUDE_DIRECTORIES})
set (CMAKE_JAVA_INCLUDE_PATH "")
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_JAVA_INCLUDE_DIRECTORIES}")
set (CMAKE_JAVA_INCLUDE_PATH "")
#-----------------------------------------------------------------------------
# Traverse source subdirectory

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDFJAVA_EXAMPLES)
project (HDFJAVA_EXAMPLES Java)
add_subdirectory (datasets)
add_subdirectory (datatypes)

View File

@ -1,13 +1,8 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDFJAVA_EXAMPLES_DATASETS Java)
project (HDFJAVA_EXAMPLES_DATASETS Java)
set (CMAKE_VERBOSE_MAKEFILE 1)
INCLUDE_DIRECTORIES (
${HDF5_JAVA_JNI_BINARY_DIR}
${HDF5_JAVA_HDF5_LIB_DIR}
)
set (HDF_JAVA_EXAMPLES
H5Ex_D_Alloc
H5Ex_D_Checksum

View File

@ -1,13 +1,8 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDFJAVA_EXAMPLES_DATATYPES Java)
project (HDFJAVA_EXAMPLES_DATATYPES Java)
set (CMAKE_VERBOSE_MAKEFILE 1)
INCLUDE_DIRECTORIES (
${HDF5_JAVA_JNI_BINARY_DIR}
${HDF5_JAVA_HDF5_LIB_DIR}
)
set (HDF_JAVA_EXAMPLES
H5Ex_T_Array
H5Ex_T_ArrayAttribute

View File

@ -1,13 +1,8 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDFJAVA_EXAMPLES_GROUPS Java)
project (HDFJAVA_EXAMPLES_GROUPS Java)
set (CMAKE_VERBOSE_MAKEFILE 1)
INCLUDE_DIRECTORIES (
${HDF5_JAVA_JNI_BINARY_DIR}
${HDF5_JAVA_HDF5_LIB_DIR}
)
set (HDF_JAVA_EXAMPLES
H5Ex_G_Create
H5Ex_G_Iterate

View File

@ -1,13 +1,8 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDFJAVA_EXAMPLES_INTRO Java)
project (HDFJAVA_EXAMPLES_INTRO Java)
set (CMAKE_VERBOSE_MAKEFILE 1)
INCLUDE_DIRECTORIES (
${HDF5_JAVA_JNI_BINARY_DIR}
${HDF5_JAVA_HDF5_LIB_DIR}
)
set (HDF_JAVA_EXAMPLES
H5_CreateAttribute
H5_CreateDataset

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT ( HDF5_JAVA_SRC C Java )
project (HDF5_JAVA_SRC C)
#-----------------------------------------------------------------------------
# Traverse source subdirectory

View File

@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_JAVA_HDF)
project (HDF5_JAVA_HDF C)
add_subdirectory (hdf5lib)

View File

@ -1,14 +1,9 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_JAVA_HDF_HDF5 Java)
project (HDF5_JAVA_HDF_HDF5 Java)
set (CMAKE_VERBOSE_MAKEFILE 1)
INCLUDE_DIRECTORIES (
${HDF5_JAVA_HDF_HDF5_SOURCE_DIR}
${HDF5_JAVA_HDF_HDF5_BINARY_DIR}
${HDF5_JAVA_LIB_DIR}
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${HDF5_JAVA_HDF5_LIB_CORENAME}.dir/hdf/hdf5lib
)
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_JAVA_HDF_HDF5_SOURCE_DIR};${HDF5_JAVA_HDF_HDF5_BINARY_DIR};${HDF5_JAVA_LIB_DIR};${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${HDF5_JAVA_HDF5_LIB_CORENAME}.dir/hdf/hdf5lib")
SET_GLOBAL_VARIABLE (HDF5_JAVA_SOURCE_PACKAGES
"${HDF5_JAVA_SOURCE_PACKAGES};hdf.hdf5lib.callbacks;hdf.hdf5lib.exceptions;hdf.hdf5lib.structs;hdf.hdf5lib"

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_JAVA_JNI C CXX)
project (HDF5_JAVA_JNI C)
set (HDF5_JAVA_JNI_CSRCS
${HDF5_JAVA_JNI_SOURCE_DIR}/exceptionImp.c
@ -44,12 +44,11 @@ set (HDF5_JAVA_JNI_CHDRS
${HDF5_JAVA_JNI_SOURCE_DIR}/nativeData.h
)
INCLUDE_DIRECTORIES( ${HDF5_JAVA_JNI_SOURCE_DIR} )
set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
########### JNI libraries always must be built shared ###############
add_library (${HDF5_JAVA_JNI_LIB_TARGET} SHARED ${HDF5_JAVA_JNI_CSRCS} ${HDF5_JAVA_JNI_CHDRS})
target_include_directories(${HDF5_JAVA_JNI_LIB_TARGET} PRIVATE ${HDF5_BINARY_DIR} ${HDF5_JAVA_JNI_SOURCE_DIR})
TARGET_C_PROPERTIES (${HDF5_JAVA_JNI_LIB_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_JAVA_JNI_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
set_target_properties (${HDF5_JAVA_JNI_LIB_TARGET} PROPERTIES FOLDER libraries/jni)

View File

@ -1,12 +1,9 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_JAVA_TEST Java)
project (HDF5_JAVA_TEST Java)
set (CMAKE_VERBOSE_MAKEFILE 1)
INCLUDE_DIRECTORIES (
${HDF5_JAVA_JNI_BINARY_DIR}
${HDF5_JAVA_HDF5_LIB_DIR}
)
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_JAVA_JNI_BINARY_DIR};${HDF5_JAVA_HDF5_LIB_DIR}")
set (HDF5_JAVA_TEST_SOURCES
TestH5.java

View File

@ -188,7 +188,7 @@ string(TOLOWER ${LIB_TYPE} SEARCH_TYPE)
find_package (HDF5 NAMES hdf5 COMPONENTS C ${SEARCH_TYPE})
# find_package (HDF5) # Find non-cmake built HDF5
INCLUDE_DIRECTORIES (${HDF5_INCLUDE_DIR})
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${HDF5_INCLUDE_DIR}")
set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_${LIB_TYPE}_LIBRARY})
set (example hdf_example)

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_SRC C CXX)
project (HDF5_SRC C)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
@ -858,6 +858,7 @@ endif ()
# specific type checks inside
#-----------------------------------------------------------------------------
add_executable (H5detect ${HDF5_SRC_DIR}/H5detect.c)
target_include_directories(H5detect PRIVATE ${HDF5_BINARY_DIR})
TARGET_C_PROPERTIES (H5detect STATIC " " " ")
if (MSVC OR MINGW)
target_link_libraries (H5detect "ws2_32.lib")
@ -874,6 +875,7 @@ add_custom_command (
)
add_executable (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c)
target_include_directories(H5make_libsettings PRIVATE ${HDF5_BINARY_DIR})
TARGET_C_PROPERTIES (H5make_libsettings STATIC " " " ")
if (MSVC OR MINGW)
target_link_libraries (H5make_libsettings "ws2_32.lib")
@ -896,6 +898,7 @@ add_custom_command (
set (gen_SRCS ${HDF5_BINARY_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c)
add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
target_include_directories(${HDF5_LIB_TARGET} PUBLIC "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_LIB_TARGET} PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS})
if (NOT WIN32)
@ -905,14 +908,16 @@ set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC 0)
set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
FOLDER libraries
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
INTERFACE_INCLUDE_DIRECTORIES $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>
)
## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,ST,T,Z"
#all_packages="AC,B2,CX,D,F,HL,I,O,S,ST,T,Z"
option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
if (HDF5_ENABLE_DEBUG_APIS)
set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
COMPILE_DEFINITIONS
"H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5B2_DEBUG;H5AC_DEBUG"
"H5Z_DEBUG;H5T_DEBUG;H5ST_DEBUG;H5S_DEBUG;H5O_DEBUG;H5I_DEBUG;H5HL_DEBUG;H5F_DEBUG;H5D_DEBUG;H5CX_DEBUG;H5B2_DEBUG;H5AC_DEBUG"
)
endif ()
set (install_targets ${HDF5_LIB_TARGET})
@ -935,6 +940,7 @@ if (BUILD_SHARED_LIBS)
)
set (shared_gen_SRCS ${HDF5_BINARY_DIR}/shared/H5Tinit.c ${HDF5_BINARY_DIR}/shared/H5lib_settings.c)
add_library (${HDF5_LIBSH_TARGET} SHARED ${common_SRCS} ${shared_gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS})
target_include_directories(${HDF5_LIBSH_TARGET} PUBLIC "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE ${LINK_LIBS} ${LINK_COMP_LIBS})
if (NOT WIN32)
@ -973,6 +979,7 @@ if (NOT HDF5_INSTALL_NO_DEVELOPMENT)
FILES
${H5_PUBLIC_HEADERS}
${H5_GENERATED_HEADERS}
${HDF5_BINARY_DIR}/H5pubconf.h
DESTINATION
${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT

View File

@ -268,7 +268,7 @@ H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id,
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a type")
if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, TRUE) < 0)
@ -350,7 +350,7 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name,
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a type")
if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, TRUE) < 0)

View File

@ -134,7 +134,7 @@ H5Acreate1(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id,
if(NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a type")
if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Set up collective metadata if appropriate */
if(H5CX_set_loc(loc_id) < 0)

View File

@ -1063,7 +1063,7 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
* additions involving the offset and the hyperslab selection -QAK)
*/
if((file_space_normalized = H5S_hyper_normalize_offset((H5S_t *)file_space, old_offset)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset")
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to normalize selection")
/* Decide the number of chunks in each dimension*/
for(u = 0; u < f_ndims; u++) {
@ -1298,10 +1298,10 @@ done:
HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection iterator")
if(file_type && (H5T_close_real(file_type) < 0))
HDONE_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "Can't free temporary datatype")
if(file_space_normalized) {
if(file_space_normalized == TRUE) {
/* (Casting away const OK -QAK) */
if(H5S_hyper_denormalize_offset((H5S_t *)file_space, old_offset) < 0)
HDONE_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset")
HDONE_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't denormalize selection")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
@ -1501,8 +1501,7 @@ H5D__create_chunk_map_single(H5D_chunk_map_t *fm, const H5D_io_info_t
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy file selection")
/* Move selection back to have correct offset in chunk */
if(H5S_SELECT_ADJUST_U(fm->single_space, coords) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't adjust chunk selection")
H5S_SELECT_ADJUST_U(fm->single_space, coords);
#ifdef H5_HAVE_PARALLEL
/* store chunk selection information */
@ -1614,10 +1613,7 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t
} /* end if */
/* Move selection back to have correct offset in chunk */
if(H5S_SELECT_ADJUST_U(tmp_fchunk, coords) < 0) {
(void)H5S_close(tmp_fchunk);
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't adjust chunk selection")
} /* end if */
H5S_SELECT_ADJUST_U(tmp_fchunk, coords);
/* Add temporary chunk to the list of chunks */
@ -1816,8 +1812,8 @@ H5D__create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm)
} /* end for */
/* Adjust the selection */
if(H5S_hyper_adjust_s(chunk_info->mspace,chunk_adjust) < 0) /*lint !e772 The chunk_adjust array will always be initialized */
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't adjust chunk selection")
if(H5S_hyper_adjust_s(chunk_info->mspace, chunk_adjust) < 0) /*lint !e772 The chunk_adjust array will always be initialized */
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to adjust selection")
/* Get the next chunk node in the skip list */
curr_node=H5SL_next(curr_node);

View File

@ -392,7 +392,7 @@ H5D__contig_construct(H5F_t *f, H5D_t *dset)
/*
* The maximum size of the dataset cannot exceed the storage size.
* Also, only the slowest varying dimension of a simple data space
* Also, only the slowest varying dimension of a simple dataspace
* can be extendible (currently only for external data storage).
*/

View File

@ -90,7 +90,7 @@
* properties (DCPL_ID).
*
* All arguments are copied into the dataset, so the caller is
* allowed to derive new types, data spaces, and creation
* allowed to derive new types, dataspaces, and creation
* parameters from the old ones and reuse them in calls to
* create other datasets.
*

View File

@ -143,7 +143,7 @@ H5D__efl_construct(H5F_t *f, H5D_t *dset)
/*
* The maximum size of the dataset cannot exceed the storage size.
* Also, only the slowest varying dimension of a simple data space
* Also, only the slowest varying dimension of a simple dataspace
* can be extendible (currently only for external data storage).
*/

View File

@ -378,7 +378,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5D__get_space_status
*
* Purpose: Returns the status of data space allocation.
* Purpose: Returns the status of dataspace allocation.
*
* Return:
* Success: Non-negative
@ -2694,13 +2694,13 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size)
for(u = 0; u < dset->shared->layout.storage.u.virt.list_nused; u++) {
/* Patch extent */
if(H5S_set_extent(dset->shared->layout.storage.u.virt.list[u].source_dset.virtual_select, size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space")
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace")
dset->shared->layout.storage.u.virt.list[u].virtual_space_status = H5O_VIRTUAL_STATUS_CORRECT;
/* Patch sub-source datasets */
for(v = 0; v < dset->shared->layout.storage.u.virt.list[u].sub_dset_nalloc; v++)
if(H5S_set_extent(dset->shared->layout.storage.u.virt.list[u].sub_dset[v].virtual_select, size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space")
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace")
} /* end for */
/* Mark virtual datasets as not fully initialized so internal
@ -3425,9 +3425,9 @@ H5D__get_space(const H5D_t *dset)
if(H5D__virtual_set_extent_unlim(dset) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update virtual dataset extent")
/* Read the data space message and return a data space object */
/* Read the dataspace message and return a dataspace object */
if(NULL == (space = H5S_copy(dset->shared->space, FALSE, TRUE)))
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get data space")
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get dataspace")
/* Create an atom */
if((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0)

View File

@ -135,19 +135,19 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
/* Check dataspaces */
if (H5S_ALL != mem_space_id) {
if (NULL == (mem_space = (const H5S_t *)H5I_object_verify(mem_space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "mem_space_id is not a dataspace ID")
/* Check for valid selection */
if (H5S_SELECT_VALID(mem_space) != TRUE)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection+offset not within extent")
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection + offset not within extent")
}
if (H5S_ALL != file_space_id) {
if (NULL == (file_space = (const H5S_t *)H5I_object_verify(file_space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "file_space_id is not a dataspace ID")
/* Check for valid selection */
if (H5S_SELECT_VALID(file_space) != TRUE)
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection+offset not within extent")
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "selection + offset not within extent")
}
/* Get the default dataset transfer property list if the user didn't provide one */
@ -469,7 +469,7 @@ H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
if(!mem_space)
mem_space = file_space;
if((snelmts = H5S_GET_SELECT_NPOINTS(mem_space)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dst dataspace has invalid selection")
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dst dataspace has invalid selection")
H5_CHECKED_ASSIGN(nelmts, hsize_t, snelmts, hssize_t);
/* Set up datatype info for operation */
@ -494,7 +494,7 @@ H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
/* Make certain that the number of elements in each selection is the same */
if(nelmts != (hsize_t)H5S_GET_SELECT_NPOINTS(file_space))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src and dest dataspaces have different sizes")
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src and dest dataspaces have different number of elements selected")
/* Check for a NULL buffer, after the H5S_ALL dataspace selection has been handled */
if(NULL == buf) {
@ -686,7 +686,7 @@ H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
/* Check if we are allowed to write to this file */
if(0 == (H5F_INTENT(dataset->oloc.file) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "no write intent on file")
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "no write intent on file")
/* Set up datatype info for operation */
if(H5D__typeinfo_init(dataset, mem_type_id, TRUE, &type_info) < 0)
@ -732,12 +732,12 @@ H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
mem_space = file_space;
if((snelmts = H5S_GET_SELECT_NPOINTS(mem_space)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src dataspace has invalid selection")
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src dataspace has invalid selection")
H5_CHECKED_ASSIGN(nelmts, hsize_t, snelmts, hssize_t);
/* Make certain that the number of elements in each selection is the same */
if(nelmts != (hsize_t)H5S_GET_SELECT_NPOINTS(file_space))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src and dest dataspaces have different sizes")
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "src and dest dataspaces have different number of elements selected")
/* Check for a NULL buffer, after the H5S_ALL dataspace selection has been handled */
if(NULL == buf) {
@ -975,7 +975,7 @@ H5D__typeinfo_init(const H5D_t *dset, hid_t mem_type_id, hbool_t do_write,
/* Get the memory & dataset datatypes */
if(NULL == (type_info->mem_type = (const H5T_t *)H5I_object_verify(mem_type_id, H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
type_info->dset_type = dset->shared->type;
if(do_write) {
@ -1000,11 +1000,11 @@ H5D__typeinfo_init(const H5D_t *dset, hid_t mem_type_id, hbool_t do_write,
* turns off background preservation.
*/
if(NULL == (type_info->tpath = H5T_path_find(src_type, dst_type)))
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatype")
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatype")
/* Retrieve info from API context */
if(H5CX_get_data_transform(&data_transform) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data transform info")
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get data transform info")
/* Precompute some useful information */
type_info->src_type_size = H5T_get_size(src_type);

View File

@ -2294,7 +2294,7 @@ done:
* 2) Gather all the information to the root process
*
* 3) Root process will do the following:
* a) Obtain chunk addresses for all chunks in this data space
* a) Obtain chunk addresses for all chunks in this dataspace
* b) With the consideration of the user option, calculate IO mode for each chunk
* c) Build MPI derived datatype to combine "chunk address" and "assign_io" information
* in order to do MPI Bcast only once

View File

@ -1701,7 +1701,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
if(changed) {
/* Update VDS extent */
if(H5S_set_extent(dset->shared->space, new_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space")
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace")
/* Mark the space as dirty, for later writing to the file */
if(H5F_INTENT(dset->oloc.file) & H5F_ACC_RDWR)
@ -1824,24 +1824,24 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset)
/* Update top level virtual_select and clipped_virtual_select
* extents */
if(H5S_set_extent(storage->list[i].source_dset.virtual_select, new_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space")
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace")
if((storage->list[i].source_dset.clipped_virtual_select
!= storage->list[i].source_dset.virtual_select)
&& storage->list[i].source_dset.clipped_virtual_select)
if(H5S_set_extent(storage->list[i].source_dset.clipped_virtual_select, new_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space")
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace")
/* Update sub dataset virtual_select and clipped_virtual_select
* extents */
for(j = 0; j < storage->list[i].sub_dset_nalloc; j++)
if(storage->list[i].sub_dset[j].virtual_select) {
if(H5S_set_extent(storage->list[i].sub_dset[j].virtual_select, new_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space")
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace")
if((storage->list[i].sub_dset[j].clipped_virtual_select
!= storage->list[i].sub_dset[j].virtual_select)
&& storage->list[i].sub_dset[j].clipped_virtual_select)
if(H5S_set_extent(storage->list[i].sub_dset[j].clipped_virtual_select, new_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space")
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace")
} /* end if */
else
HDassert(!storage->list[i].sub_dset[j].clipped_virtual_select);
@ -2327,7 +2327,7 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info,
/* Temporarily set extent of virtual selection to bounds */
if(H5S_set_extent(storage->list[i].sub_dset[j].virtual_select, vbounds_end) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space")
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace")
/* Get current VDS dimensions */
if(H5S_get_simple_extent_dims(io_info->dset->shared->space, tmp_dims, NULL) < 0)
@ -2351,9 +2351,9 @@ H5D__virtual_pre_io(H5D_io_info_t *io_info,
/* Set extents of virtual_select and
* clipped_virtual_select to virtual extent */
if(H5S_set_extent(storage->list[i].sub_dset[j].virtual_select, tmp_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space")
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace")
if(H5S_set_extent(storage->list[i].sub_dset[j].clipped_virtual_select, tmp_dims) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space")
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of dataspace")
} /* end if */
} /* end if */

View File

@ -1744,7 +1744,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5O_msg_encode
*
* Purpose: Encode an object(data type and simple data space only)
* Purpose: Encode an object(data type and simple dataspace only)
* description into a buffer.
*
* Return: Success: Non-negative

View File

@ -2372,7 +2372,7 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t index)
/* Register ID */
if((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register data space")
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace")
done:
/* Free space on failure */
@ -2463,7 +2463,7 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index)
/* Register ID */
if((ret_value = H5I_register(H5I_DATASPACE, space, TRUE)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register data space")
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace")
done:
/* Free space on failure */

View File

@ -1393,8 +1393,7 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims,
/* Selection related cleanup */
/* Set offset to zeros */
for(u = 0; u < space->extent.rank; u++)
space->select.offset[u] = 0;
HDmemset(space->select.offset, 0, sizeof(hsize_t) * space->extent.rank);
space->select.offset_changed = FALSE;
/* If the selection is 'all', update the number of elements selected */

View File

@ -15,7 +15,7 @@
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
* Tuesday, June 16, 1998
*
* Purpose: "All" selection data space I/O functions.
* Purpose: "All" selection dataspace I/O functions.
*/
#include "H5Smodule.h" /* This source code file is part of the H5S module */
@ -30,59 +30,59 @@
/* Static function prototypes */
/* Selection callbacks */
static herr_t H5S_all_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection);
static herr_t H5S_all_get_seq_list(const H5S_t *space, unsigned flags,
static herr_t H5S__all_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection);
static herr_t H5S__all_get_seq_list(const H5S_t *space, unsigned flags,
H5S_sel_iter_t *iter, size_t maxseq, size_t maxbytes,
size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len);
static herr_t H5S_all_release(H5S_t *space);
static htri_t H5S_all_is_valid(const H5S_t *space);
static hssize_t H5S_all_serial_size(const H5S_t *space);
static herr_t H5S_all_serialize(const H5S_t *space, uint8_t **p);
static herr_t H5S_all_deserialize(H5S_t *space, uint32_t version, uint8_t flags,
static herr_t H5S__all_release(H5S_t *space);
static htri_t H5S__all_is_valid(const H5S_t *space);
static hssize_t H5S__all_serial_size(const H5S_t *space);
static herr_t H5S__all_serialize(const H5S_t *space, uint8_t **p);
static herr_t H5S__all_deserialize(H5S_t *space, uint32_t version, uint8_t flags,
const uint8_t **p);
static herr_t H5S_all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end);
static herr_t H5S_all_offset(const H5S_t *space, hsize_t *off);
static herr_t H5S__all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end);
static herr_t H5S__all_offset(const H5S_t *space, hsize_t *off);
static int H5S__all_unlim_dim(const H5S_t *space);
static htri_t H5S_all_is_contiguous(const H5S_t *space);
static htri_t H5S_all_is_single(const H5S_t *space);
static htri_t H5S_all_is_regular(const H5S_t *space);
static herr_t H5S_all_adjust_u(H5S_t *space, const hsize_t *offset);
static herr_t H5S_all_project_scalar(const H5S_t *space, hsize_t *offset);
static herr_t H5S_all_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
static herr_t H5S_all_iter_init(H5S_sel_iter_t *iter, const H5S_t *space);
static htri_t H5S__all_is_contiguous(const H5S_t *space);
static htri_t H5S__all_is_single(const H5S_t *space);
static htri_t H5S__all_is_regular(const H5S_t *space);
static void H5S__all_adjust_u(H5S_t *space, const hsize_t *offset);
static herr_t H5S__all_project_scalar(const H5S_t *space, hsize_t *offset);
static herr_t H5S__all_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
static herr_t H5S__all_iter_init(H5S_sel_iter_t *iter, const H5S_t *space);
/* Selection iteration callbacks */
static herr_t H5S_all_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords);
static herr_t H5S_all_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end);
static hsize_t H5S_all_iter_nelmts(const H5S_sel_iter_t *iter);
static htri_t H5S_all_iter_has_next_block(const H5S_sel_iter_t *iter);
static herr_t H5S_all_iter_next(H5S_sel_iter_t *sel_iter, size_t nelem);
static herr_t H5S_all_iter_next_block(H5S_sel_iter_t *sel_iter);
static herr_t H5S_all_iter_release(H5S_sel_iter_t *sel_iter);
static herr_t H5S__all_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords);
static herr_t H5S__all_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end);
static hsize_t H5S__all_iter_nelmts(const H5S_sel_iter_t *iter);
static htri_t H5S__all_iter_has_next_block(const H5S_sel_iter_t *iter);
static herr_t H5S__all_iter_next(H5S_sel_iter_t *sel_iter, size_t nelem);
static herr_t H5S__all_iter_next_block(H5S_sel_iter_t *sel_iter);
static herr_t H5S__all_iter_release(H5S_sel_iter_t *sel_iter);
/* Selection properties for "all" selections */
const H5S_select_class_t H5S_sel_all[1] = {{
H5S_SEL_ALL,
/* Methods on selection */
H5S_all_copy,
H5S_all_get_seq_list,
H5S_all_release,
H5S_all_is_valid,
H5S_all_serial_size,
H5S_all_serialize,
H5S_all_deserialize,
H5S_all_bounds,
H5S_all_offset,
H5S__all_copy,
H5S__all_get_seq_list,
H5S__all_release,
H5S__all_is_valid,
H5S__all_serial_size,
H5S__all_serialize,
H5S__all_deserialize,
H5S__all_bounds,
H5S__all_offset,
H5S__all_unlim_dim,
NULL,
H5S_all_is_contiguous,
H5S_all_is_single,
H5S_all_is_regular,
H5S_all_adjust_u,
H5S_all_project_scalar,
H5S_all_project_simple,
H5S_all_iter_init,
H5S__all_is_contiguous,
H5S__all_is_single,
H5S__all_is_regular,
H5S__all_adjust_u,
H5S__all_project_scalar,
H5S__all_project_simple,
H5S__all_iter_init,
}};
/* Iteration properties for "all" selections */
@ -90,18 +90,18 @@ static const H5S_sel_iter_class_t H5S_sel_iter_all[1] = {{
H5S_SEL_ALL,
/* Methods on selection iterator */
H5S_all_iter_coords,
H5S_all_iter_block,
H5S_all_iter_nelmts,
H5S_all_iter_has_next_block,
H5S_all_iter_next,
H5S_all_iter_next_block,
H5S_all_iter_release,
H5S__all_iter_coords,
H5S__all_iter_block,
H5S__all_iter_nelmts,
H5S__all_iter_has_next_block,
H5S__all_iter_next,
H5S__all_iter_next_block,
H5S__all_iter_release,
}};
/*-------------------------------------------------------------------------
* Function: H5S_all_iter_init
* Function: H5S__all_iter_init
*
* Purpose: Initializes iteration information for "all" selection.
*
@ -110,35 +110,33 @@ static const H5S_sel_iter_class_t H5S_sel_iter_all[1] = {{
* Programmer: Quincey Koziol
* Tuesday, June 16, 1998
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static herr_t
H5S_all_iter_init (H5S_sel_iter_t *iter, const H5S_t *space)
H5S__all_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert (space && H5S_SEL_ALL==H5S_GET_SELECT_TYPE(space));
HDassert (iter);
HDassert(space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
HDassert(iter);
/* Initialize the number of elements to iterate over */
iter->elmt_left=H5S_GET_SELECT_NPOINTS(space);
iter->elmt_left = H5S_GET_SELECT_NPOINTS(space);
/* Start at the upper left location */
iter->u.all.elmt_offset=0;
iter->u.all.byte_offset=0;
iter->u.all.elmt_offset = 0;
iter->u.all.byte_offset = 0;
/* Initialize type of selection iterator */
iter->type=H5S_sel_iter_all;
iter->type = H5S_sel_iter_all;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_all_iter_init() */
} /* H5S__all_iter_init() */
/*-------------------------------------------------------------------------
* Function: H5S_all_iter_coords
* Function: H5S__all_iter_coords
*
* Purpose: Retrieve the current coordinates of iterator for current
* selection
@ -148,32 +146,30 @@ H5S_all_iter_init (H5S_sel_iter_t *iter, const H5S_t *space)
* Programmer: Quincey Koziol
* Tuesday, April 22, 2003
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static herr_t
H5S_all_iter_coords (const H5S_sel_iter_t *iter, hsize_t *coords)
H5S__all_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords)
{
herr_t ret_value=SUCCEED; /* Return value */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/* Check args */
HDassert (iter);
HDassert (coords);
HDassert(iter);
HDassert(coords);
/* Calculate the coordinates for the current iterator offset */
if(H5VM_array_calc(iter->u.all.elmt_offset,iter->rank,iter->dims,coords)<0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve coordinates");
if(H5VM_array_calc(iter->u.all.elmt_offset, iter->rank, iter->dims, coords) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve coordinates")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_all_iter_coords() */
} /* H5S__all_iter_coords() */
/*-------------------------------------------------------------------------
* Function: H5S_all_iter_block
* Function: H5S__all_iter_block
*
* Purpose: Retrieve the current block of iterator for current
* selection
@ -183,38 +179,36 @@ done:
* Programmer: Quincey Koziol
* Monday, June 2, 2003
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static herr_t
H5S_all_iter_block (const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
H5S__all_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
{
unsigned u; /* Local index variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert (iter);
HDassert (start);
HDassert (end);
HDassert(iter);
HDassert(start);
HDassert(end);
for(u=0; u<iter->rank; u++) {
for(u = 0; u < iter->rank; u++) {
/* Set the start of the 'all' block */
/* (Always '0' coordinates for now) */
start[u]=0;
start[u] = 0;
/* Compute the end of the 'all' block */
/* (Always size of the extent for now) */
end[u]=iter->dims[u]-1;
end[u] = iter->dims[u] - 1;
} /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_all_iter_coords() */
} /* H5S__all_iter_block() */
/*-------------------------------------------------------------------------
* Function: H5S_all_iter_nelmts
* Function: H5S__all_iter_nelmts
*
* Purpose: Return number of elements left to process in iterator
*
@ -223,29 +217,27 @@ H5S_all_iter_block (const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end)
* Programmer: Quincey Koziol
* Tuesday, June 16, 1998
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
static hsize_t
H5S_all_iter_nelmts (const H5S_sel_iter_t *iter)
H5S__all_iter_nelmts(const H5S_sel_iter_t *iter)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert (iter);
HDassert(iter);
FUNC_LEAVE_NOAPI(iter->elmt_left)
} /* H5S_all_iter_nelmts() */
} /* H5S__all_iter_nelmts() */
/*--------------------------------------------------------------------------
NAME
H5S_all_iter_next
H5S__all_iter_has_next_block
PURPOSE
Check if there is another block left in the current iterator
USAGE
htri_t H5S_all_iter_has_next_block(iter)
htri_t H5S__all_iter_has_next_block(iter)
const H5S_sel_iter_t *iter; IN: Pointer to selection iterator
RETURNS
Non-negative (TRUE/FALSE) on success/Negative on failure
@ -257,24 +249,24 @@ H5S_all_iter_nelmts (const H5S_sel_iter_t *iter)
REVISION LOG
--------------------------------------------------------------------------*/
static htri_t
H5S_all_iter_has_next_block (const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
H5S__all_iter_has_next_block(const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert (iter);
HDassert(iter);
FUNC_LEAVE_NOAPI(FALSE)
} /* H5S_all_iter_has_next_block() */
} /* H5S__all_iter_has_next_block() */
/*--------------------------------------------------------------------------
NAME
H5S_all_iter_next
H5S__all_iter_next
PURPOSE
Increment selection iterator
USAGE
herr_t H5S_all_iter_next(iter, nelem)
herr_t H5S__all_iter_next(iter, nelem)
H5S_sel_iter_t *iter; IN: Pointer to selection iterator
size_t nelem; IN: Number of elements to advance by
RETURNS
@ -287,29 +279,29 @@ H5S_all_iter_has_next_block (const H5S_sel_iter_t H5_ATTR_UNUSED *iter)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
H5S_all_iter_next(H5S_sel_iter_t *iter, size_t nelem)
H5S__all_iter_next(H5S_sel_iter_t *iter, size_t nelem)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert (iter);
HDassert (nelem>0);
HDassert(iter);
HDassert(nelem > 0);
/* Increment the iterator */
iter->u.all.elmt_offset+=nelem;
iter->u.all.byte_offset+=(nelem*iter->elmt_size);
iter->u.all.elmt_offset += nelem;
iter->u.all.byte_offset += (nelem * iter->elmt_size);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_all_iter_next() */
} /* H5S__all_iter_next() */
/*--------------------------------------------------------------------------
NAME
H5S_all_iter_next_block
H5S__all_iter_next_block
PURPOSE
Increment selection iterator to next block
USAGE
herr_t H5S_all_iter_next_block(iter)
herr_t H5S__all_iter_next_block(iter)
H5S_sel_iter_t *iter; IN: Pointer to selection iterator
RETURNS
Non-negative on success/Negative on failure
@ -321,24 +313,24 @@ H5S_all_iter_next(H5S_sel_iter_t *iter, size_t nelem)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
H5S_all_iter_next_block(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
H5S__all_iter_next_block(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert (iter);
HDassert(iter);
FUNC_LEAVE_NOAPI(FAIL)
} /* H5S_all_iter_next_block() */
} /* H5S__all_iter_next_block() */
/*--------------------------------------------------------------------------
NAME
H5S_all_iter_release
H5S__all_iter_release
PURPOSE
Release "all" selection iterator information for a dataspace
USAGE
herr_t H5S_all_iter_release(iter)
herr_t H5S__all_iter_release(iter)
H5S_sel_iter_t *iter; IN: Pointer to selection iterator
RETURNS
Non-negative on success/Negative on failure
@ -350,24 +342,24 @@ H5S_all_iter_next_block(H5S_sel_iter_t H5_ATTR_UNUSED *iter)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
H5S_all_iter_release (H5S_sel_iter_t H5_ATTR_UNUSED * iter)
H5S__all_iter_release(H5S_sel_iter_t H5_ATTR_UNUSED * iter)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert (iter);
HDassert(iter);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_all_iter_release() */
} /* H5S__all_iter_release() */
/*--------------------------------------------------------------------------
NAME
H5S_all_release
H5S__all_release
PURPOSE
Release all selection information for a dataspace
USAGE
herr_t H5S_all_release(space)
herr_t H5S__all_release(space)
H5S_t *space; IN: Pointer to dataspace
RETURNS
Non-negative on success/Negative on failure
@ -379,9 +371,9 @@ H5S_all_iter_release (H5S_sel_iter_t H5_ATTR_UNUSED * iter)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
H5S_all_release(H5S_t *space)
H5S__all_release(H5S_t *space)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert(space);
@ -390,16 +382,16 @@ H5S_all_release(H5S_t *space)
space->select.num_elem = 0;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_all_release() */
} /* H5S__all_release() */
/*--------------------------------------------------------------------------
NAME
H5S_all_copy
H5S__all_copy
PURPOSE
Copy a selection from one dataspace to another
USAGE
herr_t H5S_all_copy(dst, src)
herr_t H5S__all_copy(dst, src)
H5S_t *dst; OUT: Pointer to the destination dataspace
H5S_t *src; IN: Pointer to the source dataspace
RETURNS
@ -413,9 +405,9 @@ H5S_all_release(H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
H5S_all_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUSED share_selection)
H5S__all_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUSED share_selection)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
HDassert(src);
HDassert(dst);
@ -424,17 +416,17 @@ H5S_all_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUSED
dst->select.num_elem = (hsize_t)H5S_GET_EXTENT_NPOINTS(dst);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S_all_copy() */
} /* end H5S__all_copy() */
/*--------------------------------------------------------------------------
NAME
H5S_all_is_valid
H5S__all_is_valid
PURPOSE
Check whether the selection fits within the extent, with the current
offset defined.
USAGE
htri_t H5S_all_is_valid(space);
htri_t H5S__all_is_valid(space);
H5S_t *space; IN: Dataspace pointer to query
RETURNS
TRUE if the selection fits within the extent, FALSE if it does not and
@ -448,24 +440,24 @@ H5S_all_copy(H5S_t *dst, const H5S_t H5_ATTR_UNUSED *src, hbool_t H5_ATTR_UNUSED
REVISION LOG
--------------------------------------------------------------------------*/
static htri_t
H5S_all_is_valid (const H5S_t H5_ATTR_UNUSED *space)
H5S__all_is_valid(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
HDassert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* end H5S_all_is_valid() */
} /* end H5S__all_is_valid() */
/*--------------------------------------------------------------------------
NAME
H5S_all_serial_size
H5S__all_serial_size
PURPOSE
Determine the number of bytes needed to store the serialized "all"
selection information.
USAGE
hssize_t H5S_all_serial_size(space)
hssize_t H5S__all_serial_size(space)
H5S_t *space; IN: Dataspace pointer to query
RETURNS
The number of bytes required on success, negative on an error.
@ -478,9 +470,9 @@ H5S_all_is_valid (const H5S_t H5_ATTR_UNUSED *space)
REVISION LOG
--------------------------------------------------------------------------*/
static hssize_t
H5S_all_serial_size (const H5S_t H5_ATTR_UNUSED *space)
H5S__all_serial_size(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
HDassert(space);
@ -489,12 +481,12 @@ H5S_all_serial_size (const H5S_t H5_ATTR_UNUSED *space)
* <length (4 bytes)> = 16 bytes
*/
FUNC_LEAVE_NOAPI(16)
} /* end H5S_all_serial_size() */
} /* end H5S__all_serial_size() */
/*--------------------------------------------------------------------------
NAME
H5S_all_serialize
H5S__all_serialize
PURPOSE
Serialize the current selection into a user-provided buffer.
USAGE
@ -514,11 +506,11 @@ H5S_all_serial_size (const H5S_t H5_ATTR_UNUSED *space)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
H5S_all_serialize(const H5S_t *space, uint8_t **p)
H5S__all_serialize(const H5S_t *space, uint8_t **p)
{
uint8_t *pp = (*p); /* Local pointer for decoding */
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert(space);
@ -535,12 +527,12 @@ H5S_all_serialize(const H5S_t *space, uint8_t **p)
*p = pp;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_all_serialize() */
} /* H5S__all_serialize() */
/*--------------------------------------------------------------------------
NAME
H5S_all_deserialize
H5S__all_deserialize
PURPOSE
Deserialize the current selection from a user-provided buffer.
USAGE
@ -563,12 +555,12 @@ H5S_all_serialize(const H5S_t *space, uint8_t **p)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
H5S_all_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t H5_ATTR_UNUSED flags,
H5S__all_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t H5_ATTR_UNUSED flags,
const uint8_t H5_ATTR_UNUSED **p)
{
herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_NOAPI(FAIL)
FUNC_ENTER_STATIC
HDassert(space);
HDassert(p);
@ -580,16 +572,16 @@ H5S_all_deserialize(H5S_t *space, uint32_t H5_ATTR_UNUSED version, uint8_t H5_AT
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_all_deserialize() */
} /* H5S__all_deserialize() */
/*--------------------------------------------------------------------------
NAME
H5S_all_bounds
H5S__all_bounds
PURPOSE
Gets the bounding box containing the selection.
USAGE
herr_t H5S_all_bounds(space, start, end)
herr_t H5S__all_bounds(space, start, end)
H5S_t *space; IN: Dataspace pointer of selection to query
hsize_t *start; OUT: Starting coordinate of bounding box
hsize_t *end; OUT: Opposite coordinate of bounding box
@ -609,12 +601,12 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
H5S_all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
H5S__all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
{
unsigned rank; /* Dataspace rank */
unsigned i; /* index variable */
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
HDassert(space);
HDassert(start);
@ -630,16 +622,16 @@ H5S_all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
} /* end for */
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_all_bounds() */
} /* H5S__all_bounds() */
/*--------------------------------------------------------------------------
NAME
H5S_all_offset
H5S__all_offset
PURPOSE
Gets the linear offset of the first element for the selection.
USAGE
herr_t H5S_all_offset(space, offset)
herr_t H5S__all_offset(space, offset)
const H5S_t *space; IN: Dataspace pointer of selection to query
hsize_t *offset; OUT: Linear offset of first element in selection
RETURNS
@ -654,9 +646,9 @@ H5S_all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
H5S_all_offset(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset)
H5S__all_offset(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
HDassert(space);
HDassert(offset);
@ -665,7 +657,7 @@ H5S_all_offset(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset)
*offset = 0;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_all_offset() */
} /* H5S__all_offset() */
/*--------------------------------------------------------------------------
@ -700,11 +692,11 @@ H5S__all_unlim_dim(const H5S_t H5_ATTR_UNUSED *space)
/*--------------------------------------------------------------------------
NAME
H5S_all_is_contiguous
H5S__all_is_contiguous
PURPOSE
Check if a "all" selection is contiguous within the dataspace extent.
USAGE
htri_t H5S_all_is_contiguous(space)
htri_t H5S__all_is_contiguous(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
TRUE/FALSE/FAIL
@ -717,23 +709,23 @@ H5S__all_unlim_dim(const H5S_t H5_ATTR_UNUSED *space)
REVISION LOG
--------------------------------------------------------------------------*/
static htri_t
H5S_all_is_contiguous(const H5S_t H5_ATTR_UNUSED *space)
H5S__all_is_contiguous(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
HDassert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* H5S_all_is_contiguous() */
} /* H5S__all_is_contiguous() */
/*--------------------------------------------------------------------------
NAME
H5S_all_is_single
H5S__all_is_single
PURPOSE
Check if a "all" selection is a single block within the dataspace extent.
USAGE
htri_t H5S_all_is_single(space)
htri_t H5S__all_is_single(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
TRUE/FALSE/FAIL
@ -746,23 +738,23 @@ H5S_all_is_contiguous(const H5S_t H5_ATTR_UNUSED *space)
REVISION LOG
--------------------------------------------------------------------------*/
static htri_t
H5S_all_is_single(const H5S_t H5_ATTR_UNUSED *space)
H5S__all_is_single(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
HDassert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* H5S_all_is_single() */
} /* H5S__all_is_single() */
/*--------------------------------------------------------------------------
NAME
H5S_all_is_regular
H5S__all_is_regular
PURPOSE
Check if a "all" selection is "regular"
USAGE
htri_t H5S_all_is_regular(space)
htri_t H5S__all_is_regular(space)
const H5S_t *space; IN: Dataspace pointer to check
RETURNS
TRUE/FALSE/FAIL
@ -776,28 +768,28 @@ H5S_all_is_single(const H5S_t H5_ATTR_UNUSED *space)
REVISION LOG
--------------------------------------------------------------------------*/
static htri_t
H5S_all_is_regular(const H5S_t H5_ATTR_UNUSED *space)
H5S__all_is_regular(const H5S_t H5_ATTR_UNUSED *space)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert(space);
FUNC_LEAVE_NOAPI(TRUE)
} /* H5S_all_is_regular() */
} /* H5S__all_is_regular() */
/*--------------------------------------------------------------------------
NAME
H5S_all_adjust_u
H5S__all_adjust_u
PURPOSE
Adjust an "all" selection by subtracting an offset
USAGE
herr_t H5S_all_adjust_u(space, offset)
void H5S__all_adjust_u(space, offset)
H5S_t *space; IN/OUT: Pointer to dataspace to adjust
const hsize_t *offset; IN: Offset to subtract
RETURNS
Non-negative on success, negative on failure
None
DESCRIPTION
Moves selection by subtracting an offset from it.
GLOBAL VARIABLES
@ -805,21 +797,21 @@ H5S_all_is_regular(const H5S_t H5_ATTR_UNUSED *space)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
H5S_all_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *offset)
static void
H5S__all_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *offset)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert(space);
HDassert(offset);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_all_adjust_u() */
FUNC_LEAVE_NOAPI_VOID
} /* H5S__all_adjust_u() */
/*-------------------------------------------------------------------------
* Function: H5S_all_project_scalar
* Function: H5S__all_project_scalar
*
* Purpose: Projects a single element 'all' selection into a scalar
* dataspace
@ -832,9 +824,9 @@ H5S_all_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *offs
*-------------------------------------------------------------------------
*/
static herr_t
H5S_all_project_scalar(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset)
H5S__all_project_scalar(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert(space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(space));
@ -844,11 +836,11 @@ H5S_all_project_scalar(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset)
*offset = 0;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_all_project_scalar() */
} /* H5S__all_project_scalar() */
/*-------------------------------------------------------------------------
* Function: H5S_all_project_simple
* Function: H5S__all_project_simple
*
* Purpose: Projects an 'all' selection onto/into a simple dataspace
* of a different rank
@ -861,11 +853,11 @@ H5S_all_project_scalar(const H5S_t H5_ATTR_UNUSED *space, hsize_t *offset)
*-------------------------------------------------------------------------
*/
static herr_t
H5S_all_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *offset)
H5S__all_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *offset)
{
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
FUNC_ENTER_STATIC
/* Check args */
HDassert(base_space && H5S_SEL_ALL == H5S_GET_SELECT_TYPE(base_space));
@ -878,7 +870,7 @@ H5S_all_project_simple(const H5S_t *base_space, H5S_t *new_space, hsize_t *offse
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_all_project_simple() */
} /* H5S__all_project_simple() */
/*--------------------------------------------------------------------------
@ -953,7 +945,7 @@ H5Sselect_all(hid_t spaceid)
/* Check args */
if(NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Call internal routine to do the work */
if(H5S_select_all(space, TRUE) < 0)
@ -966,11 +958,11 @@ done:
/*--------------------------------------------------------------------------
NAME
H5S_all_get_seq_list
H5S__all_get_seq_list
PURPOSE
Create a list of offsets & lengths for a selection
USAGE
herr_t H5S_all_get_seq_list(space,flags,iter,maxseq,maxelem,nseq,nelem,off,len)
herr_t H5S__all_get_seq_list(space,flags,iter,maxseq,maxelem,nseq,nelem,off,len)
H5S_t *space; IN: Dataspace containing selection to use.
unsigned flags; IN: Flags for extra information about operation
H5S_sel_iter_t *iter; IN/OUT: Selection iterator describing last
@ -996,44 +988,44 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
H5S_all_get_seq_list(const H5S_t H5_ATTR_UNUSED *space, unsigned H5_ATTR_UNUSED flags, H5S_sel_iter_t *iter,
H5S__all_get_seq_list(const H5S_t H5_ATTR_UNUSED *space, unsigned H5_ATTR_UNUSED flags, H5S_sel_iter_t *iter,
size_t H5_ATTR_UNUSED maxseq, size_t maxelem, size_t *nseq, size_t *nelem,
hsize_t *off, size_t *len)
{
size_t elem_used; /* The number of elements used */
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_STATIC_NOERR
/* Check args */
HDassert(space);
HDassert(iter);
HDassert(maxseq>0);
HDassert(maxelem>0);
HDassert(maxseq > 0);
HDassert(maxelem > 0);
HDassert(nseq);
HDassert(nelem);
HDassert(off);
HDassert(len);
/* Determine the actual number of elements to use */
H5_CHECK_OVERFLOW(iter->elmt_left,hsize_t,size_t);
elem_used=MIN(maxelem,(size_t)iter->elmt_left);
H5_CHECK_OVERFLOW(iter->elmt_left, hsize_t, size_t);
elem_used = MIN(maxelem, (size_t)iter->elmt_left);
HDassert(elem_used > 0);
/* Compute the offset in the dataset */
off[0]=iter->u.all.byte_offset;
len[0]=elem_used*iter->elmt_size;
off[0] = iter->u.all.byte_offset;
len[0] = elem_used * iter->elmt_size;
/* Should only need one sequence for 'all' selections */
*nseq=1;
*nseq = 1;
/* Set the number of elements used */
*nelem=elem_used;
*nelem = elem_used;
/* Update the iterator */
iter->elmt_left-=elem_used;
iter->u.all.elmt_offset+=elem_used;
iter->u.all.byte_offset+=len[0];
iter->elmt_left -= elem_used;
iter->u.all.elmt_offset += elem_used;
iter->u.all.byte_offset += len[0];
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S_all_get_seq_list() */
} /* end H5S__all_get_seq_list() */

View File

@ -76,7 +76,7 @@
/*-------------------------------------------------------------------------
* Function: H5S_debug
*
* Purpose: Prints debugging information about a data space.
* Purpose: Prints debugging information about a dataspace.
*
* Return: Non-negative on success/Negative on failure
*

File diff suppressed because it is too large Load Diff

View File

@ -1362,7 +1362,7 @@ H5S_mpio_space_type(const H5S_t *space, size_t elmt_size, MPI_Datatype *new_type
case H5S_NO_CLASS:
default:
HDassert("unknown data space type" && 0);
HDassert("unknown dataspace type" && 0);
break;
} /* end switch */

View File

@ -15,7 +15,7 @@
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
* Tuesday, November 10, 1998
*
* Purpose: "None" selection data space I/O functions.
* Purpose: "None" selection dataspace I/O functions.
*/
#include "H5Smodule.h" /* This source code file is part of the H5S module */
@ -47,7 +47,7 @@ static int H5S__none_unlim_dim(const H5S_t *space);
static htri_t H5S_none_is_contiguous(const H5S_t *space);
static htri_t H5S_none_is_single(const H5S_t *space);
static htri_t H5S_none_is_regular(const H5S_t *space);
static herr_t H5S_none_adjust_u(H5S_t *space, const hsize_t *offset);
static void H5S_none_adjust_u(H5S_t *space, const hsize_t *offset);
static herr_t H5S_none_project_scalar(const H5S_t *space, hsize_t *offset);
static herr_t H5S_none_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
static herr_t H5S_none_iter_init(H5S_sel_iter_t *iter, const H5S_t *space);
@ -744,11 +744,11 @@ H5S_none_is_regular(const H5S_t H5_ATTR_UNUSED *space)
PURPOSE
Adjust an "none" selection by subtracting an offset
USAGE
herr_t H5S_none_adjust_u(space, offset)
void H5S_none_adjust_u(space, offset)
H5S_t *space; IN/OUT: Pointer to dataspace to adjust
const hsize_t *offset; IN: Offset to subtract
RETURNS
Non-negative on success, negative on failure
None
DESCRIPTION
Moves selection by subtracting an offset from it.
GLOBAL VARIABLES
@ -756,7 +756,7 @@ H5S_none_is_regular(const H5S_t H5_ATTR_UNUSED *space)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
static void
H5S_none_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *offset)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@ -765,7 +765,7 @@ H5S_none_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *off
HDassert(space);
HDassert(offset);
FUNC_LEAVE_NOAPI(FAIL)
FUNC_LEAVE_NOAPI_VOID
} /* H5S_none_adjust_u() */
@ -898,7 +898,7 @@ H5Sselect_none(hid_t spaceid)
/* Check args */
if(NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Change to "none" selection */
if(H5S_select_none(space) < 0)

View File

@ -99,7 +99,7 @@ struct H5S_hyper_span_t {
struct H5S_hyper_span_t *next; /* Pointer to next span in list */
};
/* Information about a list of hyperslab spans */
/* Information about a list of hyperslab spans in one dimension */
struct H5S_hyper_span_info_t {
unsigned count; /* Ref. count of number of spans which share this span */
struct H5S_hyper_span_info_t *scratch; /* Scratch pointer
@ -122,9 +122,9 @@ typedef struct {
* are only used for re-gurgitating the original values used to set the
* hyperslab to the application when it queries the hyperslab selection
* information. */
int unlim_dim; /* Dimension where selection is unlimited, or -1 if none */
hsize_t num_elem_non_unlim; /* # of elements in a "slice" excluding the unlimited dimension */
H5S_hyper_span_info_t *span_lst; /* List of hyperslab span information */
int unlim_dim; /* Dimension where selection is unlimited, or -1 if none */
hsize_t num_elem_non_unlim; /* # of elements in a "slice" excluding the unlimited dimension */
H5S_hyper_span_info_t *span_lst; /* List of hyperslab span information */
} H5S_hyper_sel_t;
/* Selection information methods */
@ -161,7 +161,7 @@ typedef htri_t (*H5S_sel_is_single_func_t)(const H5S_t *space);
/* Method to determine if current selection is "regular" */
typedef htri_t (*H5S_sel_is_regular_func_t)(const H5S_t *space);
/* Method to adjust a selection by an offset */
typedef herr_t (*H5S_sel_adjust_u_func_t)(H5S_t *space, const hsize_t *offset);
typedef void (*H5S_sel_adjust_u_func_t)(H5S_t *space, const hsize_t *offset);
/* Method to construct single element projection onto scalar dataspace */
typedef herr_t (*H5S_sel_project_scalar)(const H5S_t *space, hsize_t *offset);
/* Method to construct selection projection onto/into simple dataspace */
@ -183,7 +183,7 @@ typedef struct {
H5S_sel_deserialize_func_t deserialize; /* Method to store create selection from "serialized" form (a byte sequence suitable for storing on disk) */
H5S_sel_bounds_func_t bounds; /* Method to determine to smallest n-D bounding box containing the current selection */
H5S_sel_offset_func_t offset; /* Method to determine linear offset of initial element in selection within dataspace */
H5S_sel_unlim_dim_func_t unlim_dim; /* Method to get unlimited dimension of selection (or -1 for none) */
H5S_sel_unlim_dim_func_t unlim_dim; /* Method to get unlimited dimension of selection (or -1 for none) */
H5S_sel_num_elem_non_unlim_func_t num_elem_non_unlim; /* Method to get the number of elements in a slice through the unlimited dimension */
H5S_sel_is_contiguous_func_t is_contiguous; /* Method to determine if current selection is contiguous */
H5S_sel_is_single_func_t is_single; /* Method to determine if current selection is a single block */
@ -197,12 +197,15 @@ typedef struct {
/* Selection information object */
typedef struct {
const H5S_select_class_t *type; /* Pointer to selection's class info */
hbool_t offset_changed; /* Indicate that the offset for the selection has been changed */
hssize_t offset[H5S_MAX_RANK]; /* Offset within the extent */
hsize_t num_elem; /* Number of elements in selection */
hsize_t num_elem; /* Number of elements in selection */
union {
H5S_pnt_list_t *pnt_lst; /* List of selected points (order is important) */
H5S_hyper_sel_t *hslab; /* Info about hyperslab selections */
H5S_pnt_list_t *pnt_lst; /* Info about list of selected points (order is important) */
H5S_hyper_sel_t *hslab; /* Info about hyperslab selection */
} sel_info;
} H5S_select_t;

View File

@ -15,7 +15,7 @@
* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
* Tuesday, June 16, 1998
*
* Purpose: Point selection data space I/O functions.
* Purpose: Point selection dataspace I/O functions.
*/
#include "H5Smodule.h" /* This source code file is part of the H5S module */
@ -48,7 +48,7 @@ static int H5S__point_unlim_dim(const H5S_t *space);
static htri_t H5S_point_is_contiguous(const H5S_t *space);
static htri_t H5S_point_is_single(const H5S_t *space);
static htri_t H5S_point_is_regular(const H5S_t *space);
static herr_t H5S_point_adjust_u(H5S_t *space, const hsize_t *offset);
static void H5S_point_adjust_u(H5S_t *space, const hsize_t *offset);
static herr_t H5S_point_project_scalar(const H5S_t *space, hsize_t *offset);
static herr_t H5S_point_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
static herr_t H5S_point_iter_init(H5S_sel_iter_t *iter, const H5S_t *space);
@ -426,7 +426,7 @@ H5S_point_add(H5S_t *space, H5S_seloper_t op, size_t num_elem, const hsize_t *co
/* Insert the list of points selected in the proper place */
if(op == H5S_SELECT_SET || op == H5S_SELECT_PREPEND) {
/* Append current list, if there is one */
if(space->select.sel_info.pnt_lst->head != NULL)
if(NULL != space->select.sel_info.pnt_lst->head)
curr->next = space->select.sel_info.pnt_lst->head;
/* Put new list in point selection */
@ -687,8 +687,8 @@ static htri_t
H5S_point_is_valid (const H5S_t *space)
{
H5S_pnt_node_t *curr; /* Point information nodes */
unsigned u; /* Counter */
htri_t ret_value=TRUE; /* return value */
unsigned u; /* Counter */
htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
@ -742,7 +742,7 @@ H5Sget_select_elem_npoints(hid_t spaceid)
/* Check args */
if(NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
if(H5S_GET_SELECT_TYPE(space) != H5S_SEL_POINTS)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an element selection")
@ -786,7 +786,7 @@ H5S_point_serial_size (const H5S_t *space)
* <type (4 bytes)> + <version (4 bytes)> + <padding (4 bytes)> +
* <length (4 bytes)> + <rank (4 bytes)> + <# of points (4 bytes)> = 24 bytes
*/
ret_value=24;
ret_value = 24;
/* Count points in selection */
curr=space->select.sel_info.pnt_lst->head;
@ -1055,7 +1055,7 @@ H5Sget_select_elem_pointlist(hid_t spaceid, hsize_t startpoint,
if(NULL == buf)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer")
if(NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
if(H5S_GET_SELECT_TYPE(space) != H5S_SEL_POINTS)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a point selection")
@ -1097,11 +1097,12 @@ H5S_point_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
{
H5S_pnt_node_t *node; /* Point node */
unsigned rank; /* Dataspace rank */
unsigned u; /* index variable */
herr_t ret_value = SUCCEED; /* Return value */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT
/* Sanity check */
HDassert(space);
HDassert(start);
HDassert(end);
@ -1353,11 +1354,11 @@ H5S_point_is_regular(const H5S_t *space)
PURPOSE
Adjust a "point" selection by subtracting an offset
USAGE
herr_t H5S_point_adjust_u(space, offset)
void H5S_point_adjust_u(space, offset)
H5S_t *space; IN/OUT: Pointer to dataspace to adjust
const hsize_t *offset; IN: Offset to subtract
RETURNS
Non-negative on success, negative on failure
None
DESCRIPTION
Moves a point selection by subtracting an offset from it.
GLOBAL VARIABLES
@ -1365,7 +1366,7 @@ H5S_point_is_regular(const H5S_t *space)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
static void
H5S_point_adjust_u(H5S_t *space, const hsize_t *offset)
{
H5S_pnt_node_t *node; /* Point node */
@ -1395,7 +1396,7 @@ H5S_point_adjust_u(H5S_t *space, const hsize_t *offset)
node = node->next;
} /* end while */
FUNC_LEAVE_NOAPI(SUCCEED)
FUNC_LEAVE_NOAPI_VOID
} /* H5S_point_adjust_u() */
@ -1692,7 +1693,7 @@ H5S_point_get_seq_list(const H5S_t *space, unsigned flags, H5S_sel_iter_t *iter,
/* Get the dataspace dimensions */
if((ndims = H5S_get_simple_extent_dims (space, dims, NULL)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to retrieve data space dimensions")
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to retrieve dataspace dimensions")
/* Walk through the points in the selection, starting at the current */
/* location in the iterator */

View File

@ -148,7 +148,6 @@ typedef struct H5S_sel_iter_op_t {
#define H5S_GET_SELECT_TYPE(S) ((S)->select.type->type)
#define H5S_SELECT_GET_SEQ_LIST(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN) ((*(S)->select.type->get_seq_list)(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN))
#define H5S_SELECT_VALID(S) ((*(S)->select.type->is_valid)(S))
#define H5S_SELECT_RELEASE(S) ((*(S)->select.type->release)(S))
#define H5S_SELECT_SERIAL_SIZE(S) ((*(S)->select.type->serial_size)(S))
#define H5S_SELECT_SERIALIZE(S,BUF) ((*(S)->select.type->serialize)(S,BUF))
#define H5S_SELECT_BOUNDS(S,START,END) ((*(S)->select.type->bounds)(S,START,END))
@ -174,7 +173,6 @@ typedef struct H5S_sel_iter_op_t {
#define H5S_GET_SELECT_TYPE(S) (H5S_get_select_type(S))
#define H5S_SELECT_GET_SEQ_LIST(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN) (H5S_select_get_seq_list(S,FLAGS,ITER,MAXSEQ,MAXBYTES,NSEQ,NBYTES,OFF,LEN))
#define H5S_SELECT_VALID(S) (H5S_select_valid(S))
#define H5S_SELECT_RELEASE(S) (H5S_select_release(S))
#define H5S_SELECT_SERIAL_SIZE(S) (H5S_select_serial_size(S))
#define H5S_SELECT_SERIALIZE(S,BUF) (H5S_select_serialize(S,BUF))
#define H5S_SELECT_BOUNDS(S,START,END) (H5S_get_select_bounds(S,START,END))
@ -193,8 +191,9 @@ typedef struct H5S_sel_iter_op_t {
#define H5S_SELECT_ITER_NEXT_BLOCK(ITER) (H5S_select_iter_next_block(ITER))
#define H5S_SELECT_ITER_RELEASE(ITER) (H5S_select_iter_release(ITER))
#endif /* H5S_MODULE */
/* Handle these two callbacks in a special way, since they have prologs that need to be executed */
/* Handle these callbacks in a special way, since they have prologs that need to be executed */
#define H5S_SELECT_COPY(DST,SRC,SHARE) (H5S_select_copy(DST,SRC,SHARE))
#define H5S_SELECT_RELEASE(S) (H5S_select_release(S))
#define H5S_SELECT_DESERIALIZE(S,BUF) (H5S_select_deserialize(S,BUF))
@ -259,7 +258,7 @@ H5_DLL herr_t H5S_select_serialize(const H5S_t *space, uint8_t **p);
H5_DLL htri_t H5S_select_is_contiguous(const H5S_t *space);
H5_DLL htri_t H5S_select_is_single(const H5S_t *space);
H5_DLL htri_t H5S_select_is_regular(const H5S_t *space);
H5_DLL herr_t H5S_select_adjust_u(H5S_t *space, const hsize_t *offset);
H5_DLL void H5S_select_adjust_u(H5S_t *space, const hsize_t *offset);
H5_DLL herr_t H5S_select_project_scalar(const H5S_t *space, hsize_t *offset);
H5_DLL herr_t H5S_select_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
H5_DLL herr_t H5S_select_project_intersection(const H5S_t *src_space,
@ -278,16 +277,16 @@ H5_DLL herr_t H5S_select_elements(H5S_t *space, H5S_seloper_t op,
size_t num_elem, const hsize_t *coord);
/* Operations on hyperslab selections */
H5_DLL herr_t H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, const hsize_t start[],
H5_DLL herr_t H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[],
const hsize_t *stride, const hsize_t count[], const hsize_t *block);
H5_DLL herr_t H5S_hyper_add_span_element(H5S_t *space, unsigned rank,
hsize_t *coords);
const hsize_t *coords);
H5_DLL herr_t H5S_hyper_reset_scratch(H5S_t *space);
H5_DLL herr_t H5S_hyper_convert(H5S_t *space);
#ifdef LATER
H5_DLL htri_t H5S_hyper_intersect (H5S_t *space1, H5S_t *space2);
#endif /* LATER */
H5_DLL htri_t H5S_hyper_intersect_block (H5S_t *space, hsize_t *start, hsize_t *end);
H5_DLL htri_t H5S_hyper_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *end);
H5_DLL herr_t H5S_hyper_adjust_s(H5S_t *space, const hssize_t *offset);
H5_DLL htri_t H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset);
H5_DLL herr_t H5S_hyper_denormalize_offset(H5S_t *space, const hssize_t *old_offset);

View File

@ -32,8 +32,8 @@
typedef enum H5S_class_t {
H5S_NO_CLASS = -1, /*error */
H5S_SCALAR = 0, /*scalar variable */
H5S_SIMPLE = 1, /*simple data space */
H5S_NULL = 2 /*null data space */
H5S_SIMPLE = 1, /*simple dataspace */
H5S_NULL = 2 /*null dataspace */
} H5S_class_t;
/* Different ways of combining selections */

View File

@ -112,7 +112,7 @@ H5S_select_offset(H5S_t *space, const hssize_t *offset)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
H5S_select_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection)
H5S_select_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection)
{
herr_t ret_value = FAIL; /* Return value */
@ -123,10 +123,10 @@ H5S_select_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection)
HDassert(src);
/* Copy regular fields */
dst->select=src->select;
dst->select = src->select;
/* Perform correct type of copy based on the type of selection */
if((ret_value=(*src->select.type->copy)(dst,src,share_selection))<0)
if((ret_value = (*src->select.type->copy)(dst,src,share_selection)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "can't copy selection specific information")
done:
@ -148,8 +148,6 @@ done:
* pattern, don't call it directly, use the appropriate macro
* defined in H5Sprivate.h.
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
herr_t
@ -157,13 +155,15 @@ H5S_select_release(H5S_t *ds)
{
herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_NOAPI_NOINIT
HDassert(ds);
/* Call the selection type's release function */
ret_value=(*ds->select.type->release)(ds);
if((ret_value = (*ds->select.type->release)(ds)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_select_release() */
@ -183,8 +183,6 @@ H5S_select_release(H5S_t *ds)
* pattern, don't call it directly, use the appropriate macro
* defined in H5Sprivate.h.
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
herr_t
@ -194,13 +192,15 @@ H5S_select_get_seq_list(const H5S_t *space, unsigned flags,
{
herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
FUNC_ENTER_NOAPI_NOINIT
HDassert(space);
/* Call the selection type's get_seq_list function */
ret_value = (*space->select.type->get_seq_list)(space, flags, iter, maxseq, maxbytes, nseq, nbytes, off, len);
if((ret_value = (*space->select.type->get_seq_list)(space, flags, iter, maxseq, maxbytes, nseq, nbytes, off, len)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "unable to get selection sequence list")
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S_select_get_seq_list() */
@ -220,8 +220,6 @@ H5S_select_get_seq_list(const H5S_t *space, unsigned flags,
* pattern, don't call it directly, use the appropriate macro
* defined in H5Sprivate.h.
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
hssize_t
@ -895,11 +893,11 @@ H5S_select_is_regular(const H5S_t *space)
PURPOSE
Adjust a selection by subtracting an offset
USAGE
herr_t H5S_select_adjust_u(space, offset)
void H5S_select_adjust_u(space, offset)
H5S_t *space; IN/OUT: Pointer to dataspace to adjust
const hsize_t *offset; IN: Offset to subtract
RETURNS
Non-negative on success, negative on failure
None
DESCRIPTION
Moves a selection by subtracting an offset from it.
GLOBAL VARIABLES
@ -910,19 +908,18 @@ H5S_select_is_regular(const H5S_t *space)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
void
H5S_select_adjust_u(H5S_t *space, const hsize_t *offset)
{
herr_t ret_value = FAIL; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
HDassert(offset);
ret_value = (*space->select.type->adjust_u)(space, offset);
(*space->select.type->adjust_u)(space, offset);
FUNC_LEAVE_NOAPI(ret_value)
FUNC_LEAVE_NOAPI_VOID
} /* H5S_select_adjust_u() */
@ -1610,8 +1607,8 @@ H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2)
{
H5S_sel_iter_t *iter_a = NULL; /* Selection a iteration info */
H5S_sel_iter_t *iter_b = NULL; /* Selection b iteration info */
hbool_t iter_a_init = 0; /* Selection a iteration info has been initialized */
hbool_t iter_b_init = 0; /* Selection b iteration info has been initialized */
hbool_t iter_a_init = FALSE; /* Selection a iteration info has been initialized */
hbool_t iter_b_init = FALSE; /* Selection b iteration info has been initialized */
htri_t ret_value = TRUE; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@ -1620,13 +1617,13 @@ H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2)
HDassert(space1);
HDassert(space2);
/* Special case for one or both dataspaces being scalar */
if(space1->extent.rank == 0 || space2->extent.rank == 0) {
/* Check for different number of elements selected */
if(H5S_GET_SELECT_NPOINTS(space1) != H5S_GET_SELECT_NPOINTS(space2))
HGOTO_DONE(FALSE)
} /* end if */
else {
/* Check for different number of elements selected */
if(H5S_GET_SELECT_NPOINTS(space1) != H5S_GET_SELECT_NPOINTS(space2))
HGOTO_DONE(FALSE)
/* Check special cases if both dataspaces aren't scalar */
/* (If only one is, the number of selected points check is sufficient) */
if(space1->extent.rank > 0 && space2->extent.rank > 0) {
const H5S_t *space_a; /* Dataspace with larger rank */
const H5S_t *space_b; /* Dataspace with smaller rank */
unsigned space_a_rank; /* Number of dimensions of dataspace A */
@ -1696,7 +1693,7 @@ H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2)
space_b_dim--;
} /* end while */
/* Since we are selecting the entire spaces, we must also verify that space_a
/* Since we are selecting the entire space, we must also verify that space_a
* has size 1 in all dimensions that it does not share with space_b.
*/
while(space_a_dim >= 0) {
@ -1707,6 +1704,7 @@ H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2)
} /* end while */
} /* end if */
else if((H5S_GET_SELECT_TYPE(space1) == H5S_SEL_NONE) || (H5S_GET_SELECT_TYPE(space2) == H5S_SEL_NONE)) {
/* (Both must be, at this point, if one is) */
HGOTO_DONE(TRUE)
} /* end if */
else if((H5S_GET_SELECT_TYPE(space_a) == H5S_SEL_HYPERSLABS && space_a->select.sel_info.hslab->diminfo_valid)
@ -1746,13 +1744,13 @@ H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2)
} /* end if */
/* Iterate through all the blocks in the selection */
else {
hsize_t start_a[H5O_LAYOUT_NDIMS]; /* Start point of selection block in dataspace a */
hsize_t start_b[H5O_LAYOUT_NDIMS]; /* Start point of selection block in dataspace b */
hsize_t end_a[H5O_LAYOUT_NDIMS]; /* End point of selection block in dataspace a */
hsize_t end_b[H5O_LAYOUT_NDIMS]; /* End point of selection block in dataspace b */
hsize_t off_a[H5O_LAYOUT_NDIMS]; /* Offset of selection a blocks */
hsize_t off_b[H5O_LAYOUT_NDIMS]; /* Offset of selection b blocks */
hbool_t first_block = TRUE; /* Flag to indicate the first block */
hsize_t start_a[H5S_MAX_RANK]; /* Start point of selection block in dataspace a */
hsize_t start_b[H5S_MAX_RANK]; /* Start point of selection block in dataspace b */
hsize_t end_a[H5S_MAX_RANK]; /* End point of selection block in dataspace a */
hsize_t end_b[H5S_MAX_RANK]; /* End point of selection block in dataspace b */
hsize_t off_a[H5S_MAX_RANK]; /* Offset of selection a blocks */
hsize_t off_b[H5S_MAX_RANK]; /* Offset of selection b blocks */
hbool_t first_block = TRUE; /* Flag to indicate the first block */
/* Allocate the selection iterators */
if(NULL == (iter_a = H5FL_MALLOC(H5S_sel_iter_t)))
@ -1767,10 +1765,10 @@ H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2)
*/
if(H5S_select_iter_init(iter_a, space_a, (size_t)0) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator a")
iter_a_init = 1;
iter_a_init = TRUE;
if(H5S_select_iter_init(iter_b, space_b, (size_t)0) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator b")
iter_b_init = 1;
iter_b_init = TRUE;
/* Iterate over all the blocks in each selection */
while(1) {
@ -1873,7 +1871,7 @@ H5S_select_shape_same(const H5S_t *space1, const H5S_t *space2)
} /* end else */
} /* end while */
} /* end else */
} /* end else */
} /* end if */
done:
if(iter_a_init && H5S_SELECT_ITER_RELEASE(iter_a) < 0)
@ -1899,7 +1897,7 @@ done:
topologically identical to that in b (as verified by
H5S_select_shape_same().
This function exists, as some I/O code chokes of topologically
This function exists, as some I/O code chokes on topologically
identical selections with different ranks. At least to begin
with, we will deal with the issue by constructing projections
of the memory dataspace with ranks equaling those of the file
@ -2149,10 +2147,9 @@ H5S_select_construct_projection(const H5S_t *base_space, H5S_t **new_space_ptr,
done:
/* Cleanup on error */
if(ret_value < 0) {
if(ret_value < 0)
if(new_space && H5S_close(new_space) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release dataspace")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_select_construct_projection() */
@ -2280,7 +2277,7 @@ done:
H5S_t *src_space; IN: Selection that is mapped to dst_space, and intersected with src_intersect_space
H5S_t *dst_space; IN: Selection that is mapped to src_space, and which contains the result
H5S_t *src_intersect_space; IN: Selection whose intersection with src_space is projected to dst_space to obtain the result
H5S_t *proj_space; OUT: Will contain the result (intersection of src_intersect_space and src_space projected from src_space to dst_space) after the operation
H5S_t **new_space_ptr; OUT: Will contain the result (intersection of src_intersect_space and src_space projected from src_space to dst_space) after the operation
RETURNS
Non-negative on success/Negative on failure.
@ -2289,7 +2286,7 @@ done:
Projects the intersection of of the selections of src_space and
src_intersect_space within the selection of src_space as a selection
within the selection of dst_space. The result is placed in the
selection of proj_space.
selection of new_space_ptr.
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
@ -2351,10 +2348,9 @@ H5S_select_project_intersection(const H5S_t *src_space, const H5S_t *dst_space,
done:
/* Cleanup on error */
if(ret_value < 0) {
if(ret_value < 0)
if(new_space && H5S_close(new_space) < 0)
HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release dataspace")
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_select_project_intersection() */
@ -2407,28 +2403,26 @@ H5S_select_subtract(H5S_t *space, H5S_t *subtract_space)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection")
} /* end if */
else {
/* Check for point selection in subtract_space, convert to
* hyperslab */
/* Check for point selection in subtract_space, convert to hyperslab */
if(subtract_space->select.type->type == H5S_SEL_POINTS)
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "point selections not currently supported")
/* Check for point or all selection in space, convert to hyperslab
*/
/* Check for point or all selection in space, convert to hyperslab */
if(space->select.type->type == H5S_SEL_ALL) {
/* Convert current "all" selection to "real" hyperslab selection */
/* Then allow operation to proceed */
hsize_t tmp_start[H5O_LAYOUT_NDIMS]; /* Temporary start information */
hsize_t tmp_stride[H5O_LAYOUT_NDIMS]; /* Temporary stride information */
hsize_t tmp_count[H5O_LAYOUT_NDIMS]; /* Temporary count information */
hsize_t tmp_block[H5O_LAYOUT_NDIMS]; /* Temporary block information */
unsigned i; /* Local index variable */
hsize_t tmp_start[H5S_MAX_RANK]; /* Temporary start information */
hsize_t tmp_stride[H5S_MAX_RANK]; /* Temporary stride information */
hsize_t tmp_count[H5S_MAX_RANK]; /* Temporary count information */
hsize_t tmp_block[H5S_MAX_RANK]; /* Temporary block information */
unsigned u; /* Local index variable */
/* Fill in temporary information for the dimensions */
for(i = 0; i < space->extent.rank; i++) {
tmp_start[i] = 0;
tmp_stride[i] = 1;
tmp_count[i] = 1;
tmp_block[i] = space->extent.size[i];
for(u = 0; u < space->extent.rank; u++) {
tmp_start[u] = 0;
tmp_stride[u] = 1;
tmp_count[u] = 1;
tmp_block[u] = space->extent.size[u];
} /* end for */
/* Convert to hyperslab selection */

View File

@ -838,10 +838,10 @@ H5Z_prepare_prelude_callback_dcpl(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type
size_t u; /* Local index variable */
/* Create a dataspace for a chunk & set the extent */
for (u = 0; u < dcpl_layout->u.chunk.ndims; u++)
for(u = 0; u < dcpl_layout->u.chunk.ndims; u++)
chunk_dims[u] = dcpl_layout->u.chunk.dim[u];
if (NULL == (space = H5S_create_simple(dcpl_layout->u.chunk.ndims, chunk_dims, NULL)))
HGOTO_ERROR (H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
if(NULL == (space = H5S_create_simple(dcpl_layout->u.chunk.ndims, chunk_dims, NULL)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
/* Get ID for dataspace to pass to filter routines */
if ((space_id = H5I_register(H5I_DATASPACE, space, FALSE)) < 0) {

View File

@ -888,7 +888,7 @@ H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
/* Get dataspace */
if(NULL == (ds = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Get total number of elements in the chunk */
if((npoints = H5S_GET_EXTENT_NPOINTS(ds)) < 0)

View File

@ -890,7 +890,7 @@ H5Z_set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
/* Get dataspace */
if(NULL == (ds = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Get total number of elements in the chunk */
if((npoints = H5S_GET_EXTENT_NPOINTS(ds)) < 0)

View File

@ -186,7 +186,7 @@ H5Z_set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
/* Get dataspace */
if(NULL == (ds = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space")
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
/* Get dimensions for dataspace */
if((ndims = H5S_get_simple_extent_dims(ds, dims, NULL)) < 0)

View File

@ -1304,7 +1304,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...)
case H5I_DATASPACE:
HDfprintf(out, "%ld (dspace)", (long)obj);
/* Save the rank of simple data spaces for arrays */
/* Save the rank of simple dataspaces for arrays */
/* This may generate recursive call to the library... -QAK */
{
H5S_t *space;

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TEST)
project (HDF5_TEST C)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
@ -9,9 +9,8 @@ add_definitions (${HDF_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Generate the H5srcdir_str.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
set (srcdir ${HDF5_TEST_SOURCE_DIR})
configure_file (${HDF5_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
#################################################################################
# Define Test Library Sources
@ -30,6 +29,7 @@ set (TEST_LIB_HEADERS
)
add_library (${HDF5_TEST_LIB_TARGET} STATIC ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS})
set_property(TARGET ${HDF5_TEST_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TEST_LIB_TARGET} STATIC " " " ")
if (MSVC)
target_link_libraries (${HDF5_TEST_LIB_TARGET} PRIVATE "ws2_32.lib")
@ -47,6 +47,7 @@ set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES
if (BUILD_SHARED_LIBS)
add_library (${HDF5_TEST_LIBSH_TARGET} SHARED ${TEST_LIB_SOURCES} ${TEST_LIB_HEADERS})
set_property(TARGET ${HDF5_TEST_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TEST_LIBSH_TARGET} SHARED " " " ")
if (MSVC)
target_link_libraries (${HDF5_TEST_LIBSH_TARGET} PRIVATE "ws2_32.lib")
@ -94,10 +95,9 @@ endif ()
set (HDF5_TEST_PLUGIN_CORENAME "${plugin_name}")
set (HDF5_TEST_PLUGIN_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_CORENAME}")
set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
add_definitions (${HDF_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c)
set_property(TARGET ${HDF5_TEST_PLUGIN_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB")
@ -120,10 +120,9 @@ endif ()
set (HDF5_TEST_PLUGIN_CORENAME "${plugin_name}")
set (HDF5_TEST_PLUGIN_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_CORENAME}")
set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME})
add_definitions (${HDF_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TEST_PLUGIN_TARGET} SHARED ${HDF5_TEST_SOURCE_DIR}/${plugin_name}.c)
set_property(TARGET ${HDF5_TEST_PLUGIN_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TEST_PLUGIN_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TEST_PLUGIN_TARGET} PUBLIC ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TEST_PLUGIN_TARGET} ${HDF5_TEST_PLUGIN_NAME} SHARED "LIB")
@ -252,11 +251,13 @@ set (H5_TESTS
macro (ADD_H5_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
set_property(TARGET ${file} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR}")
TARGET_C_PROPERTIES (${file} STATIC " " " ")
target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET})
set_target_properties (${file} PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c)
set_property(TARGET ${file}-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR}")
TARGET_C_PROPERTIES (${file}-shared SHARED " " " ")
target_link_libraries (${file}-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (${file}-shared PROPERTIES FOLDER test)
@ -281,11 +282,13 @@ endforeach ()
#-- Adding test for testhdf5
add_executable (testhdf5 ${testhdf5_SOURCES})
set_property(TARGET testhdf5 APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (testhdf5 STATIC " " " ")
target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET})
set_target_properties (testhdf5 PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (testhdf5-shared ${testhdf5_SOURCES})
set_property(TARGET testhdf5-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ")
target_link_libraries (testhdf5-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET})
set_target_properties (testhdf5-shared PROPERTIES FOLDER test)
@ -293,11 +296,13 @@ endif ()
#-- Adding test for cache_image
add_executable (cache_image ${cache_image_SOURCES})
set_property(TARGET cache_image APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (cache_image STATIC " " " ")
target_link_libraries (cache_image ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (cache_image PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (cache_image-shared ${cache_image_SOURCES})
set_property(TARGET cache_image-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (cache_image-shared SHARED " " " ")
target_link_libraries (cache_image-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (cache_image-shared PROPERTIES FOLDER test)
@ -305,11 +310,13 @@ endif ()
#-- Adding test for ttsafe
add_executable (ttsafe ${ttsafe_SOURCES})
set_property(TARGET ttsafe APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (ttsafe STATIC " " " ")
target_link_libraries (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (ttsafe PROPERTIES FOLDER test)
if (BUILD_SHARED_LIBS)
add_executable (ttsafe-shared ${ttsafe_SOURCES})
set_property(TARGET ttsafe-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (ttsafe-shared SHARED " " " ")
target_link_libraries (ttsafe-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (ttsafe-shared PROPERTIES FOLDER test)
@ -388,6 +395,7 @@ endforeach ()
# This has to be copied to the test directory for execve() to find it
# and it can't be renamed (i.e., no <foo>-shared).
add_executable (accum_swmr_reader ${HDF5_TEST_SOURCE_DIR}/accum_swmr_reader.c)
set_property(TARGET accum_swmr_reader APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (accum_swmr_reader STATIC " " " ")
target_link_libraries (accum_swmr_reader ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (accum_swmr_reader PROPERTIES FOLDER test)
@ -403,11 +411,13 @@ endif ()
##############################################################################
if (BUILD_SHARED_LIBS)
add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c)
set_property(TARGET filter_plugin APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (filter_plugin SHARED " " " ")
target_link_libraries (filter_plugin ${HDF5_TEST_LIB_TARGET})
set_target_properties (filter_plugin PROPERTIES FOLDER test)
else ()
add_executable (filter_plugin ${HDF5_TEST_SOURCE_DIR}/filter_plugin.c)
set_property(TARGET filter_plugin APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (filter_plugin STATIC " " " ")
target_link_libraries (filter_plugin ${HDF5_TEST_LIB_TARGET})
set_target_properties (filter_plugin PROPERTIES FOLDER test)
@ -418,11 +428,13 @@ endif ()
##############################################################################
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})
set_property(TARGET use_append_chunk APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
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})
set_property(TARGET use_append_chunk-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
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)
@ -430,11 +442,13 @@ endif ()
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})
set_property(TARGET use_append_mchunks APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
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})
set_property(TARGET use_append_mchunks-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
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)
@ -442,11 +456,13 @@ endif ()
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})
set_property(TARGET use_disable_mdc_flushes APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
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})
set_property(TARGET use_disable_mdc_flushes-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
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)

View File

@ -1009,6 +1009,7 @@ endif ()
if (HDF5_BUILD_GENERATORS)
macro (ADD_H5_GENERATOR genfile)
add_executable (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c)
set_property(TARGET ${genfile} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${genfile} STATIC " " " ")
target_link_libraries (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (${genfile} PROPERTIES FOLDER generator/test)

View File

@ -34,7 +34,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_builddir)/src
# test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes
TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh test_filenotclosed.sh\
testswmr.sh testvdsswmr.sh testflushrefresh.sh test_usecases.sh
SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) test_filenotclosed$(EXEEXT) \
SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) filenotclosed$(EXEEXT) \
flushrefresh$(EXEEXT) use_append_chunk$(EXEEXT) use_append_mchunks$(EXEEXT) use_disable_mdc_flushes$(EXEEXT) \
swmr_generator$(EXEEXT) swmr_reader$(EXEEXT) swmr_writer$(EXEEXT) \
swmr_remove_reader$(EXEEXT) swmr_remove_writer$(EXEEXT) swmr_addrem_writer$(EXEEXT) \

View File

@ -1644,8 +1644,8 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf,
/* Advance to next element */
cube_ptr++;
expected_value++;
s++;
m++;
s++;
m++;
} while((cube_rank > 0) && (m < edge_size));
l++;
} while((cube_rank > 1) && (l < edge_size));
@ -1662,10 +1662,10 @@ verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf,
/****************************************************************
**
** test_select_hyper_contig_dr__run_test(): Test H5S (dataspace)
** selection code with contiguous source and target having
** test_select_hyper_contig_dr__run_test(): Test H5S (dataspace)
** selection code with contiguous source and target having
** different ranks but the same shape. We have already
** tested H5S_shape_same in isolation, so now we try to do
** tested H5S_shape_same in isolation, so now we try to do
** I/O.
**
****************************************************************/
@ -1769,13 +1769,13 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
CHECK(file_large_cube_sid, FAIL, "H5Screate_simple");
/* if chunk edge size is greater than zero, set up the small and
* large data set creation property lists to specify chunked
* large data set creation property lists to specify chunked
* datasets.
*/
if(chunk_edge_size > 0) {
hsize_t chunk_dims[SS_DR_MAX_RANK]; /* Chunk dimensions */
chunk_dims[0] = chunk_dims[1] =
chunk_dims[0] = chunk_dims[1] =
chunk_dims[2] = chunk_dims[3] = chunk_dims[4] = (hsize_t)chunk_edge_size;
small_cube_dcpl_id = H5Pcreate(H5P_DATASET_CREATE);
@ -1799,7 +1799,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
} /* end if */
/* create the small cube dataset */
small_cube_dataset = H5Dcreate2(fid1, "small_cube_dataset", dset_type,
small_cube_dataset = H5Dcreate2(fid1, "small_cube_dataset", dset_type,
small_cube_sid, H5P_DEFAULT, small_cube_dcpl_id, H5P_DEFAULT);
CHECK(small_cube_dataset, FAIL, "H5Dcreate2");
@ -1810,7 +1810,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
} /* end if */
/* create the large cube dataset */
large_cube_dataset = H5Dcreate2(fid1, "large_cube_dataset", dset_type,
large_cube_dataset = H5Dcreate2(fid1, "large_cube_dataset", dset_type,
file_large_cube_sid, H5P_DEFAULT, large_cube_dcpl_id, H5P_DEFAULT);
CHECK(large_cube_dataset, FAIL, "H5Dcreate2");
@ -1822,16 +1822,16 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
/* write initial data to the on disk datasets */
ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid,
ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid,
small_cube_sid, xfer_plist, cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid,
ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid,
file_large_cube_sid, xfer_plist, cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
/* read initial data from disk and verify that it is as expected. */
ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid,
ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, small_cube_sid,
small_cube_sid, xfer_plist, small_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
@ -1839,7 +1839,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
verify_select_hyper_contig_dr__run_test(small_cube_buf_1, small_cube_size,
edge_size, small_rank);
ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid,
ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, mem_large_cube_sid,
file_large_cube_sid, xfer_plist, large_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
@ -1852,12 +1852,12 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
* of different rank that H5S_select_shape_same() views as being of the
* same shape.
*
* Start by reading small_rank-D slice from the on disk large cube, and
* verifying that the data read is correct. Verify that H5S_select_shape_same()
* Start by reading small_rank-D slice from the on disk large cube, and
* verifying that the data read is correct. Verify that H5S_select_shape_same()
* returns true on the memory and file selections.
*/
/* set up start, stride, count, and block -- note that we will
* change start[] so as to read slices of the large cube.
*/
@ -1889,18 +1889,18 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
start[3] = (hsize_t)x;
start[4] = (hsize_t)0;
ret = H5Sselect_hyperslab(file_large_cube_sid,
ret = H5Sselect_hyperslab(file_large_cube_sid,
H5S_SELECT_SET,
start_ptr,
stride_ptr,
count_ptr,
start_ptr,
stride_ptr,
count_ptr,
block_ptr);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* verify that H5S_select_shape_same() reports the two
/* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
check = H5S_select_shape_same_test(small_cube_sid,
check = H5S_select_shape_same_test(small_cube_sid,
file_large_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
@ -1937,7 +1937,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
} while((large_rank >= 4) && (small_rank <= 3) && (v < edge_size));
u++;
} while((large_rank >= 5) && (small_rank <= 4) && (u < edge_size));
/* similarly, read the on disk small cube into slices through the in memory
* large cube, and verify that the correct data (and only the correct data)
@ -1965,19 +1965,19 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
start[3] = (hsize_t)x;
start[4] = (hsize_t)0;
ret = H5Sselect_hyperslab(mem_large_cube_sid,
ret = H5Sselect_hyperslab(mem_large_cube_sid,
H5S_SELECT_SET,
start_ptr,
stride_ptr,
count_ptr,
start_ptr,
stride_ptr,
count_ptr,
block_ptr);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* verify that H5S_select_shape_same() reports the two
/* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
check = H5S_select_shape_same_test(small_cube_sid,
check = H5S_select_shape_same_test(small_cube_sid,
mem_large_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
@ -1992,7 +1992,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
CHECK(ret, FAIL, "H5Dread");
/* verify that the expected data and only the
/* verify that the expected data and only the
* expected data was read.
*/
start_index = (u * edge_size * edge_size * edge_size * edge_size) +
@ -2028,7 +2028,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
/* Zero out the buffer for the next pass */
HDmemset(large_cube_buf_1 + start_index, 0, small_cube_size * sizeof(uint16_t));
x++;
} while((large_rank >= 2) && (small_rank <= 1) && (x < edge_size));
w++;
@ -2039,16 +2039,16 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
} while((large_rank >= 5) && (small_rank <= 4) && (u < edge_size));
/* now we go in the opposite direction, verifying that we can write
* from memory to file using selections of different rank that
/* now we go in the opposite direction, verifying that we can write
* from memory to file using selections of different rank that
* H5S_select_shape_same() views as being of the same shape.
*
* Start by writing small_rank D slices from the in memory large cube, to
* Start by writing small_rank D slices from the in memory large cube, to
* the the on disk small cube dataset. After each write, read the small
* cube dataset back from disk, and verify that it contains the expected
* data. Verify that H5S_select_shape_same() returns true on the
* data. Verify that H5S_select_shape_same() returns true on the
* memory and file selections.
*/
*/
u = 0;
do {
@ -2064,15 +2064,15 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
*/
/* zero out the on disk small cube */
ret = H5Dwrite(small_cube_dataset,
H5T_NATIVE_UINT16,
small_cube_sid,
small_cube_sid,
xfer_plist,
ret = H5Dwrite(small_cube_dataset,
H5T_NATIVE_UINT16,
small_cube_sid,
small_cube_sid,
xfer_plist,
zero_buf);
CHECK(ret, FAIL, "H5Dwrite");
/* select the portion of the in memory large cube from which we
/* select the portion of the in memory large cube from which we
* are going to write data.
*/
start[0] = (hsize_t)u;
@ -2081,40 +2081,40 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
start[3] = (hsize_t)x;
start[4] = (hsize_t)0;
ret = H5Sselect_hyperslab(mem_large_cube_sid,
ret = H5Sselect_hyperslab(mem_large_cube_sid,
H5S_SELECT_SET,
start_ptr,
stride_ptr,
count_ptr,
start_ptr,
stride_ptr,
count_ptr,
block_ptr);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* verify that H5S_select_shape_same() reports the in
* memory slice through the cube selection and the
/* verify that H5S_select_shape_same() reports the in
* memory slice through the cube selection and the
* on disk full small cube selections as having the same shape.
*/
check = H5S_select_shape_same_test(small_cube_sid,
check = H5S_select_shape_same_test(small_cube_sid,
mem_large_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* write the slice from the in memory large cube to the on disk small cube */
ret = H5Dwrite(small_cube_dataset,
H5T_NATIVE_UINT16,
mem_large_cube_sid,
small_cube_sid,
xfer_plist,
ret = H5Dwrite(small_cube_dataset,
H5T_NATIVE_UINT16,
mem_large_cube_sid,
small_cube_sid,
xfer_plist,
cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
/* read the on disk small cube into memory */
ret = H5Dread(small_cube_dataset,
ret = H5Dread(small_cube_dataset,
H5T_NATIVE_UINT16,
small_cube_sid,
small_cube_sid,
xfer_plist,
small_cube_sid,
xfer_plist,
small_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
@ -2134,7 +2134,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
} /* end for */
if(mis_match )
TestErrPrintf("small cube data don't match! Line=%d\n",__LINE__);
x++;
} while((large_rank >= 2) && (small_rank <= 1) && (x < edge_size));
w++;
@ -2145,10 +2145,10 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
} while((large_rank >= 5) && (small_rank <= 4) && (u < edge_size));
/* Now write the contents of the in memory small cube to slices of
/* Now write the contents of the in memory small cube to slices of
* the on disk cube. After each write, read the on disk cube
* into memeory, and verify that it contains the expected
* data. Verify that H5S_select_shape_same() returns true on
* into memeory, and verify that it contains the expected
* data. Verify that H5S_select_shape_same() returns true on
* the memory and file selections.
*/
@ -2173,16 +2173,16 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
*/
/* zero out the on disk cube */
ret = H5Dwrite(large_cube_dataset,
H5T_NATIVE_USHORT,
mem_large_cube_sid,
file_large_cube_sid,
xfer_plist,
ret = H5Dwrite(large_cube_dataset,
H5T_NATIVE_USHORT,
mem_large_cube_sid,
file_large_cube_sid,
xfer_plist,
zero_buf);
CHECK(ret, FAIL, "H5Dwrite");
/* select the portion of the in memory large cube to which we
/* select the portion of the in memory large cube to which we
* are going to write data.
*/
start[0] = (hsize_t)u;
@ -2191,31 +2191,31 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
start[3] = (hsize_t)x;
start[4] = (hsize_t)0;
ret = H5Sselect_hyperslab(file_large_cube_sid,
ret = H5Sselect_hyperslab(file_large_cube_sid,
H5S_SELECT_SET,
start_ptr,
stride_ptr,
count_ptr,
start_ptr,
stride_ptr,
count_ptr,
block_ptr);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* verify that H5S_select_shape_same() reports the in
* memory full selection of the small cube and the
* on disk slice through the large cube selection
/* verify that H5S_select_shape_same() reports the in
* memory full selection of the small cube and the
* on disk slice through the large cube selection
* as having the same shape.
*/
check = H5S_select_shape_same_test(small_cube_sid,
check = H5S_select_shape_same_test(small_cube_sid,
file_large_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* write the cube from memory to the target slice of the disk cube */
ret = H5Dwrite(large_cube_dataset,
H5T_NATIVE_UINT16,
small_cube_sid,
file_large_cube_sid,
xfer_plist,
ret = H5Dwrite(large_cube_dataset,
H5T_NATIVE_UINT16,
small_cube_sid,
file_large_cube_sid,
xfer_plist,
cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
@ -2224,16 +2224,16 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
ret = H5Sselect_all(file_large_cube_sid);
CHECK(ret, FAIL, "H5Sselect_all");
ret = H5Dread(large_cube_dataset,
ret = H5Dread(large_cube_dataset,
H5T_NATIVE_UINT16,
mem_large_cube_sid,
file_large_cube_sid,
xfer_plist,
file_large_cube_sid,
xfer_plist,
large_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
/* verify that the expected data and only the
/* verify that the expected data and only the
* expected data was read.
*/
start_index = (u * edge_size * edge_size * edge_size * edge_size) +
@ -2266,7 +2266,7 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
} /* end for */
if(mis_match)
TestErrPrintf("large cube written from small cube has bad data! Line=%d\n", __LINE__);
x++;
} while((large_rank >= 2) && (small_rank <= 1) && (x < edge_size));
w++;
@ -2309,10 +2309,10 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf,
/****************************************************************
**
** test_select_hyper_contig_dr(): Test H5S (dataspace)
** selection code with contiguous source and target having
** test_select_hyper_contig_dr(): Test H5S (dataspace)
** selection code with contiguous source and target having
** different ranks but the same shape. We have already
** tested H5S_shape_same in isolation, so now we try to do
** tested H5S_shape_same in isolation, so now we try to do
** I/O.
**
****************************************************************/
@ -2377,12 +2377,12 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
/****************************************************************
**
** test_select_hyper_checker_board_dr__select_checker_board():
** Given an n-cube data space with each edge of length
** test_select_hyper_checker_board_dr__select_checker_board():
** Given an n-cube data space with each edge of length
** edge_size, and a checker_edge_size either select a checker
** board selection of the entire cube(if sel_rank == n),
** or select a checker board selection of a
** sel_rank dimensional slice through n-cube parallel to the
** sel_rank dimensional slice through n-cube parallel to the
** sel_rank fastest changing indices, with origin (in the
** higher indices) as indicated by the start array.
**
@ -2438,7 +2438,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid,
offset_count++;
/* Now set up the stride and block arrays, and portions of the start
* and count arrays that will not be altered during the selection of
* and count arrays that will not be altered during the selection of
* the checker board.
*/
u = 0;
@ -2467,7 +2467,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid,
u++;
} /* end while */
i = 0;
do {
if(0 >= sel_offset) {
@ -2482,7 +2482,7 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid,
} /* end if */
j = 0;
do {
do {
if(1 >= sel_offset) {
if(j == 0 ) {
start[1] = 0;
@ -2535,22 +2535,22 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid,
if(((i + j + k + l + m) % 2) == 0) {
if(first_selection) {
first_selection = FALSE;
first_selection = FALSE;
ret = H5Sselect_hyperslab(tgt_n_cube_sid,
ret = H5Sselect_hyperslab(tgt_n_cube_sid,
H5S_SELECT_SET,
&(start[n_cube_offset]),
&(stride[n_cube_offset]),
&(count[n_cube_offset]),
&(start[n_cube_offset]),
&(stride[n_cube_offset]),
&(count[n_cube_offset]),
&(block[n_cube_offset]));
CHECK(ret, FAIL, "H5Sselect_hyperslab");
} /* end if */
else {
ret = H5Sselect_hyperslab(tgt_n_cube_sid,
ret = H5Sselect_hyperslab(tgt_n_cube_sid,
H5S_SELECT_OR,
&(start[n_cube_offset]),
&(stride[n_cube_offset]),
&(count[n_cube_offset]),
&(start[n_cube_offset]),
&(stride[n_cube_offset]),
&(count[n_cube_offset]),
&(block[n_cube_offset]));
CHECK(ret, FAIL, "H5Sselect_hyperslab");
} /* end else */
@ -2588,21 +2588,21 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid,
/****************************************************************
**
** test_select_hyper_checker_board_dr__verify_data():
** test_select_hyper_checker_board_dr__verify_data():
**
** Examine the supplied buffer to see if it contains the
** expected data. Return TRUE if it does, and FALSE
** Examine the supplied buffer to see if it contains the
** expected data. Return TRUE if it does, and FALSE
** otherwise.
**
** The supplied buffer is presumed to contain the results
** of read or writing a checkerboard selection of an
** of read or writing a checkerboard selection of an
** n-cube, or a checkerboard selection of an m (1 <= m < n)
** dimensional slice through an n-cube parallel to the
** fastest changing indices.
** dimensional slice through an n-cube parallel to the
** fastest changing indices.
**
** It is further presumed that the buffer was zeroed before
** the read, and that the n-cube was initialize with the
** natural numbers listed in order from the origin along
** the read, and that the n-cube was initialize with the
** natural numbers listed in order from the origin along
** the fastest changing axis.
**
** Thus for a 10x10x10 3-cube, the value stored in location
@ -2611,19 +2611,19 @@ test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid,
**
** (10 * 10 * x) + (10 * y) + z
**
** Thus, if the buffer contains the result of reading a
** Thus, if the buffer contains the result of reading a
** checker board selection of a 10x10x10 3-cube, location
** (x, y, z) will contain zero if it is not in a checker,
** and 100x + 10y + z if (x, y, z) is in a checker.
**
** If the buffer contains the result of reading a 3
** If the buffer contains the result of reading a 3
** dimensional slice (parallel to the three fastest changing
** indices) through an n cube (n > 3), then the expected
** indices) through an n cube (n > 3), then the expected
** values in the buffer will be the same, save that we will
** add a constant determined by the origin of the 3-cube
** add a constant determined by the origin of the 3-cube
** in the n-cube.
**
** Finally, the function presumes that the first element
** Finally, the function presumes that the first element
** of the buffer resides either at the origin of either
** a selected or an unselected checker.
**
@ -2683,7 +2683,7 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t * buf_ptr,
l = 0;
y = 0;
start_in_checker[3] = start_in_checker[2];
do {
do {
if(y >= checker_edge_size) {
start_in_checker[3] = ! start_in_checker[3];
y = 0;
@ -2697,7 +2697,7 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t * buf_ptr,
in_checker = ! in_checker;
z = 0;
} /* end if */
if(in_checker) {
if(*val_ptr != expected_value)
good_data = FALSE;
@ -2706,10 +2706,10 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t * buf_ptr,
if(*val_ptr != 0)
good_data = FALSE;
} /* end else */
val_ptr++;
expected_value++;
m++;
z++;
} while((rank >= (test_max_rank - 4)) && (m < edge_size));
@ -2732,10 +2732,10 @@ test_select_hyper_checker_board_dr__verify_data(uint16_t * buf_ptr,
/****************************************************************
**
** test_select_hyper_checker_board_dr__run_test(): Test H5S
** (dataspace) selection code with checker board source and
** target selections having different ranks but the same
** shape. We have already tested H5S_shape_same in
** test_select_hyper_checker_board_dr__run_test(): Test H5S
** (dataspace) selection code with checker board source and
** target selections having different ranks but the same
** shape. We have already tested H5S_shape_same in
** isolation, so now we try to do I/O.
**
****************************************************************/
@ -2860,11 +2860,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* if chunk edge size is greater than zero, set up the small and
* large data set creation property lists to specify chunked
* large data set creation property lists to specify chunked
* datasets.
*/
if(chunk_edge_size > 0) {
chunk_dims[0] = chunk_dims[1] =
chunk_dims[0] = chunk_dims[1] =
chunk_dims[2] = chunk_dims[3] = chunk_dims[4] = chunk_edge_size;
small_cube_dcpl_id = H5Pcreate(H5P_DATASET_CREATE);
@ -2889,7 +2889,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* create the small cube dataset */
small_cube_dataset = H5Dcreate2(fid, "small_cube_dataset", dset_type,
small_cube_dataset = H5Dcreate2(fid, "small_cube_dataset", dset_type,
file_small_cube_sid, H5P_DEFAULT, small_cube_dcpl_id, H5P_DEFAULT);
CHECK(small_cube_dataset, FAIL, "H5Dcreate2");
@ -2900,7 +2900,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
} /* end if */
/* create the large cube dataset */
large_cube_dataset = H5Dcreate2(fid, "large_cube_dataset", dset_type,
large_cube_dataset = H5Dcreate2(fid, "large_cube_dataset", dset_type,
file_large_cube_sid, H5P_DEFAULT, large_cube_dcpl_id, H5P_DEFAULT);
CHECK(large_cube_dataset, FAIL, "H5Dcreate2");
@ -2912,17 +2912,17 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
/* write initial data to the on disk datasets */
ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, full_small_cube_sid,
ret = H5Dwrite(small_cube_dataset, H5T_NATIVE_UINT16, full_small_cube_sid,
full_small_cube_sid, xfer_plist, cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, full_large_cube_sid,
ret = H5Dwrite(large_cube_dataset, H5T_NATIVE_UINT16, full_large_cube_sid,
full_large_cube_sid, xfer_plist, cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
/* read initial small cube data from disk and verify that it is as expected. */
ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, full_small_cube_sid,
ret = H5Dread(small_cube_dataset, H5T_NATIVE_UINT16, full_small_cube_sid,
full_small_cube_sid, xfer_plist, small_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
@ -2931,7 +2931,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
edge_size, small_rank);
/* read initial large cube data from disk and verify that it is as expected. */
ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, full_large_cube_sid,
ret = H5Dread(large_cube_dataset, H5T_NATIVE_UINT16, full_large_cube_sid,
full_large_cube_sid, xfer_plist, large_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
@ -2944,11 +2944,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* of different rank that H5S_select_shape_same() views as being of the
* same shape.
*
* Start by reading small_rank-D slice from the on disk large cube, and
* verifying that the data read is correct. Verify that H5S_select_shape_same()
* Start by reading small_rank-D slice from the on disk large cube, and
* verifying that the data read is correct. Verify that H5S_select_shape_same()
* returns true on the memory and file selections.
*
* The first step is to set up the needed checker board selection in the
* The first step is to set up the needed checker board selection in the
* in memory small small cube
*/
@ -2961,8 +2961,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
small_rank,
sel_start);
/* now read slices from the large, on-disk cube into the small cube.
* Note how we adjust sel_start only in the dimensions peculiar to the
/* now read slices from the large, on-disk cube into the small cube.
* Note how we adjust sel_start only in the dimensions peculiar to the
* large cube.
*/
@ -3007,10 +3007,10 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
sel_start
);
/* verify that H5S_select_shape_same() reports the two
/* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
check = H5S_select_shape_same_test(mem_small_cube_sid,
check = H5S_select_shape_same_test(mem_small_cube_sid,
file_large_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
@ -3045,18 +3045,18 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
TestErrPrintf("small cube read from largecube has bad data! Line=%d\n",__LINE__);
x++;
} while((large_rank >= (test_max_rank - 3)) &&
} while((large_rank >= (test_max_rank - 3)) &&
(small_rank <= (test_max_rank - 4)) && (x < edge_size));
w++;
} while((large_rank >= (test_max_rank - 2)) &&
} while((large_rank >= (test_max_rank - 2)) &&
(small_rank <= (test_max_rank - 3)) && (w < edge_size));
v++;
} while((large_rank >= (test_max_rank - 1)) &&
} while((large_rank >= (test_max_rank - 1)) &&
(small_rank <= (test_max_rank - 2)) && (v < edge_size));
u++;
} while((large_rank >= test_max_rank) &&
} while((large_rank >= test_max_rank) &&
(small_rank <= (test_max_rank - 1)) && (u < edge_size));
/* similarly, read the on disk small cube into slices through the in memory
* large cube, and verify that the correct data (and only the correct data)
@ -3114,10 +3114,10 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
sel_start
);
/* verify that H5S_select_shape_same() reports the two
/* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
check = H5S_select_shape_same_test(file_small_cube_sid,
check = H5S_select_shape_same_test(file_small_cube_sid,
mem_large_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
@ -3135,7 +3135,7 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
CHECK(ret, FAIL, "H5Dread");
/* verify that the expected data and only the
/* verify that the expected data and only the
* expected data was read.
*/
data_ok = TRUE;
@ -3183,29 +3183,29 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
TestErrPrintf("large cube read from small cube has bad data! Line=%d\n",__LINE__);
x++;
} while((large_rank >= (test_max_rank - 3)) &&
} while((large_rank >= (test_max_rank - 3)) &&
(small_rank <= (test_max_rank - 4)) && (x < edge_size));
w++;
} while((large_rank >= (test_max_rank - 2)) &&
} while((large_rank >= (test_max_rank - 2)) &&
(small_rank <= (test_max_rank - 3)) && (w < edge_size));
v++;
} while((large_rank >= (test_max_rank - 1)) &&
} while((large_rank >= (test_max_rank - 1)) &&
(small_rank <= (test_max_rank - 2)) && (v < edge_size));
u++;
} while((large_rank >= test_max_rank) &&
} while((large_rank >= test_max_rank) &&
(small_rank <= (test_max_rank - 1)) && (u < edge_size));
/* now we go in the opposite direction, verifying that we can write
* from memory to file using selections of different rank that
/* now we go in the opposite direction, verifying that we can write
* from memory to file using selections of different rank that
* H5S_select_shape_same() views as being of the same shape.
*
* Start by writing small_rank D slices from the in memory large cube, to
* Start by writing small_rank D slices from the in memory large cube, to
* the the on disk small cube dataset. After each write, read the small
* cube dataset back from disk, and verify that it contains the expected
* data. Verify that H5S_select_shape_same() returns true on the
* data. Verify that H5S_select_shape_same() returns true on the
* memory and file selections.
*/
*/
/* select a checker board in the file small cube dataspace */
sel_start[0] = sel_start[1] = sel_start[2] = sel_start[3] = sel_start[4] = 0;
@ -3237,11 +3237,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
sel_start[3] = x;
/* zero out the on disk small cube */
ret = H5Dwrite(small_cube_dataset,
H5T_NATIVE_UINT16,
full_small_cube_sid,
full_small_cube_sid,
xfer_plist,
ret = H5Dwrite(small_cube_dataset,
H5T_NATIVE_UINT16,
full_small_cube_sid,
full_small_cube_sid,
xfer_plist,
zero_buf);
CHECK(ret, FAIL, "H5Dwrite");
@ -3267,22 +3267,22 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
sel_start
);
/* verify that H5S_select_shape_same() reports the two
/* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
check = H5S_select_shape_same_test(file_small_cube_sid,
check = H5S_select_shape_same_test(file_small_cube_sid,
mem_large_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
/* write the slice from the in memory large cube to the
* on disk small cube
/* write the slice from the in memory large cube to the
* on disk small cube
*/
ret = H5Dwrite(small_cube_dataset,
H5T_NATIVE_UINT16,
mem_large_cube_sid,
file_small_cube_sid,
xfer_plist,
ret = H5Dwrite(small_cube_dataset,
H5T_NATIVE_UINT16,
mem_large_cube_sid,
file_small_cube_sid,
xfer_plist,
cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
@ -3291,11 +3291,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
HDmemset(small_cube_buf_1, 0, sizeof(*small_cube_buf_1) * small_cube_size);
/* read the on disk small cube into memory */
ret = H5Dread(small_cube_dataset,
ret = H5Dread(small_cube_dataset,
H5T_NATIVE_UINT16,
full_small_cube_sid,
full_small_cube_sid,
xfer_plist,
full_small_cube_sid,
xfer_plist,
small_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
@ -3318,24 +3318,24 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
TestErrPrintf("small cube read from largecube has bad data! Line=%d\n",__LINE__);
x++;
} while((large_rank >= (test_max_rank - 3)) &&
} while((large_rank >= (test_max_rank - 3)) &&
(small_rank <= (test_max_rank - 4)) && (x < edge_size));
w++;
} while((large_rank >= (test_max_rank - 2)) &&
} while((large_rank >= (test_max_rank - 2)) &&
(small_rank <= (test_max_rank - 3)) && (w < edge_size));
v++;
} while((large_rank >= (test_max_rank - 1)) &&
} while((large_rank >= (test_max_rank - 1)) &&
(small_rank <= (test_max_rank - 2)) && (v < edge_size));
u++;
} while((large_rank >= test_max_rank) &&
} while((large_rank >= test_max_rank) &&
(small_rank <= (test_max_rank - 1)) && (u < edge_size));
/* Now write checker board selections of the entries in memory
* small cube to slices of the on disk cube. After each write,
* read the on disk large cube * into memeory, and verify that
* it contains the expected * data. Verify that
* H5S_select_shape_same() returns true on the memory and file
/* Now write checker board selections of the entries in memory
* small cube to slices of the on disk cube. After each write,
* read the on disk large cube * into memeory, and verify that
* it contains the expected * data. Verify that
* H5S_select_shape_same() returns true on the memory and file
* selections.
*/
@ -3369,11 +3369,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
sel_start[3] = x;
/* zero out the on disk cube */
ret = H5Dwrite(large_cube_dataset,
H5T_NATIVE_USHORT,
full_large_cube_sid,
full_large_cube_sid,
xfer_plist,
ret = H5Dwrite(large_cube_dataset,
H5T_NATIVE_USHORT,
full_large_cube_sid,
full_large_cube_sid,
xfer_plist,
zero_buf);
CHECK(ret, FAIL, "H5Dwrite");
@ -3399,10 +3399,10 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
sel_start
);
/* verify that H5S_select_shape_same() reports the two
/* verify that H5S_select_shape_same() reports the two
* selections as having the same shape.
*/
check = H5S_select_shape_same_test(file_large_cube_sid,
check = H5S_select_shape_same_test(file_large_cube_sid,
mem_small_cube_sid);
VERIFY(check, TRUE, "H5S_select_shape_same_test");
@ -3411,11 +3411,11 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
* small cube to a slice through the on disk large
* cube.
*/
ret = H5Dwrite(large_cube_dataset,
H5T_NATIVE_UINT16,
mem_small_cube_sid,
file_large_cube_sid,
xfer_plist,
ret = H5Dwrite(large_cube_dataset,
H5T_NATIVE_UINT16,
mem_small_cube_sid,
file_large_cube_sid,
xfer_plist,
cube_buf);
CHECK(ret, FAIL, "H5Dwrite");
@ -3424,16 +3424,16 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
HDmemset(large_cube_buf_1, 0, sizeof(*large_cube_buf_1) * large_cube_size);
/* read the on disk large cube into memory */
ret = H5Dread(large_cube_dataset,
ret = H5Dread(large_cube_dataset,
H5T_NATIVE_UINT16,
full_large_cube_sid,
full_large_cube_sid,
xfer_plist,
full_large_cube_sid,
xfer_plist,
large_cube_buf_1);
CHECK(ret, FAIL, "H5Dread");
/* verify that the expected data and only the
/* verify that the expected data and only the
* expected data was written to the on disk large
* cube.
*/
@ -3483,18 +3483,18 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_
TestErrPrintf("large cube written from small cube has bad data! Line=%d\n",__LINE__);
x++;
} while((large_rank >= (test_max_rank - 3)) &&
} while((large_rank >= (test_max_rank - 3)) &&
(small_rank <= (test_max_rank - 4)) && (x < edge_size));
w++;
} while((large_rank >= (test_max_rank - 2)) &&
} while((large_rank >= (test_max_rank - 2)) &&
(small_rank <= (test_max_rank - 3)) && (w < edge_size));
v++;
} while((large_rank >= (test_max_rank - 1)) &&
} while((large_rank >= (test_max_rank - 1)) &&
(small_rank <= (test_max_rank - 2)) && (v < edge_size));
u++;
} while((large_rank >= test_max_rank) &&
} while((large_rank >= test_max_rank) &&
(small_rank <= (test_max_rank - 1)) && (u < edge_size));
/* Close memory dataspaces */
ret = H5Sclose(full_small_cube_sid);
@ -12348,7 +12348,7 @@ test_space_rebuild(void)
ret = H5Sselect_hyperslab(sid_reg_ori5,H5S_SELECT_SET,start5,stride5,count5,block5);
CHECK(ret, FAIL, "H5Sselect_hyperslab");
/* Build up four dimensional regular selection with H5_SELECT_OR, inside HDF5,
/* Build up five dimensional regular selection with H5_SELECT_OR, inside HDF5,
it will be treated as an irregular selection. */
start5[4] = 1;
count5[4] = 1;
@ -12498,6 +12498,7 @@ test_space_rebuild(void)
CHECK(ret,FAIL,"H5S_hyper_rebuild");
}/* No need to do shape comparision */
/* Add more selections to make it regular again */
start5[3] = 5;
count5[3] = 1;
stride5[3] = 4;
@ -13071,6 +13072,7 @@ test_select_bounds(void)
CHECK(ret, FAIL, "H5Sclose");
} /* test_select_bounds() */
/****************************************************************
**
** test_hyper_regular(): Tests query operations on regular hyperslabs

View File

@ -1,13 +1,11 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TEST_PAR)
project (HDF5_TEST_PAR C)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
add_definitions (${HDF_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib )
#-----------------------------------------------------------------------------
# Define Tests
#-----------------------------------------------------------------------------
@ -28,6 +26,7 @@ set (testphdf5_SOURCES
#-- Adding test for testhdf5
add_executable (testphdf5 ${testphdf5_SOURCES})
set_property(TARGET testphdf5 APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (testphdf5 STATIC " " " ")
target_link_libraries (testphdf5 PUBLIC ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)
@ -37,6 +36,7 @@ set_target_properties (testphdf5 PROPERTIES FOLDER test/par)
MACRO (ADD_H5P_EXE file)
add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c)
set_property(TARGET ${file} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${file} STATIC " " " ")
target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS)
project (HDF5_TOOLS C)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
@ -11,11 +11,6 @@ add_definitions (${HDF_EXTRA_C_FLAGS})
# --------------------------------------------------------------------
add_subdirectory (lib)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_SOURCE_DIR}/lib)
#-- Add the test sources
add_subdirectory (src)

View File

@ -1,5 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_LIB)
project (HDF5_TOOLS_LIB C)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
@ -38,6 +38,8 @@ set (H5_TOOLS_LIB_HDRS
)
add_library (${HDF5_TOOLS_LIB_TARGET} STATIC ${H5_TOOLS_LIB_SOURCES} ${H5_TOOLS_LIB_HDRS})
target_include_directories(${HDF5_TOOLS_LIB_TARGET} INTERFACE "${HDF5_TOOLS_LIB_SOURCE_DIR}")
set_property(TARGET ${HDF5_TOOLS_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_TOOLS_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)
@ -54,6 +56,8 @@ set (install_targets ${HDF5_TOOLS_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_TOOLS_LIBSH_TARGET} SHARED ${H5_TOOLS_LIB_SOURCES} ${H5_TOOLS_LIB_HDRS})
target_include_directories(${HDF5_TOOLS_LIBSH_TARGET} INTERFACE "${HDF5_TOOLS_LIB_SOURCE_DIR}")
set_property(TARGET ${HDF5_TOOLS_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TOOLS_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)

View File

@ -1,10 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_SRC)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
add_definitions (${HDF_EXTRA_C_FLAGS})
project (HDF5_TOOLS_SRC C)
#-- Add the h5diff and test executables
add_subdirectory (h5diff)

View File

@ -1,15 +1,11 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_SRC_H5COPY)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
project (HDF5_TOOLS_SRC_H5COPY C)
# --------------------------------------------------------------------
# Add the h5copy and test executables
# --------------------------------------------------------------------
add_executable (h5copy ${HDF5_TOOLS_SRC_H5COPY_SOURCE_DIR}/h5copy.c)
set_property(TARGET h5copy APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5copy STATIC " " " ")
target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5copy PROPERTIES FOLDER tools)
@ -19,6 +15,7 @@ set (H5_DEP_EXECUTABLES h5copy)
if (BUILD_SHARED_LIBS)
add_executable (h5copy-shared ${HDF5_TOOLS_SRC_H5COPY_SOURCE_DIR}/h5copy.c)
set_property(TARGET h5copy-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5copy-shared SHARED " " " ")
target_link_libraries (h5copy-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (h5copy-shared PROPERTIES FOLDER tools)

View File

@ -1,10 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_SRC_H5DIFF)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
project (HDF5_TOOLS_SRC_H5DIFF C)
# --------------------------------------------------------------------
# Add the h5diff executables
@ -13,6 +8,7 @@ add_executable (h5diff
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_main.c
)
set_property(TARGET h5diff APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5diff STATIC " " " ")
target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5diff PROPERTIES FOLDER tools)
@ -25,6 +21,7 @@ if (BUILD_SHARED_LIBS)
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_main.c
)
set_property(TARGET h5diff-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5diff-shared SHARED " " " ")
target_link_libraries (h5diff-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (h5diff-shared PROPERTIES FOLDER tools)
@ -38,6 +35,7 @@ if (H5_HAVE_PARALLEL)
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/ph5diff_main.c
)
set_property(TARGET ph5diff APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (ph5diff STATIC " " " ")
target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (ph5diff PROPERTIES FOLDER tools)

View File

@ -1,10 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_SRC_H5DUMP)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
project (HDF5_TOOLS_SRC_H5DUMP C)
# --------------------------------------------------------------------
# Add the h5dump executables
@ -14,6 +9,7 @@ add_executable (h5dump
${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_ddl.c
${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_xml.c
)
set_property(TARGET h5dump APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5dump STATIC " " " ")
target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5dump PROPERTIES FOLDER tools)
@ -27,6 +23,7 @@ if (BUILD_SHARED_LIBS)
${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_ddl.c
${HDF5_TOOLS_SRC_H5DUMP_SOURCE_DIR}/h5dump_xml.c
)
set_property(TARGET h5dump-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5dump-shared SHARED " " " ")
target_link_libraries (h5dump-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (h5dump-shared PROPERTIES FOLDER tools)

View File

@ -1,15 +1,11 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_SRC_H5FC)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
project (HDF5_TOOLS_SRC_H5FC C)
# --------------------------------------------------------------------
# Add the h5format_convert executables
# --------------------------------------------------------------------
add_executable (h5format_convert ${HDF5_TOOLS_SRC_H5FC_SOURCE_DIR}/h5format_convert.c)
set_property(TARGET h5format_convert APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5format_convert STATIC " " " ")
target_link_libraries (h5format_convert ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5format_convert PROPERTIES FOLDER tools)

View File

@ -1,15 +1,11 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_SRC_H5IMPORT)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
project (HDF5_TOOLS_SRC_H5IMPORT C)
# --------------------------------------------------------------------
# Add the h5import executables
# --------------------------------------------------------------------
add_executable (h5import ${HDF5_TOOLS_SRC_H5IMPORT_SOURCE_DIR}/h5import.c)
set_property(TARGET h5import APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5import STATIC " " " ")
target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
#set_target_properties (h5import PROPERTIES COMPILE_DEFINITIONS H5DEBUGIMPORT)

View File

@ -1,21 +1,18 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_SRC_H5JAM)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
project (HDF5_TOOLS_SRC_H5JAM C)
# --------------------------------------------------------------------
# Add the h5jam executables
# --------------------------------------------------------------------
add_executable (h5jam ${HDF5_TOOLS_SRC_H5JAM_SOURCE_DIR}/h5jam.c)
set_property(TARGET h5jam APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5jam STATIC " " " ")
target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5jam PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5jam")
add_executable (h5unjam ${HDF5_TOOLS_SRC_H5JAM_SOURCE_DIR}/h5unjam.c)
set_property(TARGET h5unjam APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5unjam STATIC " " " ")
target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5unjam PROPERTIES FOLDER tools)

View File

@ -1,15 +1,11 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_SRC_H5LS)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
project (HDF5_TOOLS_SRC_H5LS C)
#-----------------------------------------------------------------------------
# Add the h5ls executable
#-----------------------------------------------------------------------------
add_executable (h5ls ${HDF5_TOOLS_SRC_H5LS_SOURCE_DIR}/h5ls.c)
set_property(TARGET h5ls APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5ls STATIC " " " ")
target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5ls PROPERTIES FOLDER tools)
@ -19,6 +15,7 @@ set (H5_DEP_EXECUTABLES h5ls)
if (BUILD_SHARED_LIBS)
add_executable (h5ls-shared ${HDF5_TOOLS_SRC_H5LS_SOURCE_DIR}/h5ls.c)
set_property(TARGET h5ls-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5ls-shared SHARED " " " ")
target_link_libraries (h5ls-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (h5ls-shared PROPERTIES FOLDER tools)

View File

@ -1,11 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_SRC_H5REPACK)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
project (HDF5_TOOLS_SRC_H5REPACK C)
# --------------------------------------------------------------------
# Add h5Repack executables
@ -21,6 +15,7 @@ set (REPACK_COMMON_SOURCES
)
add_executable (h5repack ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack_main.c)
set_property(TARGET h5repack APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5repack STATIC " " " ")
target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5repack PROPERTIES FOLDER tools)
@ -30,6 +25,7 @@ set (H5_DEP_EXECUTABLES h5repack)
if (BUILD_SHARED_LIBS)
add_executable (h5repack-shared ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack_main.c)
set_property(TARGET h5repack-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5repack-shared SHARED " " " ")
target_link_libraries (h5repack-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (h5repack-shared PROPERTIES FOLDER tools)

View File

@ -1,15 +1,11 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_SRC_H5STAT)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
project (HDF5_TOOLS_SRC_H5STAT C)
# --------------------------------------------------------------------
# Add the h5stat executables
# --------------------------------------------------------------------
add_executable (h5stat ${HDF5_TOOLS_SRC_H5STAT_SOURCE_DIR}/h5stat.c)
set_property(TARGET h5stat APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5stat STATIC " " " ")
target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5stat PROPERTIES FOLDER tools)
@ -19,6 +15,7 @@ set (H5_DEP_EXECUTABLES h5stat)
if (BUILD_SHARED_LIBS)
add_executable (h5stat-shared ${HDF5_TOOLS_SRC_H5STAT_SOURCE_DIR}/h5stat.c)
set_property(TARGET h5stat-shared APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5stat-shared SHARED " " " ")
target_link_libraries (h5stat-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (h5stat-shared PROPERTIES FOLDER tools)

View File

@ -1,34 +1,33 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_SRC_MISC)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
project (HDF5_TOOLS_SRC_MISC C)
# --------------------------------------------------------------------
# Add the misc executables
# --------------------------------------------------------------------
#-- Misc Executables
add_executable (h5debug ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5debug.c)
set_property(TARGET h5debug APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5debug STATIC " " " ")
target_link_libraries (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5debug PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5debug")
add_executable (h5repart ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5repart.c)
set_property(TARGET h5repart APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5repart STATIC " " " ")
target_link_libraries (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5repart PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5repart")
add_executable (h5mkgrp ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5mkgrp.c)
set_property(TARGET h5mkgrp APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5mkgrp STATIC " " " ")
target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5mkgrp PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5mkgrp")
add_executable (h5clear ${HDF5_TOOLS_SRC_MISC_SOURCE_DIR}/h5clear.c)
set_property(TARGET h5clear APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5clear STATIC " " " ")
target_link_libraries (h5clear ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5clear PROPERTIES FOLDER tools)

View File

@ -1,10 +1,5 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_TEST)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
add_definitions (${HDF_EXTRA_C_FLAGS})
project (HDF5_TOOLS_TEST C)
#-- Add the h5diff tests
add_subdirectory (h5diff)

View File

@ -1,17 +1,12 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_TEST_H5COPY)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
project (HDF5_TOOLS_TEST_H5COPY C)
# --------------------------------------------------------------------
# Add the h5copy test executables
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (h5copygentest ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/h5copygentest.c)
set_property(TARGET h5copygentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5copygentest STATIC " " " ")
target_link_libraries (h5copygentest ${HDF5_LIB_TARGET})
set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools)
@ -26,10 +21,9 @@ if (BUILD_SHARED_LIBS)
set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibcopy")
set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
add_definitions (${HDF_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_copy.c)
set_property(TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")

View File

@ -1,22 +1,18 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_TEST_H5DIFF)
project (HDF5_TOOLS_TEST_H5DIFF C)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5diff and test executables
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (h5diffgentest ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/h5diffgentest.c)
set_property(TARGET h5diffgentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5diffgentest STATIC " " " ")
target_link_libraries (h5diffgentest ${HDF5_LIB_TARGET})
set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools)
# --------------------------------------------------------------------
# Add the h5diff and test executables
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (h5diffgentest ${HDF5_TOOLS_TEST_H5DIFF_SOURCE_DIR}/h5diffgentest.c)
TARGET_C_PROPERTIES (h5diffgentest STATIC " " " ")
target_link_libraries (h5diffgentest ${HDF5_LIB_TARGET})
set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools)
#add_test (NAME h5diffgentest COMMAND $<TARGET_FILE:h5diffgentest>)
endif ()
#add_test (NAME h5diffgentest COMMAND $<TARGET_FILE:h5diffgentest>)
endif ()
#-----------------------------------------------------------------------------
# If plugin library tests can be tested
@ -25,10 +21,9 @@ if (BUILD_SHARED_LIBS)
set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibdiff")
set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
add_definitions (${HDF_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_diff.c)
set_property(TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")

View File

@ -35,7 +35,11 @@ TEST_SCRIPT=testh5diff.sh
check_PROGRAMS=$(TEST_PROG)
check_SCRIPTS=$(TEST_SCRIPT) $(TEST_SCRIPT_PARA)
# The parallel test script testph5diff.sh actually depends on testh5diff.sh.
SCRIPT_DEPEND=../../src/h5diff/h5diff$(EXEEXT) $(H5PDIFF) ../../src/h5diff/testh5diff.sh
if BUILD_PARALLEL_CONDITIONAL
SCRIPT_DEPEND=../../src/h5diff/h5diff$(EXEEXT) $(H5PDIFF) $(TEST_SCRIPT)
else
SCRIPT_DEPEND=../../src/h5diff/h5diff$(EXEEXT) $(H5PDIFF)
endif
if HAVE_SHARED_CONDITIONAL
if USE_PLUGINS_CONDITIONAL
TEST_SCRIPT += h5diff_plugin.sh
@ -59,7 +63,7 @@ endif
# be copied to the testfiles/ directory if update is required
CHECK_CLEANFILES+=*.h5 expect_sorted actual_sorted
DISTCLEANFILES=h5diff_plugin.sh
DISTCLEANFILES=testh5diff.sh h5diff_plugin.sh
include $(top_srcdir)/config/conclude.am

View File

@ -1,55 +1,50 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_TEST_H5DUMP)
project (HDF5_TOOLS_TEST_H5DUMP C)
#-----------------------------------------------------------------------------
# Setup include Directories
# If plugin library tests can be tested
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibdump")
set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
#-----------------------------------------------------------------------------
# If plugin library tests can be tested
#-----------------------------------------------------------------------------
set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibdump")
set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
add_definitions (${HDF_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_dump.c)
set_property(TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_dump.c)
TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
# make plugins dir
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
#-----------------------------------------------------------------------------
# Copy plugin library to a plugins folder
#-----------------------------------------------------------------------------
add_custom_command (
TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different
# make plugins dir
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
#-----------------------------------------------------------------------------
# Copy plugin library to a plugins folder
#-----------------------------------------------------------------------------
add_custom_command (
TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different
"$<TARGET_FILE:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
"${CMAKE_BINARY_DIR}/plugins/$<TARGET_FILE_NAME:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
)
)
# --------------------------------------------------------------------
# Add the h5dump test executable
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (h5dumpgentest ${HDF5_TOOLS_TEST_H5DUMP_SOURCE_DIR}/h5dumpgentest.c)
TARGET_C_PROPERTIES (h5dumpgentest STATIC " " " ")
target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools)
# --------------------------------------------------------------------
# Add the h5dump test executable
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (h5dumpgentest ${HDF5_TOOLS_TEST_H5DUMP_SOURCE_DIR}/h5dumpgentest.c)
set_property(TARGET h5dumpgentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5dumpgentest STATIC " " " ")
target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools)
#add_test (NAME h5dumpgentest COMMAND $<TARGET_FILE:h5dumpgentest>)
endif ()
#add_test (NAME h5dumpgentest COMMAND $<TARGET_FILE:h5dumpgentest>)
endif ()
include (CMakeTests.cmake)
include (CMakeTests.cmake)
include (CMakeTestsPBITS.cmake)
include (CMakeTestsPBITS.cmake)
include (CMakeTestsVDS.cmake)
include (CMakeTestsVDS.cmake)
include (CMakeTestsXML.cmake)
include (CMakeTestsXML.cmake)

View File

@ -1,26 +1,23 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_TEST_H5FC)
project (HDF5_TOOLS_TEST_H5FC C)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5format_convert test executables
# --------------------------------------------------------------------
add_executable (h5fc_chk_idx ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/h5fc_chk_idx.c)
set_property(TARGET h5fc_chk_idx APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5fc_chk_idx STATIC " " " ")
target_link_libraries (h5fc_chk_idx ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5fc_chk_idx PROPERTIES FOLDER tools)
# --------------------------------------------------------------------
# Add the h5format_convert test executables
# --------------------------------------------------------------------
add_executable (h5fc_chk_idx ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/h5fc_chk_idx.c)
TARGET_C_PROPERTIES (h5fc_chk_idx STATIC " " " ")
target_link_libraries (h5fc_chk_idx ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5fc_chk_idx PROPERTIES FOLDER tools)
if (HDF5_BUILD_GENERATORS)
add_executable (h5fc_gentest ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/h5fc_gentest.c)
set_property(TARGET h5fc_gentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5fc_gentest STATIC " " " ")
target_link_libraries (h5fc_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5fc_gentest PROPERTIES FOLDER generator/tools)
if (HDF5_BUILD_GENERATORS)
add_executable (h5fc_gentest ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/h5fc_gentest.c)
TARGET_C_PROPERTIES (h5fc_gentest STATIC " " " ")
target_link_libraries (h5fc_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5fc_gentest PROPERTIES FOLDER generator/tools)
#add_test (NAME h5fc_gentest COMMAND $<TARGET_FILE:h5fc_gentest>)
endif ()
#add_test (NAME h5fc_gentest COMMAND $<TARGET_FILE:h5fc_gentest>)
endif ()
include (CMakeTests.cmake)
include (CMakeTests.cmake)

View File

@ -1,17 +1,13 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_TEST_H5IMPORT)
project (HDF5_TOOLS_TEST_H5IMPORT C)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5import executables
# --------------------------------------------------------------------
add_executable (h5importtest ${HDF5_TOOLS_TEST_H5IMPORT_SOURCE_DIR}/h5importtest.c)
set_property(TARGET h5importtest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5importtest STATIC " " " ")
target_link_libraries (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5importtest PROPERTIES FOLDER tools)
# --------------------------------------------------------------------
# Add the h5import executables
# --------------------------------------------------------------------
add_executable (h5importtest ${HDF5_TOOLS_TEST_H5IMPORT_SOURCE_DIR}/h5importtest.c)
TARGET_C_PROPERTIES (h5importtest STATIC " " " ")
target_link_libraries (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5importtest PROPERTIES FOLDER tools)
include (CMakeTests.cmake)
include (CMakeTests.cmake)

View File

@ -1,31 +1,29 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_TEST_H5JAM)
project (HDF5_TOOLS_TEST_H5JAM C)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5jam test executables
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (h5jamgentest ${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/h5jamgentest.c)
set_property(TARGET h5jamgentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (testhdf5 STATIC " " " ")
target_link_libraries (h5jamgentest ${HDF5_LIB_TARGET})
set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools)
# --------------------------------------------------------------------
# Add the h5jam test executables
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (h5jamgentest ${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/h5jamgentest.c)
TARGET_C_PROPERTIES (testhdf5 STATIC " " " ")
target_link_libraries (h5jamgentest ${HDF5_LIB_TARGET})
set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools)
#add_test (NAME h5jamgentest COMMAND $<TARGET_FILE:h5jamgentest>)
endif ()
#add_test (NAME h5jamgentest COMMAND $<TARGET_FILE:h5jamgentest>)
endif ()
add_executable (getub ${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/getub.c)
set_property(TARGET getub APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (getub STATIC " " " ")
target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (getub PROPERTIES FOLDER tools)
add_executable (tellub ${HDF5_TOOLS_TEST_H5JAM_SOURCE_DIR}/tellub.c)
set_property(TARGET tellub APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (tellub STATIC " " " ")
target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (tellub PROPERTIES FOLDER tools)
include (CMakeTests.cmake)
include (CMakeTests.cmake)

View File

@ -1,39 +1,33 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_TEST_H5LS)
project (HDF5_TOOLS_TEST_H5LS C)
#-----------------------------------------------------------------------------
# Setup include Directories
# If plugin library tests can be tested
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibls")
set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
#-----------------------------------------------------------------------------
# If plugin library tests can be tested
#-----------------------------------------------------------------------------
set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibls")
set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
add_definitions (${HDF_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_ls.c)
set_property(TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_ls.c)
TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
# make plugins dir
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
#-----------------------------------------------------------------------------
# Copy plugin library to a plugins folder
#-----------------------------------------------------------------------------
add_custom_command (
TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different
"$<TARGET_FILE:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
"${CMAKE_BINARY_DIR}/plugins/$<TARGET_FILE_NAME:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
)
# make plugins dir
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
#-----------------------------------------------------------------------------
# Copy plugin library to a plugins folder
#-----------------------------------------------------------------------------
add_custom_command (
TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different
"$<TARGET_FILE:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
"${CMAKE_BINARY_DIR}/plugins/$<TARGET_FILE_NAME:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
)
include (CMakeTests.cmake)
include (CMakeTests.cmake)
include (CMakeTestsVDS.cmake)
include (CMakeTestsVDS.cmake)

View File

@ -1,17 +1,11 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_TEST_H5REPACK)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/src/h5repack)
INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
project (HDF5_TOOLS_TEST_H5REPACK C)
# --------------------------------------------------------------------
# Add h5Repack test executables
# --------------------------------------------------------------------
add_executable (testh5repack_detect_szip ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c)
set_property(TARGET testh5repack_detect_szip APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR};${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (testh5repack_detect_szip STATIC " " " ")
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)
@ -26,52 +20,53 @@ set (REPACK_COMMON_SOURCES
${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR}/h5repack.c
)
add_executable (h5repacktest ${REPACK_COMMON_SOURCES} ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/h5repacktst.c)
set_property(TARGET h5repacktest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_TOOLS_SRC_H5REPACK_SOURCE_DIR};${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5repacktest STATIC " " " ")
target_link_libraries (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (h5repacktest PROPERTIES FOLDER tools)
#-----------------------------------------------------------------------------
# If plugin library tests can be tested
#-----------------------------------------------------------------------------
set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd")
set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
set (HDF5_TOOL_PLUGIN_LIB_VCORENAME "dynlibvers")
set (HDF5_TOOL_PLUGIN_LIB_VNAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_VCORENAME}")
set (HDF5_TOOL_PLUGIN_LIB_VTARGET ${HDF5_TOOL_PLUGIN_LIB_VCORENAME})
add_definitions (${HDF_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
#-----------------------------------------------------------------------------
# If plugin library tests can be tested
#-----------------------------------------------------------------------------
set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd")
set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
set (HDF5_TOOL_PLUGIN_LIB_VCORENAME "dynlibvers")
set (HDF5_TOOL_PLUGIN_LIB_VNAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_VCORENAME}")
set (HDF5_TOOL_PLUGIN_LIB_VTARGET ${HDF5_TOOL_PLUGIN_LIB_VCORENAME})
add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c)
TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c)
set_property(TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} SHARED "LIB")
add_library (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED dynlib_vrpk.c)
TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED " " " ")
target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TOOL_PLUGIN_LIB_VNAME} SHARED "LIB")
add_library (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED dynlib_vrpk.c)
set_property(TARGET ${HDF5_TOOL_PLUGIN_LIB_VTARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_VTARGET} SHARED " " " ")
target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TEST_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TOOL_PLUGIN_LIB_VTARGET} ${HDF5_TOOL_PLUGIN_LIB_VNAME} SHARED "LIB")
# make plugins dir
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
#-----------------------------------------------------------------------------
# Copy plugin library to a plugins folder
#-----------------------------------------------------------------------------
add_custom_command (
TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different
# make plugins dir
file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
#-----------------------------------------------------------------------------
# Copy plugin library to a plugins folder
#-----------------------------------------------------------------------------
add_custom_command (
TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different
"$<TARGET_FILE:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
"${CMAKE_BINARY_DIR}/plugins/$<TARGET_FILE_NAME:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
)
add_custom_command (
TARGET ${HDF5_TOOL_PLUGIN_LIB_VTARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different
)
add_custom_command (
TARGET ${HDF5_TOOL_PLUGIN_LIB_VTARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different
"$<TARGET_FILE:${HDF5_TOOL_PLUGIN_LIB_VTARGET}>"
"${CMAKE_BINARY_DIR}/plugins/$<TARGET_FILE_NAME:${HDF5_TOOL_PLUGIN_LIB_VTARGET}>"
)
)
include (CMakeTests.cmake)
include (CMakeTests.cmake)

View File

@ -1,21 +1,17 @@
cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_TOOLS_TEST_H5STAT)
project (HDF5_TOOLS_TEST_H5STAT C)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5stat test executables
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (h5stat_gentest ${HDF5_TOOLS_TEST_H5STAT_SOURCE_DIR}/h5stat_gentest.c)
set_property(TARGET h5stat_gentest APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
TARGET_C_PROPERTIES (h5stat_gentest STATIC " " " ")
target_link_libraries (h5stat_gentest ${HDF5_LIB_TARGET})
set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools)
# --------------------------------------------------------------------
# Add the h5stat test executables
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (h5stat_gentest ${HDF5_TOOLS_TEST_H5STAT_SOURCE_DIR}/h5stat_gentest.c)
TARGET_C_PROPERTIES (h5stat_gentest STATIC " " " ")
target_link_libraries (h5stat_gentest ${HDF5_LIB_TARGET})
set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools)
#add_test (NAME h5stat_gentest COMMAND $<TARGET_FILE:h5stat_gentest>)
endif ()
#add_test (NAME h5stat_gentest COMMAND $<TARGET_FILE:h5stat_gentest>)
endif ()
include (CMakeTests.cmake)
include (CMakeTests.cmake)

Some files were not shown because too many files have changed in this diff Show More