summaryrefslogtreecommitdiffstats
path: root/hl
diff options
context:
space:
mode:
Diffstat (limited to 'hl')
-rw-r--r--hl/CMakeLists.txt10
-rw-r--r--hl/c++/CMakeLists.txt8
-rw-r--r--hl/c++/examples/CMakeLists.txt3
-rw-r--r--hl/c++/src/CMakeLists.txt61
-rw-r--r--hl/c++/test/CMakeLists.txt3
-rw-r--r--hl/examples/CMakeLists.txt3
-rw-r--r--hl/fortran/CMakeLists.txt8
-rw-r--r--hl/fortran/examples/CMakeLists.txt3
-rw-r--r--hl/fortran/src/CMakeLists.txt88
-rw-r--r--hl/fortran/src/H5DSff.F9065
-rw-r--r--hl/fortran/src/H5LTf90proto.h4
-rw-r--r--hl/fortran/src/H5TBfc.c6
-rw-r--r--hl/fortran/test/CMakeLists.txt18
-rw-r--r--hl/fortran/test/CMakeTests.cmake2
-rw-r--r--hl/src/CMakeLists.txt52
-rw-r--r--hl/test/CMakeLists.txt7
-rw-r--r--hl/test/test_ds.c8
-rw-r--r--hl/tools/CMakeLists.txt6
-rw-r--r--hl/tools/gif2h5/CMakeLists.txt5
-rw-r--r--hl/tools/h5watch/CMakeLists.txt6
-rw-r--r--hl/tools/h5watch/testh5watch.sh.in2
21 files changed, 187 insertions, 181 deletions
diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt
index a47e023..54d5976 100644
--- a/hl/CMakeLists.txt
+++ b/hl/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL C CXX)
#-----------------------------------------------------------------------------
@@ -12,21 +12,21 @@ add_definitions (${HDF_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${HDF5_HL_SOURCE_DIR}/src )
-add_subdirectory (${HDF5_HL_SOURCE_DIR}/src ${HDF5_HL_BINARY_DIR}/src)
+add_subdirectory (src)
#-- Build the High level Tools
if (HDF5_BUILD_TOOLS)
- add_subdirectory (${HDF5_HL_SOURCE_DIR}/tools ${HDF5_HL_BINARY_DIR}/tools)
+ add_subdirectory (tools)
endif ()
#-- Add High Level Examples
if (HDF5_BUILD_EXAMPLES)
- add_subdirectory (${HDF5_HL_SOURCE_DIR}/examples ${HDF5_HL_BINARY_DIR}/examples)
+ add_subdirectory (examples)
endif ()
#-- Build the Unit testing if requested
if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (BUILD_TESTING)
- add_subdirectory (${HDF5_HL_SOURCE_DIR}/test ${HDF5_HL_BINARY_DIR}/test)
+ add_subdirectory (test)
endif ()
endif ()
diff --git a/hl/c++/CMakeLists.txt b/hl/c++/CMakeLists.txt
index 91bfa14..71e5bb3 100644
--- a/hl/c++/CMakeLists.txt
+++ b/hl/c++/CMakeLists.txt
@@ -1,16 +1,16 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_CPP)
#-----------------------------------------------------------------------------
# Main HL lib is in /src
#-----------------------------------------------------------------------------
-add_subdirectory (${HDF5_HL_CPP_SOURCE_DIR}/src ${HDF5_HL_CPP_BINARY_DIR}/src)
+add_subdirectory (src)
# --------------------------------------------------------------------
# Add in the examples for the Packet Table codes
# --------------------------------------------------------------------
if (HDF5_BUILD_EXAMPLES)
- add_subdirectory (${HDF5_HL_CPP_SOURCE_DIR}/examples ${HDF5_HL_CPP_BINARY_DIR}/examples)
+ add_subdirectory (examples)
endif ()
# --------------------------------------------------------------------
@@ -18,5 +18,5 @@ endif ()
# --------------------------------------------------------------------
if (BUILD_TESTING)
- add_subdirectory (${HDF5_HL_CPP_SOURCE_DIR}/test ${HDF5_HL_CPP_BINARY_DIR}/test)
+ add_subdirectory (test)
endif ()
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index 33ad1e5..25158f2 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_CPP_EXAMPLES)
#-----------------------------------------------------------------------------
@@ -11,7 +11,6 @@ INCLUDE_DIRECTORIES (${HDF5_HL_CPP_SRC_DIR}/src)
# Add in the examples for the Packet Table codes
# --------------------------------------------------------------------
add_executable (ptExampleFL ${HDF5_HL_CPP_EXAMPLES_SOURCE_DIR}/ptExampleFL.cpp)
-TARGET_NAMING (ptExampleFL STATIC)
TARGET_C_PROPERTIES (ptExampleFL STATIC " " " ")
target_link_libraries (
ptExampleFL
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index 38604cd..c0cc09e 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_CPP_SRC)
#-----------------------------------------------------------------------------
@@ -12,11 +12,7 @@ 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})
TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC " " " ")
-target_link_libraries (
- ${HDF5_HL_CPP_LIB_TARGET}
- ${HDF5_HL_LIB_TARGET}
- ${HDF5_LIB_TARGET}
-)
+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}")
H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_HL_CPP_LIB_NAME} STATIC)
set_target_properties (${HDF5_HL_CPP_LIB_TARGET} PROPERTIES
@@ -28,11 +24,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})
TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED " " " ")
- target_link_libraries (
- ${HDF5_HL_CPP_LIBSH_TARGET}
- ${HDF5_HL_LIBSH_TARGET}
- ${HDF5_LIBSH_TARGET}
- )
+ 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}")
H5_SET_LIB_OPTIONS (${HDF5_HL_CPP_LIBSH_TARGET} ${HDF5_HL_CPP_LIB_NAME} SHARED ${HDF5_HL_CXX_PACKAGE_SOVERSION})
set_target_properties (${HDF5_HL_CPP_LIBSH_TARGET} PROPERTIES
@@ -77,3 +69,50 @@ if (HDF5_EXPORTED_TARGETS)
INCLUDES DESTINATION include
)
endif ()
+
+#-----------------------------------------------------------------------------
+# Create pkgconfig files
+#-----------------------------------------------------------------------------
+set (_PKG_CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX})
+set (_PKG_CONFIG_EXEC_PREFIX \${prefix})
+set (_PKG_CONFIG_LIBDIR \${exec_prefix}/lib)
+set (_PKG_CONFIG_INCLUDEDIR \${prefix}/include)
+set (_PKG_CONFIG_LIBNAME "${HDF5_HL_CPP_LIB_CORENAME}")
+set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
+
+set (_PKG_CONFIG_LIBS_PRIVATE)
+
+set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_HL_CPP_LIB_CORENAME}")
+if (BUILD_SHARED_LIBS)
+ set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_HL_CPP_LIB_CORENAME}")
+endif ()
+
+set (_PKG_CONFIG_REQUIRES "${HDF5_HL_LIB_CORENAME}")
+set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_HL_LIB_CORENAME}")
+
+configure_file (
+ ${HDF_RESOURCES_DIR}/libhdf5.pc.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
+ @ONLY
+)
+install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_CPP_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
+ DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig
+ COMPONENT hlcpplibraries
+)
+
+if (NOT WIN32)
+ set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
+ configure_file (
+ ${HDF_RESOURCES_DIR}/libh5cc.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/h5hlc++
+ @ONLY
+ )
+ install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/h5hlc++
+ DESTINATION ${HDF5_INSTALL_BIN_DIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ COMPONENT hlcpplibraries
+ )
+endif ()
+
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index a2f9429..b48d147 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_CPP_TEST)
#-----------------------------------------------------------------------------
@@ -17,7 +17,6 @@ INCLUDE_DIRECTORIES (${HDF5_CPP_SRC_DIR}/src)
add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
TARGET_C_PROPERTIES (hl_ptableTest STATIC " " " ")
-TARGET_NAMING (hl_ptableTest STATIC)
target_link_libraries (
hl_ptableTest
${HDF5_LIB_TARGET}
diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt
index 1144e0f..79dfee1 100644
--- a/hl/examples/CMakeLists.txt
+++ b/hl/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_EXAMPLES )
#-----------------------------------------------------------------------------
@@ -28,7 +28,6 @@ set (examples
foreach (example ${examples})
add_executable (hl_ex_${example} ${HDF5_HL_EXAMPLES_SOURCE_DIR}/${example}.c)
- TARGET_NAMING (hl_ex_${example} STATIC)
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)
diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt
index c651ce9..7955de2 100644
--- a/hl/fortran/CMakeLists.txt
+++ b/hl/fortran/CMakeLists.txt
@@ -1,21 +1,21 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_F90 C CXX Fortran)
#-----------------------------------------------------------------------------
# List Source files
#-----------------------------------------------------------------------------
-add_subdirectory (${HDF5_HL_F90_SOURCE_DIR}/src ${HDF5_HL_F90_BINARY_DIR}/src)
+add_subdirectory (src)
#-----------------------------------------------------------------------------
# Build the HL Fortran Examples
#-----------------------------------------------------------------------------
if (HDF5_BUILD_EXAMPLES)
- add_subdirectory (${HDF5_HL_F90_SOURCE_DIR}/examples ${HDF5_HL_F90_BINARY_DIR}/examples)
+ add_subdirectory (examples)
endif ()
#-----------------------------------------------------------------------------
# Testing
#-----------------------------------------------------------------------------
if (BUILD_TESTING)
- add_subdirectory (${HDF5_HL_F90_SOURCE_DIR}/test ${HDF5_HL_F90_BINARY_DIR}/test)
+ add_subdirectory (test)
endif ()
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index dfe6102..411ceea 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_F90_EXAMPLES C CXX Fortran)
#-----------------------------------------------------------------------------
@@ -16,7 +16,6 @@ set (examples
foreach (example ${examples})
add_executable (hl_f90_ex_${example} ${HDF5_HL_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_NAMING (hl_f90_ex_${example} STATIC)
TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} STATIC " " " ")
target_link_libraries (hl_f90_ex_${example}
${HDF5_HL_F90_LIB_TARGET}
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 345a739..6dd94fe 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -1,5 +1,5 @@
-cmake_minimum_required (VERSION 3.2.2)
-PROJECT(HDF5_HL_F90_SRC C CXX Fortran)
+cmake_minimum_required (VERSION 3.10)
+project (HDF5_HL_F90_SRC C CXX Fortran)
#-----------------------------------------------------------------------------
# configure def file for shared libs on windows
@@ -36,19 +36,12 @@ set_target_properties (H5HL_buildiface PROPERTIES
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
)
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- file (MAKE_DIRECTORY "${HDF5_HL_F90_SRC_BINARY_DIR}/shared")
- if (WIN32)
- set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${CMAKE_BUILD_TYPE})
- else ()
- set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
- endif ()
-endif ()
-if (WIN32)
- set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${CMAKE_BUILD_TYPE})
-else ()
- set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+if (BUILD_SHARED_LIBS)
+ file (MAKE_DIRECTORY "${HDF5_HL_F90_BINARY_DIR}/shared")
+ set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF_CFG_BUILD_TYPE})
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
@@ -56,6 +49,7 @@ endif ()
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}
@@ -76,8 +70,9 @@ 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_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET})
+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}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} STATIC)
set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES
@@ -87,10 +82,11 @@ set_target_properties (${HDF5_HL_F90_C_LIB_TARGET} PROPERTIES
)
set (install_targets ${HDF5_HL_F90_C_LIB_TARGET})
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+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_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ")
- target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET})
+ 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}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_HL_F90_C_LIB_NAME} SHARED ${HDF5_HL_F_PACKAGE_SOVERSION})
set_target_properties (${HDF5_HL_F90_C_LIBSH_TARGET} PROPERTIES
@@ -113,37 +109,35 @@ set (HDF5_HL_F90_F_BASE_SOURCES
${HDF5_HL_F90_SRC_SOURCE_DIR}/H5IMff.F90
)
-set (CMD $<TARGET_FILE:H5HL_buildiface>)
add_custom_command (
- OUTPUT ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90
- COMMAND ${CMD}
- WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR}
+ OUTPUT ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/H5TBff_gen.F90
+ COMMAND $<TARGET_FILE:H5HL_buildiface>
+ WORKING_DIRECTORY ${HDF5_HL_F90_BINARY_DIR}/static
DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES}
COMMENT "Generating the H5LTff_gen.F90, H5TBff_gen.F90 files"
)
add_custom_target (H5HLgen ALL
- DEPENDS ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90
+ DEPENDS ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/H5TBff_gen.F90
)
set_source_files_properties (
- ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90
- ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90
+ ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90
+ ${HDF5_HL_F90_BINARY_DIR}/static/H5TBff_gen.F90
PROPERTIES GENERATED TRUE
)
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- set (CMDSH $<TARGET_FILE:H5HL_buildiface>)
+if (BUILD_SHARED_LIBS)
add_custom_command (
- OUTPUT ${HDF5_HL_F90_SRC_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/shared/H5TBff_gen.F90
- COMMAND ${CMD}
- WORKING_DIRECTORY ${HDF5_HL_F90_SRC_BINARY_DIR}/shared
+ OUTPUT ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/shared/H5TBff_gen.F90
+ COMMAND $<TARGET_FILE:H5HL_buildiface>
+ WORKING_DIRECTORY ${HDF5_HL_F90_BINARY_DIR}/shared
DEPENDS ${HDF5_HL_F90_F_BASE_SOURCES}
COMMENT "Generating the H5LTff_gen.F90, H5TBff_gen.F90 shared files"
)
add_custom_target (H5HLgenSH ALL
- DEPENDS ${HDF5_HL_F90_SRC_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_SRC_BINARY_DIR}/shared/H5TBff_gen.F90
+ DEPENDS ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90 ${HDF5_HL_F90_BINARY_DIR}/shared/H5TBff_gen.F90
)
set_source_files_properties (
- ${HDF5_HL_F90_SRC_BINARY_DIR}/shared/H5LTff_gen.F90
- ${HDF5_HL_F90_SRC_BINARY_DIR}/shared/H5TBff_gen.F90
+ ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90
+ ${HDF5_HL_F90_BINARY_DIR}/shared/H5TBff_gen.F90
PROPERTIES GENERATED TRUE
)
endif ()
@@ -152,25 +146,29 @@ set (HDF5_HL_F90_F_SOURCES
${HDF5_HL_F90_F_BASE_SOURCES}
# generated files
- ${HDF5_HL_F90_SRC_BINARY_DIR}/H5LTff_gen.F90
- ${HDF5_HL_F90_SRC_BINARY_DIR}/H5TBff_gen.F90
+ ${HDF5_HL_F90_BINARY_DIR}/static/H5LTff_gen.F90
+ ${HDF5_HL_F90_BINARY_DIR}/static/H5TBff_gen.F90
)
set_source_files_properties (${HDF5_HL_F90_F_SOURCES} PROPERTIES LANGUAGE Fortran)
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+if (BUILD_SHARED_LIBS)
set (HDF5_HL_F90_F_SOURCES_SHARED
${HDF5_HL_F90_F_BASE_SOURCES}
# generated files
- ${HDF5_HL_F90_SRC_BINARY_DIR}/shared/H5LTff_gen.F90
- ${HDF5_HL_F90_SRC_BINARY_DIR}/shared/H5TBff_gen.F90
+ ${HDF5_HL_F90_BINARY_DIR}/shared/H5LTff_gen.F90
+ ${HDF5_HL_F90_BINARY_DIR}/shared/H5TBff_gen.F90
)
set_source_files_properties (${HDF5_HL_F90_F_SOURCES_SHARED} PROPERTIES LANGUAGE Fortran)
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} ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
+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)
+if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+ target_include_directories (${HDF5_HL_F90_LIB_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
+endif ()
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)
set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES
@@ -187,19 +185,25 @@ endif ()
set (install_targets ${install_targets} ${HDF5_HL_F90_LIB_TARGET})
add_dependencies(${HDF5_HL_F90_LIB_TARGET} H5HLgen)
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+if (BUILD_SHARED_LIBS)
add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${HDF5_HL_F90_F_SOURCES_SHARED})
set (SHARED_LINK_FLAGS " ")
if (WIN32 AND MSVC)
set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def")
endif ()
TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS})
- target_link_libraries (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET})
+ 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)
+ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+ target_include_directories (${HDF5_HL_F90_LIBSH_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
+ endif ()
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_HL_F90_LIB_NAME} SHARED ${HDF5_HL_F_PACKAGE_SOVERSION})
set_target_properties (${HDF5_HL_F90_LIBSH_TARGET} PROPERTIES
FOLDER libraries/hl/fortran
LINKER_LANGUAGE Fortran
+ COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
@@ -236,7 +240,7 @@ install (
fortheaders
)
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+if (BUILD_SHARED_LIBS)
set (modsh_files
${MODSH_BUILD_DIR}/h5ds.mod
${MODSH_BUILD_DIR}/h5tb.mod
@@ -259,7 +263,7 @@ endif ()
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
if (HDF5_EXPORTED_TARGETS)
- if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries)
#INSTALL_TARGET_PDB (${HDF5_HL_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries)
endif ()
diff --git a/hl/fortran/src/H5DSff.F90 b/hl/fortran/src/H5DSff.F90
index 4f0d040..2dca479 100644
--- a/hl/fortran/src/H5DSff.F90
+++ b/hl/fortran/src/H5DSff.F90
@@ -44,13 +44,6 @@ CONTAINS
IMPLICIT NONE
-!
-!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_HL_DLL)
-!DEC$attributes dllexport :: h5dsset_scale_f
-!DEC$endif
-!
-
INTEGER(hid_t), INTENT(in) :: dsid ! The dataset to be made a Dimension Scale
CHARACTER(LEN=*), INTENT(in), OPTIONAL :: dimname ! The dimension name
INTEGER :: errcode ! Error code
@@ -99,12 +92,6 @@ CONTAINS
IMPLICIT NONE
-!
-!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_HL_DLL)
-!DEC$attributes dllexport :: h5dsattach_scale_f
-!DEC$endif
-!
INTEGER(hid_t), INTENT(in) :: did ! the dataset
INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached
INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with.
@@ -148,13 +135,7 @@ CONTAINS
SUBROUTINE H5DSdetach_scale_f( did, dsid, idx, errcode)
IMPLICIT NONE
-
-!
-!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_HL_DLL)
-!DEC$attributes dllexport :: h5dsdetach_scale_f
-!DEC$endif
-!
+
INTEGER(hid_t), INTENT(in) :: did ! the dataset
INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be detached
INTEGER , INTENT(in) :: idx ! the dimension of did to detach
@@ -199,13 +180,7 @@ CONTAINS
SUBROUTINE H5DSis_attached_f( did, dsid, idx, is_attached, errcode)
IMPLICIT NONE
-
-!
-!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_HL_DLL)
-!DEC$attributes dllexport :: h5dsis_attached_f
-!DEC$endif
-!
+
INTEGER(hid_t), INTENT(in) :: did ! the dataset
INTEGER(hid_t), INTENT(in) :: dsid ! the scale to be attached
INTEGER , INTENT(in) :: idx ! the dimension of did that dsid is associated with
@@ -264,13 +239,7 @@ CONTAINS
SUBROUTINE H5DSis_scale_f( did, is_scale, errcode)
IMPLICIT NONE
-
-!
-!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_HL_DLL)
-!DEC$attributes dllexport :: h5dsis_scale_f
-!DEC$endif
-!
+
INTEGER(hid_t), INTENT(in) :: did ! the data set to query
LOGICAL , INTENT(out) :: is_scale ! logical:
! .TRUE. if did is a Dimension Scale
@@ -319,13 +288,6 @@ CONTAINS
IMPLICIT NONE
-!
-!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_HL_DLL)
-!DEC$attributes dllexport :: h5dsset_label_f
-!DEC$endif
-!
-
INTEGER(hid_t), INTENT(in) :: did ! The dataset
INTEGER , INTENT(in) :: idx ! The dimension
CHARACTER(LEN=*), INTENT(in) :: label ! The label
@@ -375,13 +337,6 @@ CONTAINS
IMPLICIT NONE
-!
-!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_HL_DLL)
-!DEC$attributes dllexport :: h5dsget_label_f
-!DEC$endif
-!
-
INTEGER(hid_t), INTENT(in) :: did ! The dataget
INTEGER , INTENT(in) :: idx ! The dimension
CHARACTER(LEN=*), INTENT(in) :: label ! The label
@@ -430,13 +385,6 @@ CONTAINS
IMPLICIT NONE
-!
-!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_HL_DLL)
-!DEC$attributes dllexport :: h5dsget_scale_name_f
-!DEC$endif
-!
-
INTEGER(hid_t), INTENT(in) :: did ! The dataget
CHARACTER(LEN=*), INTENT(out) :: name ! The name
INTEGER(size_t) , INTENT(inout) :: size ! The length of the name buffer
@@ -478,13 +426,6 @@ CONTAINS
SUBROUTINE H5DSget_num_scales_f( did, idx, num_scales, errcode)
IMPLICIT NONE
-
-!
-!This definition is needed for Windows DLLs
-!DEC$if defined(BUILD_HDF5_HL_DLL)
-!DEC$attributes dllexport :: h5dsget_num_scales_f
-!DEC$endif
-!
INTEGER(hid_t), INTENT(in) :: did ! the dataset
INTEGER , INTENT(in) :: idx ! the dimension of did to query
INTEGER , INTENT(out) :: num_scales ! the number of Dimension Scales associated with did
diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h
index 35b08a1..031db2c 100644
--- a/hl/fortran/src/H5LTf90proto.h
+++ b/hl/fortran/src/H5LTf90proto.h
@@ -303,7 +303,7 @@ h5tbmake_table_c(size_t_f *namelen1,
hid_t_f *field_types,
hsize_t_f *chunk_size,
int_f *compress,
- size_t_f *char_len_field_names, /* field_names lenghts */
+ size_t_f *char_len_field_names, /* field_names lengths */
size_t_f *max_char_size_field_names, /* char len of fields */
_fcd buf); /* field_names */
@@ -334,7 +334,7 @@ h5tbmake_table_ptr_c(size_t_f *namelen1,
hsize_t_f *chunk_size,
void *fill_data,
int_f *compress,
- size_t_f *char_len_field_names, /* field_names lenghts */
+ size_t_f *char_len_field_names, /* field_names lengths */
size_t_f *max_char_size_field_names, /* char len of fields */
char *field_names, /* field_names */
void *data);
diff --git a/hl/fortran/src/H5TBfc.c b/hl/fortran/src/H5TBfc.c
index c0d053f..331f0bc 100644
--- a/hl/fortran/src/H5TBfc.c
+++ b/hl/fortran/src/H5TBfc.c
@@ -38,7 +38,7 @@ int_f
h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *namelen, _fcd name,
hsize_t_f *nfields, hsize_t_f *nrecords, size_t_f *type_size, size_t_f *field_offset,
hid_t_f *field_types, hsize_t_f *chunk_size, int_f *compress,
- size_t_f *char_len_field_names, /* field_names lenghts */
+ size_t_f *char_len_field_names, /* field_names lengths */
size_t_f *max_char_size_field_names, /* char len of fields */
char *field_names) /* field_names */
{
@@ -143,7 +143,7 @@ h5tbmake_table_ptr_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *
_fcd name, hsize_t_f *nfields, hsize_t_f *nrecords, size_t_f *type_size,
size_t_f *field_offset, hid_t_f *field_types, hsize_t_f *chunk_size,
void *fill_data, int_f *compress,
- size_t_f *char_len_field_names, /* field_names lenghts */
+ size_t_f *char_len_field_names, /* field_names lengths */
size_t_f *max_char_size_field_names, /* char len of fields */
char *field_names,
void *data) /* field_names */
@@ -638,7 +638,7 @@ done:
int_f
h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *nfields,
size_t_f *field_sizes, size_t_f *field_offsets, size_t_f *type_size,
- size_t_f *namelen2, /* field_names lenghts */
+ size_t_f *namelen2, /* field_names lengths */
size_t_f *lenmax, /* character len max */
_fcd field_names, /* field_names */
size_t_f *maxlen_out)
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index 3138173..5c83d03 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran)
#-----------------------------------------------------------------------------
@@ -8,15 +8,13 @@ INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${
#-- Adding test for hl_f90_tstds
add_executable (hl_f90_tstds tstds.F90)
-TARGET_NAMING (hl_f90_tstds STATIC)
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_target_properties (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+if (BUILD_SHARED_LIBS)
add_executable (hl_f90_tstds-shared tstds.F90)
- TARGET_NAMING (hl_f90_tstds-shared SHARED)
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)
@@ -29,15 +27,13 @@ endif ()
#-- Adding test for hl_f90_tstlite
add_executable (hl_f90_tstlite tstlite.F90)
-TARGET_NAMING (hl_f90_tstlite STATIC)
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_target_properties (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+if (BUILD_SHARED_LIBS)
add_executable (hl_f90_tstlite-shared tstlite.F90)
- TARGET_NAMING (hl_f90_tstlite-shared SHARED)
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)
@@ -50,15 +46,13 @@ endif ()
#-- Adding test for hl_f90_tstimage
add_executable (hl_f90_tstimage tstimage.F90)
-TARGET_NAMING (hl_f90_tstimage STATIC)
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_target_properties (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+if (BUILD_SHARED_LIBS)
add_executable (hl_f90_tstimage-shared tstimage.F90)
- TARGET_NAMING (hl_f90_tstimage-shared SHARED)
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)
@@ -71,15 +65,13 @@ endif ()
#-- Adding test for hl_f90_tsttable
add_executable (hl_f90_tsttable tsttable.F90)
-TARGET_NAMING (hl_f90_tsttable STATIC)
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_target_properties (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran)
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+if (BUILD_SHARED_LIBS)
add_executable (hl_f90_tsttable-shared tsttable.F90)
- TARGET_NAMING (hl_f90_tsttable-shared SHARED)
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)
diff --git a/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake
index 90cc3a3..d541377 100644
--- a/hl/fortran/test/CMakeTests.cmake
+++ b/hl/fortran/test/CMakeTests.cmake
@@ -96,7 +96,7 @@ else ()
endif ()
set_tests_properties (HL_FORTRAN_f90_tsttable PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects)
-if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+if (BUILD_SHARED_LIBS)
add_test (
NAME HL_FORTRAN_test-shared-clear-objects
COMMAND ${CMAKE_COMMAND}
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index 86472fb..0daa86e 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_SRC)
#-----------------------------------------------------------------------------
@@ -31,7 +31,7 @@ set (HL_HEADERS
add_library (${HDF5_HL_LIB_TARGET} STATIC ${HL_SOURCES} ${HL_HEADERS})
TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+target_link_libraries (${HDF5_HL_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC)
set_target_properties (${HDF5_HL_LIB_TARGET} PROPERTIES
FOLDER libraries/hl
@@ -43,7 +43,7 @@ set (install_targets ${HDF5_HL_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_HL_LIBSH_TARGET} SHARED ${HL_SOURCES} ${HL_HEADERS})
TARGET_C_PROPERTIES (${HDF5_HL_LIBSH_TARGET} SHARED " " " ")
- target_link_libraries (${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_link_libraries (${HDF5_HL_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_HL_LIBSH_TARGET} ${HDF5_HL_LIB_NAME} SHARED ${HDF5_HL_PACKAGE_SOVERSION})
set_target_properties (${HDF5_HL_LIBSH_TARGET} PROPERTIES
FOLDER libraries/hl
@@ -88,3 +88,49 @@ if (HDF5_EXPORTED_TARGETS)
INCLUDES DESTINATION include
)
endif ()
+
+#-----------------------------------------------------------------------------
+# Create pkgconfig files
+#-----------------------------------------------------------------------------
+set (_PKG_CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX})
+set (_PKG_CONFIG_EXEC_PREFIX \${prefix})
+set (_PKG_CONFIG_LIBDIR \${exec_prefix}/lib)
+set (_PKG_CONFIG_INCLUDEDIR \${prefix}/include)
+set (_PKG_CONFIG_LIBNAME "${HDF5_HL_LIB_CORENAME}")
+set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
+
+set (_PKG_CONFIG_LIBS_PRIVATE)
+
+set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_HL_LIB_CORENAME}")
+if (BUILD_SHARED_LIBS)
+ set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_HL_LIB_CORENAME}")
+endif ()
+
+set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}")
+set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}")
+
+configure_file (
+ ${HDF_RESOURCES_DIR}/libhdf5.pc.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
+ @ONLY
+)
+install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_HL_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
+ DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig
+ COMPONENT hllibraries
+)
+
+if (NOT WIN32)
+ set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER})
+ configure_file (
+ ${HDF_RESOURCES_DIR}/libh5cc.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/h5chl
+ @ONLY
+ )
+ install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/h5chl
+ DESTINATION ${HDF5_INSTALL_BIN_DIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ COMPONENT hllibraries
+ )
+endif ()
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index 8845505..6b3c764 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_TEST)
# --------------------------------------------------------------------
# Notes: When creating unit test executables they should be prefixed
@@ -22,7 +22,6 @@ include_directories (${HDF5_TEST_SRC_DIR})
# --------------------------------------------------------------------
MACRO (HL_ADD_EXE hl_name)
add_executable (hl_${hl_name} ${hl_name}.c)
- TARGET_NAMING (hl_${hl_name} STATIC)
TARGET_C_PROPERTIES (hl_${hl_name} STATIC " " " ")
target_link_libraries (hl_${hl_name}
${HDF5_HL_LIB_TARGET}
@@ -34,7 +33,6 @@ ENDMACRO ()
MACRO (HL_ADD_SHEXE hl_name)
add_executable (hl_${hl_name} ${hl_name}.c)
- TARGET_NAMING (hl_${hl_name} SHARED)
TARGET_C_PROPERTIES (hl_${hl_name} SHARED " " " ")
target_link_libraries (hl_${hl_name}
${HDF5_HL_LIBSH_TARGET}
@@ -55,7 +53,6 @@ HL_ADD_EXE (test_dset_append)
# test_packet has two source files
add_executable (hl_test_packet test_packet.c test_packet_vlen.c)
-TARGET_NAMING (hl_test_packet STATIC)
TARGET_C_PROPERTIES (hl_test_packet STATIC " " " ")
target_link_libraries (hl_test_packet
${HDF5_HL_LIB_TARGET}
@@ -70,7 +67,6 @@ set_target_properties (hl_test_packet PROPERTIES FOLDER test/hl)
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (hl_gen_test_ds gen_test_ds.c)
- TARGET_NAMING (hl_gen_test_ds STATIC)
TARGET_C_PROPERTIES (hl_gen_test_ds STATIC " " " ")
target_link_libraries (hl_gen_test_ds
${HDF5_HL_LIB_TARGET}
@@ -80,7 +76,6 @@ 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)
- TARGET_NAMING (hl_gen_test_ld STATIC)
TARGET_C_PROPERTIES (hl_gen_test_ld STATIC " " " ")
target_link_libraries (hl_gen_test_ld
${HDF5_HL_LIB_TARGET}
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c
index 91f1505..49dc72f 100644
--- a/hl/test/test_ds.c
+++ b/hl/test/test_ds.c
@@ -3080,7 +3080,7 @@ static int test_simple(void)
/*-------------------------------------------------------------------------
- * get the label using a static buffer smaller than the string lenght
+ * get the label using a static buffer smaller than the string length
*-------------------------------------------------------------------------
*/
@@ -3118,7 +3118,7 @@ static int test_simple(void)
*-------------------------------------------------------------------------
*/
- /* get the lenght of the scale name (pass NULL in name) */
+ /* get the length of the scale name (pass NULL in name) */
if((name_len=H5DSget_scale_name(dsid,NULL,(size_t)0)) < 0)
goto out;
@@ -3151,7 +3151,7 @@ static int test_simple(void)
goto out;
/*-------------------------------------------------------------------------
- * get the scale name using a static buffer smaller than the string lenght
+ * get the scale name using a static buffer smaller than the string length
*-------------------------------------------------------------------------
*/
@@ -4925,7 +4925,7 @@ static int test_errors2(void)
hsize_t dimd[2] = {3,3}; /* size of data dataset */
hsize_t dims[1] = {3}; /* size of scale dataset */
char lbuf[255]; /* label buffer */
- ssize_t label_len; /* label lenght */
+ ssize_t label_len; /* label length */
int scale_idx; /* scale index */
int nscales; /* number of scales in DIM */
int count; /* visitor data */
diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt
index 9536517..67e0ccb 100644
--- a/hl/tools/CMakeLists.txt
+++ b/hl/tools/CMakeLists.txt
@@ -1,6 +1,6 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_TOOLS C CXX)
-add_subdirectory (${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5 ${HDF5_HL_TOOLS_BINARY_DIR}/gif2h5)
+add_subdirectory (gif2h5)
-add_subdirectory (${HDF5_HL_TOOLS_SOURCE_DIR}/h5watch ${HDF5_HL_TOOLS_BINARY_DIR}/h5watch)
+add_subdirectory (h5watch)
diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt
index 9d7a406..2697dfd 100644
--- a/hl/tools/gif2h5/CMakeLists.txt
+++ b/hl/tools/gif2h5/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_TOOLS_GIF2H5)
#-----------------------------------------------------------------------------
@@ -18,7 +18,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
INCLUDE_DIRECTORIES (${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR})
add_executable (gif2h5 ${GIF2H5_SOURCES})
-TARGET_NAMING (gif2h5 STATIC)
TARGET_C_PROPERTIES (gif2h5 STATIC " " " ")
target_link_libraries (gif2h5 ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (gif2h5 PROPERTIES FOLDER tools/hl)
@@ -30,7 +29,6 @@ set (hdf2gif_SOURCES
${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdfgifwr.c
)
add_executable (h52gif ${hdf2gif_SOURCES})
-TARGET_NAMING (h52gif STATIC)
TARGET_C_PROPERTIES (h52gif STATIC " " " ")
target_link_libraries (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h52gif PROPERTIES FOLDER tools/hl)
@@ -44,7 +42,6 @@ if (BUILD_TESTING)
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (hl_h52gifgentest ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/h52gifgentst.c)
- TARGET_NAMING (hl_h52gifgentest STATIC)
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)
diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt
index 6b8d5f2..5de655e 100644
--- a/hl/tools/h5watch/CMakeLists.txt
+++ b/hl/tools/h5watch/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_HL_TOOLS_H5WATCH)
#-----------------------------------------------------------------------------
@@ -14,7 +14,6 @@ include_directories (${HDF5_HL_TOOLS_DIR}/src)
include_directories (${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR})
add_executable (h5watch ${H5WATCH_SOURCES})
-TARGET_NAMING (h5watch STATIC)
TARGET_C_PROPERTIES (h5watch STATIC " " " ")
target_link_libraries (h5watch ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5watch PROPERTIES FOLDER tools/hl)
@@ -27,7 +26,6 @@ if (BUILD_TESTING)
${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/swmr_check_compat_vfd.c
)
add_executable (hl_swmr_check_compat_vfd ${hl_swmr_check_compat_vfd_SOURCES})
- TARGET_NAMING (hl_swmr_check_compat_vfd STATIC)
TARGET_C_PROPERTIES (hl_swmr_check_compat_vfd STATIC " " " ")
target_link_libraries (hl_swmr_check_compat_vfd ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (hl_swmr_check_compat_vfd PROPERTIES FOLDER tools/hl)
@@ -37,13 +35,11 @@ if (BUILD_TESTING)
${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/extend_dset.c
)
add_executable (extend_dset ${extend_dset_SOURCES})
- TARGET_NAMING (extend_dset STATIC)
TARGET_C_PROPERTIES (extend_dset STATIC " " " ")
target_link_libraries (extend_dset ${HDF5_HL_LIB_TARGET} ${HDF5_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)
- TARGET_NAMING (h5watchgentest STATIC)
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)
diff --git a/hl/tools/h5watch/testh5watch.sh.in b/hl/tools/h5watch/testh5watch.sh.in
index 05e66bf..3f8f5ae 100644
--- a/hl/tools/h5watch/testh5watch.sh.in
+++ b/hl/tools/h5watch/testh5watch.sh.in
@@ -44,7 +44,7 @@ GEN_TEST=h5watchgentest # Generate HDF5 file with various datasets
GEN_TEST_BIN=`pwd`/$GEN_TEST # Path of the binary GEN_TEST
WATCHFILE=`pwd`/WATCH.h5 # The HDF5 file generated to test h5watch
TESTFILE=TEST.h5 # The temporary file (a copy of WATCH.h5) used by tests
-TRY_MAX=10 # Try running the test again
+TRY_MAX=30 # Try running the test again
#
# These 3 defines should be the same as the defines in ./extend_dset.c
WRITER_MESSAGE=writer_message # The message file created by the "extend" process