summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/CMakeLists.txt10
-rw-r--r--fortran/Makefile.in78
-rw-r--r--fortran/examples/CMakeLists.txt8
-rw-r--r--fortran/examples/Makefile.in78
-rw-r--r--fortran/examples/h5_crtatt.f904
-rw-r--r--fortran/src/CMakeLists.txt96
-rw-r--r--fortran/src/Makefile.in92
-rw-r--r--fortran/test/CMakeLists.txt32
-rw-r--r--fortran/test/Makefile.in78
-rw-r--r--fortran/testpar/CMakeLists.txt3
-rw-r--r--fortran/testpar/Makefile.in78
11 files changed, 363 insertions, 194 deletions
diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt
index 075e1da..8c7b8f6 100644
--- a/fortran/CMakeLists.txt
+++ b/fortran/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_F90 C CXX Fortran)
if (H5_HAVE_PARALLEL)
@@ -10,21 +10,21 @@ endif ()
#-----------------------------------------------------------------------------
# Traverse source subdirectory
#-----------------------------------------------------------------------------
-add_subdirectory (${HDF5_F90_SOURCE_DIR}/src ${HDF5_F90_BINARY_DIR}/src)
+add_subdirectory (src)
#-----------------------------------------------------------------------------
# Build the Fortran Examples
#-----------------------------------------------------------------------------
if (HDF5_BUILD_EXAMPLES)
- add_subdirectory (${HDF5_F90_SOURCE_DIR}/examples ${HDF5_F90_BINARY_DIR}/examples)
+ add_subdirectory (examples)
endif ()
#-----------------------------------------------------------------------------
# Testing
#-----------------------------------------------------------------------------
if (BUILD_TESTING)
- add_subdirectory (${HDF5_F90_SOURCE_DIR}/test ${HDF5_F90_BINARY_DIR}/test)
+ add_subdirectory (test)
if (MPI_Fortran_FOUND)
- add_subdirectory (${HDF5_F90_SOURCE_DIR}/testpar ${HDF5_F90_BINARY_DIR}/testpar)
+ add_subdirectory (testpar)
endif ()
endif ()
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index d46c86d..0183f58 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -692,6 +692,7 @@ chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
+REALTIMEOUTPUT = $(realtimeOutput)
TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
@@ -1187,7 +1188,6 @@ check-clean ::
(set -x; cd $$d && $(MAKE) $(AM_MAKEFLAGS) $@) || exit 1; \
fi; \
done
-
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1275,28 +1275,62 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \
echo "No need to test $${tname} again."; \
else \
- echo "============================" > $${log}; \
- if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
- elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
- else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
- fi; \
- echo "============================" >> $${log}; \
- srcdir="$(srcdir)" \
- $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
- && touch $(@:.chkexe_=.chkexe) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- (cat $${log} && false) || exit 1; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "============================" | tee $${log}; \
+ else \
+ echo "============================" > $${log}; \
+ fi; \
+ if test "X$(FORTRAN_API)" = "Xyes"; then \
+ echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ else \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ elif test "X$(CXX_API)" = "Xyes"; then \
+ echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ else \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ fi; \
+ else \
+ echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ else \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "============================" | tee -a $${log}; \
+ else \
+ echo "============================" >> $${log}; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) | tee -a $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ else \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ fi; \
echo "" >> $${log}; \
- echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
- echo "============================" >> $${log}; \
- echo "Finished testing $${tname} $(TEST_FLAGS)"; \
- cat $${log}; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
+ echo "============================" | tee -a $${log}; \
+ else \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
+ echo "============================" >> $${log}; \
+ fi; \
+ if test -z "$(REALTIMEOUTPUT)"; then \
+ cat $${log}; \
+ fi; \
fi; \
fi
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index cd5da0e..5300453 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_F90_EXAMPLES C CXX Fortran)
# --------------------------------------------------------------------
# Notes: When creating examples they should be prefixed
@@ -40,7 +40,6 @@ set (F2003_examples
foreach (example ${examples})
add_executable (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_NAMING (f90_ex_${example} STATIC)
TARGET_FORTRAN_PROPERTIES (f90_ex_${example} STATIC " " " ")
target_link_libraries (f90_ex_${example}
${HDF5_F90_LIB_TARGET}
@@ -54,7 +53,6 @@ foreach (example ${examples})
)
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (f90_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_NAMING (f90_ex_${example}-shared SHARED)
TARGET_FORTRAN_PROPERTIES (f90_ex_${example}-shared SHARED " " " ")
target_link_libraries (f90_ex_${example}-shared
${HDF5_F90_LIBSH_TARGET}
@@ -72,7 +70,6 @@ endforeach ()
if (HDF5_ENABLE_F2003)
foreach (example ${F2003_examples})
add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_NAMING (f03_ex_${example} STATIC)
TARGET_FORTRAN_PROPERTIES (f03_ex_${example} STATIC " " " ")
target_link_libraries (f03_ex_${example}
${HDF5_F90_LIB_TARGET}
@@ -86,7 +83,6 @@ if (HDF5_ENABLE_F2003)
)
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (f03_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- TARGET_NAMING (f03_ex_${example}-shared SHARED)
TARGET_FORTRAN_PROPERTIES (f03_ex_${example}-shared SHARED " " " ")
target_link_libraries (f03_ex_${example}-shared
${HDF5_F90_LIBSH_TARGET}
@@ -104,7 +100,6 @@ endif ()
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
- TARGET_NAMING (f90_ex_ph5example STATIC)
TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example STATIC " " " ")
target_link_libraries (f90_ex_ph5example
${HDF5_F90_LIB_TARGET}
@@ -118,7 +113,6 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
)
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (f90_ex_ph5example-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
- TARGET_NAMING (f90_ex_ph5example-shared SHARED)
TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example-shared SHARED " " " ")
target_link_libraries (f90_ex_ph5example-shared
${HDF5_F90_LIBSH_TARGET}
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index 208bd44..7cc5bff 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -675,6 +675,7 @@ chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
+REALTIMEOUTPUT = $(realtimeOutput)
TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
@@ -1152,7 +1153,6 @@ installcheck-local:
(cd $(EXAMPLEDIR); \
/bin/sh ./$(TEST_EXAMPLES_SCRIPT);) \
fi
-
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1240,28 +1240,62 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \
echo "No need to test $${tname} again."; \
else \
- echo "============================" > $${log}; \
- if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
- elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
- else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
- fi; \
- echo "============================" >> $${log}; \
- srcdir="$(srcdir)" \
- $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
- && touch $(@:.chkexe_=.chkexe) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- (cat $${log} && false) || exit 1; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "============================" | tee $${log}; \
+ else \
+ echo "============================" > $${log}; \
+ fi; \
+ if test "X$(FORTRAN_API)" = "Xyes"; then \
+ echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ else \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ elif test "X$(CXX_API)" = "Xyes"; then \
+ echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ else \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ fi; \
+ else \
+ echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ else \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "============================" | tee -a $${log}; \
+ else \
+ echo "============================" >> $${log}; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) | tee -a $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ else \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ fi; \
echo "" >> $${log}; \
- echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
- echo "============================" >> $${log}; \
- echo "Finished testing $${tname} $(TEST_FLAGS)"; \
- cat $${log}; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
+ echo "============================" | tee -a $${log}; \
+ else \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
+ echo "============================" >> $${log}; \
+ fi; \
+ if test -z "$(REALTIMEOUTPUT)"; then \
+ cat $${log}; \
+ fi; \
fi; \
fi
diff --git a/fortran/examples/h5_crtatt.f90 b/fortran/examples/h5_crtatt.f90
index 7e287c6..d3df380 100644
--- a/fortran/examples/h5_crtatt.f90
+++ b/fortran/examples/h5_crtatt.f90
@@ -84,6 +84,10 @@ PROGRAM H5_CRTATT
!
CALL h5aclose_f(attr_id, error)
!
+ ! Close the attribute datatype.
+ !
+ CALL h5tclose_f(atype_id, error)
+ !
! Terminate access to the data space.
!
CALL h5sclose_f(aspace_id, error)
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 89fc1a5..00035ba 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -1,10 +1,10 @@
-cmake_minimum_required (VERSION 3.2.2)
-PROJECT (HDF5_F90_SRC C CXX Fortran)
+cmake_minimum_required (VERSION 3.10)
+project (HDF5_F90_SRC C CXX Fortran)
#-----------------------------------------------------------------------------
# configure def file for shared libs on windows
if (WIN32)
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
if (MSVC)
if (NOT H5_HAVE_PARALLEL)
set (H5_NOPAREXP ";")
@@ -58,7 +58,7 @@ else ()
endif ()
endif ()
if (WIN32 AND MSVC)
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
set_target_properties (H5test_FortranHavekind-shared
PROPERTIES
COMPILE_FLAGS "/MT"
@@ -80,10 +80,9 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
)
endif ()
-set (CMD $<TARGET_FILE:H5test_FortranHavekind>)
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90
- COMMAND ${CMD}
+ COMMAND $<TARGET_FILE:H5test_FortranHavekind>
ARGS > ${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
DEPENDS H5test_FortranHavekind
@@ -93,7 +92,7 @@ add_executable (H5fortran_detect
${HDF5_F90_BINARY_DIR}/H5fortran_detect.f90
)
if (WIN32 AND MSVC)
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
set_target_properties (H5fortran_detect
PROPERTIES
COMPILE_FLAGS "/MT"
@@ -106,10 +105,9 @@ if (WIN32 AND MSVC)
endif ()
set_target_properties (H5fortran_detect PROPERTIES LINKER_LANGUAGE Fortran)
-set (CMD $<TARGET_FILE:H5fortran_detect>)
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
- COMMAND ${CMD}
+ COMMAND $<TARGET_FILE:H5fortran_detect>
ARGS > ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
DEPENDS H5fortran_detect
@@ -117,40 +115,43 @@ add_custom_command (
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
file (MAKE_DIRECTORY "${HDF5_F90_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)
+ set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF_CFG_BUILD_TYPE})
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_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY})
+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
)
-set (CMD $<TARGET_FILE:H5match_types>)
add_custom_command (
- OUTPUT ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
- ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90
- COMMAND ${CMD}
- WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}
+ OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
+ ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.f90
+ COMMAND $<TARGET_FILE:H5match_types>
+ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
DEPENDS H5match_types
)
-set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5f90i_gen.h PROPERTIES GENERATED TRUE)
-set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5fortran_types.F90 PROPERTIES GENERATED TRUE)
+set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h PROPERTIES GENERATED TRUE)
+set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5fortran_types.f90 PROPERTIES GENERATED TRUE)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ add_custom_command (
+ OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
+ ${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.f90
+ COMMAND $<TARGET_FILE:H5match_types>
+ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/shared
+ DEPENDS H5match_types
+ )
+ set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h PROPERTIES GENERATED TRUE)
+ set_source_files_properties (${HDF5_F90_BINARY_DIR}/shared/H5fortran_types.f90 PROPERTIES GENERATED TRUE)
+endif ()
#-----------------------------------------------------------------------------
# f90CStub lib
#-----------------------------------------------------------------------------
-set (f90CStub_C_SRCS
+set (f90CStub_C_SOURCES
# normal distribution
${HDF5_F90_SRC_SOURCE_DIR}/H5f90kit.c
${HDF5_F90_SRC_SOURCE_DIR}/H5_f.c
@@ -168,25 +169,23 @@ set (f90CStub_C_SRCS
${HDF5_F90_SRC_SOURCE_DIR}/H5Tf.c
${HDF5_F90_SRC_SOURCE_DIR}/H5Zf.c
)
-
-if (H5_HAVE_PARALLEL)
- set (f90CStub_C_SRCS
- ${f90CStub_C_SRCS}
- ${HDF5_F90_SRC_SOURCE_DIR}/H5FDmpiof.c
- )
-endif ()
-set_source_files_properties (${f90CStub_C_SRCS} PROPERTIES LANGUAGE C)
+set_source_files_properties (${f90CStub_C_SOURCES} PROPERTIES LANGUAGE C)
set (f90CStub_C_HDRS
# generated files
- ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
+ ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
+)
+set (f90CStub_C_SHHDRS
+ # generated files
+ ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
)
-add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SRCS} ${f90CStub_C_HDRS})
+add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS})
+target_include_directories(${HDF5_F90_C_LIB_TARGET} PUBLIC ${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}")
-H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} STATIC)
+H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} STATIC 0)
set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES
FOLDER libraries/fortran
LINKER_LANGUAGE C
@@ -195,11 +194,12 @@ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES
set (install_targets ${HDF5_F90_C_LIB_TARGET})
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SRCS} ${f90CStub_C_HDRS})
+ add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_SHHDRS})
+ target_include_directories(${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${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}")
- H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIB_NAME} SHARED ${HDF5_F_PACKAGE_SOVERSION})
+ H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIB_NAME} SHARED "F")
set_target_properties (${HDF5_F90_C_LIBSH_TARGET} PROPERTIES
FOLDER libraries/fortran
LINKER_LANGUAGE C
@@ -237,7 +237,7 @@ endif ()
#-----------------------------------------------------------------------------
set (f90_F_SRCS
# generated files
- ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90
+ ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.f90
# normal distribution
${HDF5_F90_SRC_SOURCE_DIR}/H5f90global.f90
@@ -293,11 +293,12 @@ 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)
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
target_include_directories (${HDF5_F90_LIB_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
endif ()
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}")
-H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC)
+H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC 0)
set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES
FOLDER libraries/fortran
LINKER_LANGUAGE Fortran
@@ -320,11 +321,12 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
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)
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
target_include_directories (${HDF5_F90_LIBSH_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
endif ()
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIBSH_TARGET}")
- H5_SET_LIB_OPTIONS (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_LIB_NAME} SHARED ${HDF5_F_PACKAGE_SOVERSION})
+ H5_SET_LIB_OPTIONS (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_LIB_NAME} SHARED "F")
set_target_properties (${HDF5_F90_LIBSH_TARGET} PROPERTIES
FOLDER libraries/fortran
LINKER_LANGUAGE Fortran
@@ -335,7 +337,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
)
if (WIN32)
set_property (TARGET ${HDF5_F90_LIBSH_TARGET}
- APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_DLL;HDF5F90_WINDOWS"
+ APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_DLL;HDF5F90_WINDOWS"
)
endif ()
set (install_targets ${install_targets} ${HDF5_F90_LIBSH_TARGET})
@@ -349,8 +351,8 @@ install (
${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h
${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h
${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h
- ${HDF5_F90_BINARY_DIR}/H5f90i_gen.h
- ${HDF5_F90_BINARY_DIR}/H5fortran_types.f90
+ ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
+ ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.f90
DESTINATION
${HDF5_INSTALL_INCLUDE_DIR}
COMPONENT
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index a182618..d120957 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -735,25 +735,25 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
# After making changes, run bin/reconfigure to update other configure related
# files like Makefile.in.
LT_VERS_INTERFACE = 13
-LT_VERS_REVISION = 1
+LT_VERS_REVISION = 2
LT_VERS_AGE = 3
-LT_CXX_VERS_INTERFACE = 15
+LT_CXX_VERS_INTERFACE = 16
LT_CXX_VERS_REVISION = 0
LT_CXX_VERS_AGE = 0
LT_F_VERS_INTERFACE = 10
-LT_F_VERS_REVISION = 5
+LT_F_VERS_REVISION = 6
LT_F_VERS_AGE = 0
LT_HL_VERS_INTERFACE = 12
-LT_HL_VERS_REVISION = 1
+LT_HL_VERS_REVISION = 2
LT_HL_VERS_AGE = 2
LT_HL_CXX_VERS_INTERFACE = 12
-LT_HL_CXX_VERS_REVISION = 1
+LT_HL_CXX_VERS_REVISION = 2
LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 10
-LT_HL_F_VERS_REVISION = 4
+LT_HL_F_VERS_REVISION = 5
LT_HL_F_VERS_AGE = 0
LT_TOOLS_VERS_INTERFACE = 10
-LT_TOOLS_VERS_REVISION = 6
+LT_TOOLS_VERS_REVISION = 7
LT_TOOLS_VERS_AGE = 0
AM_FCLIBS = $(LIBHDF5)
@@ -844,6 +844,7 @@ chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
+REALTIMEOUTPUT = $(realtimeOutput)
TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
@@ -1484,7 +1485,6 @@ HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5_ff$(F_STATUS).lo
H5Off.lo H5Off$(F_STATUS).lo H5Pff.lo H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo H5Rff.lo \
H5Sff.lo H5Tff.lo H5Tff$(F_STATUS).lo H5Zff.lo \
H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo
-
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1572,28 +1572,62 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \
echo "No need to test $${tname} again."; \
else \
- echo "============================" > $${log}; \
- if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
- elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
- else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
- fi; \
- echo "============================" >> $${log}; \
- srcdir="$(srcdir)" \
- $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
- && touch $(@:.chkexe_=.chkexe) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- (cat $${log} && false) || exit 1; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "============================" | tee $${log}; \
+ else \
+ echo "============================" > $${log}; \
+ fi; \
+ if test "X$(FORTRAN_API)" = "Xyes"; then \
+ echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ else \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ elif test "X$(CXX_API)" = "Xyes"; then \
+ echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ else \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ fi; \
+ else \
+ echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ else \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "============================" | tee -a $${log}; \
+ else \
+ echo "============================" >> $${log}; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) | tee -a $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ else \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ fi; \
echo "" >> $${log}; \
- echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
- echo "============================" >> $${log}; \
- echo "Finished testing $${tname} $(TEST_FLAGS)"; \
- cat $${log}; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
+ echo "============================" | tee -a $${log}; \
+ else \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
+ echo "============================" >> $${log}; \
+ fi; \
+ if test -z "$(REALTIMEOUTPUT)"; then \
+ cat $${log}; \
+ fi; \
fi; \
fi
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index c362564..738891e 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -1,22 +1,30 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
+INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_FORTRAN_TESTS_SOURCE_DIR} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
+
+if (BUILD_SHARED_LIBS)
+ file (MAKE_DIRECTORY "${HDF5_FORTRAN_TESTS_BINARY_DIR}/shared")
+ set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF_CFG_BUILD_TYPE})
+endif ()
+file (MAKE_DIRECTORY "${HDF5_FORTRAN_TESTS_BINARY_DIR}/static")
+set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE})
#-----------------------------------------------------------------------------
# Add Test Lib
#-----------------------------------------------------------------------------
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)
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET}
${HDF5_F90_C_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
)
-H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} STATIC)
+H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} STATIC 0)
set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
FOLDER libraries/test/fortran
LINKER_LANGUAGE C
@@ -24,12 +32,13 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
)
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
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)
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET}
${HDF5_F90_C_LIBSH_TARGET}
${HDF5_TEST_LIBSH_TARGET}
)
- H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION})
+ H5_SET_LIB_OPTIONS (${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_C_TEST_LIB_NAME} SHARED "F")
set_target_properties (${HDF5_F90_C_TEST_LIBSH_TARGET} PROPERTIES
FOLDER libraries/test/fortran
LINKER_LANGUAGE C
@@ -66,7 +75,7 @@ target_link_libraries (${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
)
-H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_TEST_LIB_NAME} STATIC)
+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_target_properties (${HDF5_F90_TEST_LIB_TARGET} PROPERTIES
FOLDER libraries/test/fortran
@@ -90,7 +99,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
${HDF5_F90_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
)
- H5_SET_LIB_OPTIONS (${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_TEST_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION})
+ 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_target_properties (${HDF5_F90_TEST_LIBSH_TARGET} PROPERTIES
FOLDER libraries/test/fortran
@@ -129,7 +138,6 @@ add_executable (testhdf5_fortran
tH5Z.f90
tHDF5.f90
)
-TARGET_NAMING (testhdf5_fortran STATIC)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran STATIC " " " ")
target_link_libraries (testhdf5_fortran
${HDF5_F90_TEST_LIB_TARGET}
@@ -163,7 +171,6 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
tH5Z.f90
tHDF5.f90
)
- TARGET_NAMING (testhdf5_fortran-shared SHARED)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran-shared SHARED " " " ")
target_link_libraries (testhdf5_fortran-shared
${HDF5_F90_TEST_LIBSH_TARGET}
@@ -190,7 +197,6 @@ add_executable (testhdf5_fortran_1_8
tH5MISC_1_8.f90
tHDF5_1_8.f90
)
-TARGET_NAMING (testhdf5_fortran_1_8 STATIC)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 STATIC " " " ")
target_link_libraries (testhdf5_fortran_1_8
${HDF5_F90_TEST_LIB_TARGET}
@@ -215,7 +221,6 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
tH5MISC_1_8.f90
tHDF5_1_8.f90
)
- TARGET_NAMING (testhdf5_fortran_1_8-shared SHARED)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8-shared SHARED " " " ")
target_link_libraries (testhdf5_fortran_1_8-shared
${HDF5_F90_TEST_LIBSH_TARGET}
@@ -245,7 +250,6 @@ if (HDF5_ENABLE_F2003)
tH5T_F03.f90
tHDF5_F03.f90
)
- TARGET_NAMING (fortranlib_test_F03 STATIC)
TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 STATIC " " " ")
target_link_libraries (fortranlib_test_F03
${HDF5_F90_TEST_LIB_TARGET}
@@ -255,6 +259,7 @@ if (HDF5_ENABLE_F2003)
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_target_properties (fortranlib_test_F03 PROPERTIES
LINKER_LANGUAGE Fortran
@@ -272,7 +277,6 @@ if (HDF5_ENABLE_F2003)
tH5T_F03.f90
tHDF5_F03.f90
)
- TARGET_NAMING (fortranlib_test_F03-shared SHARED)
TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03-shared SHARED " " " ")
target_link_libraries (fortranlib_test_F03-shared
${HDF5_F90_TEST_LIBSH_TARGET}
@@ -293,7 +297,6 @@ endif ()
#-- Adding test for fflush1
add_executable (fflush1 fflush1.f90)
-TARGET_NAMING (fflush1 STATIC)
TARGET_FORTRAN_PROPERTIES (fflush1 STATIC " " " ")
target_link_libraries (fflush1
${HDF5_F90_LIB_TARGET}
@@ -311,7 +314,6 @@ set_target_properties (fflush1 PROPERTIES
)
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (fflush1-shared fflush1.f90)
- TARGET_NAMING (fflush1-shared SHARED)
TARGET_FORTRAN_PROPERTIES (fflush1-shared SHARED " " " ")
target_link_libraries (fflush1-shared
${HDF5_F90_LIBSH_TARGET}
@@ -331,7 +333,6 @@ endif ()
#-- Adding test for fflush2
add_executable (fflush2 fflush2.f90)
-TARGET_NAMING (fflush2 STATIC)
TARGET_FORTRAN_PROPERTIES (fflush2 STATIC " " " ")
target_link_libraries (fflush2
${HDF5_F90_TEST_LIB_TARGET}
@@ -349,7 +350,6 @@ set_target_properties (fflush2 PROPERTIES
)
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (fflush2-shared fflush2.f90)
- TARGET_NAMING (fflush2-shared SHARED)
TARGET_FORTRAN_PROPERTIES (fflush2-shared SHARED " " " ")
target_link_libraries (fflush2-shared
${HDF5_F90_TEST_LIBSH_TARGET}
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index 4764b8f..b715720 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -808,6 +808,7 @@ chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
+REALTIMEOUTPUT = $(realtimeOutput)
TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
@@ -1460,7 +1461,6 @@ clean-local:
# fflush2 depends on files created by fflush1
fflush2.chkexe_: fflush1.chkexe_
-
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1548,28 +1548,62 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \
echo "No need to test $${tname} again."; \
else \
- echo "============================" > $${log}; \
- if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
- elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
- else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
- fi; \
- echo "============================" >> $${log}; \
- srcdir="$(srcdir)" \
- $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
- && touch $(@:.chkexe_=.chkexe) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- (cat $${log} && false) || exit 1; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "============================" | tee $${log}; \
+ else \
+ echo "============================" > $${log}; \
+ fi; \
+ if test "X$(FORTRAN_API)" = "Xyes"; then \
+ echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ else \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ elif test "X$(CXX_API)" = "Xyes"; then \
+ echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ else \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ fi; \
+ else \
+ echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ else \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "============================" | tee -a $${log}; \
+ else \
+ echo "============================" >> $${log}; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) | tee -a $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ else \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ fi; \
echo "" >> $${log}; \
- echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
- echo "============================" >> $${log}; \
- echo "Finished testing $${tname} $(TEST_FLAGS)"; \
- cat $${log}; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
+ echo "============================" | tee -a $${log}; \
+ else \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
+ echo "============================" >> $${log}; \
+ fi; \
+ if test -z "$(REALTIMEOUTPUT)"; then \
+ cat $${log}; \
+ fi; \
fi; \
fi
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index 4aa7f43..979d305 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.2.2)
+cmake_minimum_required (VERSION 3.10)
PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran)
#-----------------------------------------------------------------------------
@@ -16,7 +16,6 @@ add_executable (parallel_test
hyper.f90
mdset.f90
)
-TARGET_NAMING (parallel_test STATIC)
TARGET_FORTRAN_PROPERTIES (parallel_test STATIC " " " ")
target_link_libraries (parallel_test
${HDF5_F90_TEST_LIB_TARGET}
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index f318ce6..ea20988 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -695,6 +695,7 @@ chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
+REALTIMEOUTPUT = $(realtimeOutput)
TEST_PROG_CHKEXE = $(TEST_PROG:=.chkexe_)
TEST_PROG_PARA_CHKEXE = $(TEST_PROG_PARA:=.chkexe_)
TEST_SCRIPT_CHKSH = $(TEST_SCRIPT:=.chkexe_)
@@ -1132,7 +1133,6 @@ uninstall-am:
help:
@$(top_srcdir)/bin/makehelp
-
# lib/progs/tests targets recurse into subdirectories. build-* targets
# build files in this directory.
build-lib: $(LIB)
@@ -1220,28 +1220,62 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
if $(top_srcdir)/bin/newer $(@:.chkexe_=.chkexe) $${tname}; then \
echo "No need to test $${tname} again."; \
else \
- echo "============================" > $${log}; \
- if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
- elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
- else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
- fi; \
- echo "============================" >> $${log}; \
- srcdir="$(srcdir)" \
- $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
- && touch $(@:.chkexe_=.chkexe) || \
- (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
- (cat $${log} && false) || exit 1; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "============================" | tee $${log}; \
+ else \
+ echo "============================" > $${log}; \
+ fi; \
+ if test "X$(FORTRAN_API)" = "Xyes"; then \
+ echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ else \
+ echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ elif test "X$(CXX_API)" = "Xyes"; then \
+ echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ else \
+ echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ fi; \
+ else \
+ echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ else \
+ echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "============================" | tee -a $${log}; \
+ else \
+ echo "============================" >> $${log}; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) | tee -a $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ else \
+ srcdir="$(srcdir)" \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ && touch $(@:.chkexe_=.chkexe) || \
+ (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
+ (cat $${log} && false) || exit 1; \
+ fi; \
echo "" >> $${log}; \
- echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
- echo "============================" >> $${log}; \
- echo "Finished testing $${tname} $(TEST_FLAGS)"; \
- cat $${log}; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
+ echo "============================" | tee -a $${log}; \
+ else \
+ echo "Finished testing $${tname} $(TEST_FLAGS)" >> $${log}; \
+ echo "============================" >> $${log}; \
+ fi; \
+ if test -z "$(REALTIMEOUTPUT)"; then \
+ cat $${log}; \
+ fi; \
fi; \
fi