summaryrefslogtreecommitdiffstats
path: root/hl/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'hl/fortran')
-rw-r--r--hl/fortran/Makefile.in5
-rw-r--r--hl/fortran/examples/CMakeLists.txt6
-rw-r--r--hl/fortran/examples/Makefile.in5
-rw-r--r--hl/fortran/src/CMakeLists.txt103
-rw-r--r--hl/fortran/src/Makefile.in5
-rw-r--r--hl/fortran/test/CMakeLists.txt72
-rw-r--r--hl/fortran/test/CMakeTests.cmake31
-rw-r--r--hl/fortran/test/Makefile.in5
8 files changed, 181 insertions, 51 deletions
diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in
index 6d87e82..a67c8d6 100644
--- a/hl/fortran/Makefile.in
+++ b/hl/fortran/Makefile.in
@@ -106,7 +106,10 @@ TESTS =
subdir = hl/fortran
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
- $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index bded2d9..87838a0 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -16,14 +16,14 @@ 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} ${LIB_TYPE})
- TARGET_FORTRAN_PROPERTIES (hl_f90_ex_${example} ${LIB_TYPE} " " " ")
+ 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}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
- target_include_directories (hl_f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY})
+ target_include_directories (hl_f90_ex_${example} PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_target_properties (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran)
diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in
index 71e70dd..d21b5fd 100644
--- a/hl/fortran/examples/Makefile.in
+++ b/hl/fortran/examples/Makefile.in
@@ -107,7 +107,10 @@ TESTS =
subdir = hl/fortran/examples
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
- $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt
index 0219c22..9d110a8 100644
--- a/hl/fortran/src/CMakeLists.txt
+++ b/hl/fortran/src/CMakeLists.txt
@@ -60,16 +60,33 @@ set_source_files_properties (${HDF5_HL_F90_C_SRCS} PROPERTIES LANGUAGE C)
set (HDF5_HL_F90_HEADERS ${HDF5_HL_F90_SRC_SOURCE_DIR}/H5LTf90proto.h)
-add_library (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS})
-TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} ${LIB_TYPE} " " " ")
+add_library (${HDF5_HL_F90_C_LIB_TARGET} STATIC ${HDF5_HL_F90_C_SRCS} ${HDF5_HL_F90_HEADERS})
+TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_HL_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIB_TARGET}")
-H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_HL_F90_C_LIB_NAME} ${LIB_TYPE})
+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
FOLDER libraries/hl/fortran
LINKER_LANGUAGE C
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
+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_SRCS} ${HDF5_HL_F90_HEADERS})
+ TARGET_C_PROPERTIES (${HDF5_HL_F90_C_LIBSH_TARGET} SHARED " " " ")
+ target_link_libraries (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_HL_LIBSH_TARGET})
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_C_LIBSH_TARGET}")
+ H5_SET_LIB_OPTIONS (${HDF5_HL_F90_C_LIBSH_TARGET} ${HDF5_HL_F90_C_LIB_NAME} SHARED)
+ set_target_properties (${HDF5_HL_F90_C_LIBSH_TARGET} PROPERTIES
+ FOLDER libraries/hl/fortran
+ LINKER_LANGUAGE C
+ COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
+ )
+ set (install_targets ${install_targets} ${HDF5_HL_F90_C_LIBSH_TARGET})
+endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Fortran Modules
@@ -105,43 +122,66 @@ add_custom_target (H5HLgen ALL
DEPENDS ${HDF5_HL_F90_F_BASE_SRCS}
)
-add_library (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} ${HDF5_HL_F90_F_SRCS})
-set (SHARED_LINK_FLAGS " ")
-if (WIN32)
- if (BUILD_SHARED_LIBS)
- set_property (TARGET ${HDF5_HL_F90_LIB_TARGET}
- APPEND PROPERTY COMPILE_DEFINITIONS
- BUILD_HDF5_HL_DLL
- )
- if (MSVC)
- set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_HL_F90_SRC_BINARY_DIR}/hdf5_hl_fortrandll.def")
- endif (MSVC)
- endif (BUILD_SHARED_LIBS)
- set_property (TARGET ${HDF5_HL_F90_LIB_TARGET}
- APPEND PROPERTY COMPILE_DEFINITIONS
- HDF5F90_WINDOWS
- )
-endif (WIN32)
-TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} ${LIB_TYPE} " " ${SHARED_LINK_FLAGS})
+add_library (${HDF5_HL_F90_LIB_TARGET} STATIC ${HDF5_HL_F90_F_SRCS})
+TARGET_FORTRAN_PROPERTIES (${HDF5_HL_F90_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_F90_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_F90_LIB_TARGET}")
-H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} ${LIB_TYPE})
+H5_SET_LIB_OPTIONS (${HDF5_HL_F90_LIB_TARGET} ${HDF5_HL_F90_LIB_NAME} STATIC)
set_target_properties (${HDF5_HL_F90_LIB_TARGET} PROPERTIES
FOLDER libraries/hl/fortran
LINKER_LANGUAGE Fortran
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
+if (WIN32)
+ set_property (TARGET ${HDF5_HL_F90_LIB_TARGET}
+ APPEND PROPERTY COMPILE_DEFINITIONS "HDF5F90_WINDOWS"
+ )
+endif (WIN32)
+set (install_targets ${install_targets} ${HDF5_HL_F90_LIB_TARGET})
+
+if (BUILD_SHARED_LIBS)
+ add_library (${HDF5_HL_F90_LIBSH_TARGET} SHARED ${HDF5_HL_F90_F_SRCS})
+ 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 (WIN32 AND MSVC)
+ 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})
+ 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)
+ set_target_properties (${HDF5_HL_F90_LIBSH_TARGET} PROPERTIES
+ FOLDER libraries/hl/fortran
+ LINKER_LANGUAGE Fortran
+ 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
+ )
+ if (WIN32)
+ set_property (TARGET ${HDF5_HL_F90_LIBSH_TARGET}
+ APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_HL_DLL;HDF5F90_WINDOWS"
+ )
+ endif (WIN32)
+ set (install_targets ${install_targets} ${HDF5_HL_F90_LIBSH_TARGET})
+endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-if (WIN32)
- set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/\${BUILD_TYPE})
-else (WIN32)
- set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY})
-endif (WIN32)
+if (BUILD_SHARED_LIBS)
+ if (WIN32)
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${BUILD_TYPE})
+ else (WIN32)
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
+ endif (WIN32)
+else (BUILD_SHARED_LIBS)
+ if (WIN32)
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${BUILD_TYPE})
+ else (WIN32)
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ endif (WIN32)
+endif (BUILD_SHARED_LIBS)
set (mod_files
${MOD_BUILD_DIR}/h5ds.mod
@@ -166,14 +206,13 @@ install (
#-----------------------------------------------------------------------------
if (HDF5_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
- INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries)
- #INSTALL_TARGET_PDB (${HDF5_HL_F90_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} hlfortlibraries)
+ 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 (BUILD_SHARED_LIBS)
install (
TARGETS
- ${HDF5_HL_F90_C_LIB_TARGET}
- ${HDF5_HL_F90_LIB_TARGET}
+ ${install_targets}
EXPORT
${HDF5_EXPORTED_TARGETS}
LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT hlfortlibraries
diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in
index 4aca74c..44a2d58 100644
--- a/hl/fortran/src/Makefile.in
+++ b/hl/fortran/src/Makefile.in
@@ -111,7 +111,10 @@ TESTS =
subdir = hl/fortran/src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
- $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index d90b524..a1d1386 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -8,38 +8,86 @@ 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 ${LIB_TYPE})
-TARGET_FORTRAN_PROPERTIES (hl_f90_tstds ${LIB_TYPE} " " " ")
+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})
+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)
+ 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)
+ set_target_properties (hl_f90_tstds-shared PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/hl/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
+ )
+endif (BUILD_SHARED_LIBS)
#-- Adding test for hl_f90_tstlite
add_executable (hl_f90_tstlite tstlite.F90)
-TARGET_NAMING (hl_f90_tstlite ${LIB_TYPE})
-TARGET_FORTRAN_PROPERTIES (hl_f90_tstlite ${LIB_TYPE} " " " ")
+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})
-target_include_directories (hl_f90_tstlite PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY})
+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)
+ 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})
+ target_include_directories (hl_f90_tstlite-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
+ set_target_properties (hl_f90_tstlite-shared PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/hl/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
+ )
+endif (BUILD_SHARED_LIBS)
#-- Adding test for hl_f90_tstimage
add_executable (hl_f90_tstimage tstimage.F90)
-TARGET_NAMING (hl_f90_tstimage ${LIB_TYPE})
-TARGET_FORTRAN_PROPERTIES (hl_f90_tstimage ${LIB_TYPE} " " " ")
+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})
+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)
+ 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)
+ set_target_properties (hl_f90_tstimage-shared PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/hl/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
+ )
+endif (BUILD_SHARED_LIBS)
#-- Adding test for hl_f90_tsttable
add_executable (hl_f90_tsttable tsttable.F90)
-TARGET_NAMING (hl_f90_tsttable ${LIB_TYPE})
-TARGET_FORTRAN_PROPERTIES (hl_f90_tsttable ${LIB_TYPE} " " " ")
+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})
-target_include_directories (hl_f90_tsttable PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY})
+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)
+ 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})
+ target_include_directories (hl_f90_tsttable-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
+ set_target_properties (hl_f90_tsttable-shared PROPERTIES
+ LINKER_LANGUAGE Fortran
+ FOLDER test/hl/fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
+ )
+endif (BUILD_SHARED_LIBS)
include (CMakeTests.cmake)
diff --git a/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake
index 3676d24..38181bf 100644
--- a/hl/fortran/test/CMakeTests.cmake
+++ b/hl/fortran/test/CMakeTests.cmake
@@ -31,3 +31,34 @@ set_tests_properties (HL_FORTRAN_f90_tstimage PROPERTIES DEPENDS HL_FORTRAN_test
add_test (NAME HL_FORTRAN_f90_tsttable COMMAND $<TARGET_FILE:hl_f90_tsttable>)
set_tests_properties (HL_FORTRAN_f90_tsttable PROPERTIES DEPENDS HL_FORTRAN_test-clear-objects)
+
+if (BUILD_SHARED_LIBS)
+ add_test (
+ NAME HL_FORTRAN_test-shared-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ dsetf1.h5
+ dsetf2.h5
+ dsetf3.h5
+ dsetf4.h5
+ dsetf5.h5
+ f1img.h5
+ f1tab.h5
+ tstds.h5
+ )
+ set_tests_properties (HL_FORTRAN_test-shared-clear-objects
+ PROPERTIES DEPENDS "HL_FORTRAN_f90_tsttable;HL_FORTRAN_f90_tstimage;HL_FORTRAN_f90_tstlite;HL_FORTRAN_f90_tstds"
+ )
+
+ add_test (NAME HL_FORTRAN_f90_tstds-shared COMMAND $<TARGET_FILE:hl_f90_tstds-shared>)
+ set_tests_properties (HL_FORTRAN_f90_tstds-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects)
+
+ add_test (NAME HL_FORTRAN_f90_tstlite-shared COMMAND $<TARGET_FILE:hl_f90_tstlite-shared>)
+ set_tests_properties (HL_FORTRAN_f90_tstlite-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects)
+
+ add_test (NAME HL_FORTRAN_f90_tstimage-shared COMMAND $<TARGET_FILE:hl_f90_tstimage-shared>)
+ set_tests_properties (HL_FORTRAN_f90_tstimage-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects)
+
+ add_test (NAME HL_FORTRAN_f90_tsttable-shared COMMAND $<TARGET_FILE:hl_f90_tsttable-shared>)
+ set_tests_properties (HL_FORTRAN_f90_tsttable-shared PROPERTIES DEPENDS HL_FORTRAN_test-shared-clear-objects)
+endif (BUILD_SHARED_LIBS)
diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in
index ee4b206..6a9c622 100644
--- a/hl/fortran/test/Makefile.in
+++ b/hl/fortran/test/Makefile.in
@@ -108,7 +108,10 @@ TESTS = $(am__EXEEXT_1)
subdir = hl/fortran/test
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal_cxx.m4 \
- $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/m4/aclocal_fc.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs