summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/CMakeLists.txt2
-rw-r--r--fortran/Makefile.in1
-rw-r--r--fortran/examples/CMakeLists.txt2
-rw-r--r--fortran/examples/CMakeTests.cmake6
-rw-r--r--fortran/examples/Makefile.am4
-rw-r--r--fortran/examples/Makefile.in5
-rw-r--r--fortran/src/CMakeLists.txt14
-rw-r--r--fortran/src/Makefile.in15
-rw-r--r--fortran/src/h5fc.in2
-rw-r--r--fortran/test/CMakeTests.cmake2
-rw-r--r--fortran/test/Makefile.in1
-rw-r--r--fortran/testpar/CMakeLists.txt4
-rw-r--r--fortran/testpar/CMakeTests.cmake4
-rw-r--r--fortran/testpar/Makefile.in1
14 files changed, 33 insertions, 30 deletions
diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt
index f7179cf..075e1da 100644
--- a/fortran/CMakeLists.txt
+++ b/fortran/CMakeLists.txt
@@ -2,8 +2,6 @@ cmake_minimum_required (VERSION 3.2.2)
PROJECT (HDF5_F90 C CXX Fortran)
if (H5_HAVE_PARALLEL)
- INCLUDE (FindMPI)
- set (LINK_LIBS ${LINK_LIBS} ${MPI_Fortran_LIBRARIES})
if (MPI_Fortran_LINK_FLAGS)
set (CMAKE_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
endif ()
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index 49c0172..d46c86d 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -587,6 +587,7 @@ dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
+fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 6030f83..cd5da0e 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -109,7 +109,6 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
target_link_libraries (f90_ex_ph5example
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
- ${MPI_Fortran_LIBRARIES}
)
target_include_directories (f90_ex_ph5example PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
set_target_properties (f90_ex_ph5example PROPERTIES
@@ -124,7 +123,6 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
target_link_libraries (f90_ex_ph5example-shared
${HDF5_F90_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
- ${MPI_Fortran_LIBRARIES}
)
target_include_directories (f90_ex_ph5example-shared PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
set_target_properties (f90_ex_ph5example-shared PROPERTIES
diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake
index 31dc836..af6b994 100644
--- a/fortran/examples/CMakeTests.cmake
+++ b/fortran/examples/CMakeTests.cmake
@@ -8,7 +8,7 @@
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
-
+#
##############################################################################
##############################################################################
@@ -149,8 +149,8 @@ if (HDF5_ENABLE_F2003)
endif ()
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- add_test (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>)
+ add_test (NAME f90_ex_ph5example COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:f90_ex_ph5example> ${MPIEXEC_POSTFLAGS})
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
- add_test (NAME f90_ex-shared_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>)
+ add_test (NAME f90_ex-shared_ph5example COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:f90_ex_ph5example> ${MPIEXEC_POSTFLAGS})
endif ()
endif ()
diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am
index 3428a9e..d78cbb3 100644
--- a/fortran/examples/Makefile.am
+++ b/fortran/examples/Makefile.am
@@ -68,10 +68,10 @@ h5_crtatt.chkexe_: h5_rdwt.chkexe_
# Additional dependencies for the examples are listed below
if BUILD_PARALLEL_CONDITIONAL
$(EXTRA_PROG): $(H5FC_PP)
- $(H5FC_PP) $(H5CCFLAGS) $(FCFLAGS) -o $@ $(srcdir)/$@.f90;
+ $(H5FC_PP) $(H5CCFLAGS) -o $@ $(srcdir)/$@.f90;
else
$(EXTRA_PROG): $(H5FC)
- $(H5FC) $(H5CCFLAGS) $(FCFLAGS) -o $@ $(srcdir)/$@.f90;
+ $(H5FC) $(H5CCFLAGS) -o $@ $(srcdir)/$@.f90;
endif
# Tell automake how to install examples
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index 30f8755..208bd44 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -538,6 +538,7 @@ dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
+fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -1052,9 +1053,9 @@ h5_crtatt.chkexe_: h5_rdwt.chkexe_
# Tell automake how to build examples using h5fc
# Additional dependencies for the examples are listed below
@BUILD_PARALLEL_CONDITIONAL_TRUE@$(EXTRA_PROG): $(H5FC_PP)
-@BUILD_PARALLEL_CONDITIONAL_TRUE@ $(H5FC_PP) $(H5CCFLAGS) $(FCFLAGS) -o $@ $(srcdir)/$@.f90;
+@BUILD_PARALLEL_CONDITIONAL_TRUE@ $(H5FC_PP) $(H5CCFLAGS) -o $@ $(srcdir)/$@.f90;
@BUILD_PARALLEL_CONDITIONAL_FALSE@$(EXTRA_PROG): $(H5FC)
-@BUILD_PARALLEL_CONDITIONAL_FALSE@ $(H5FC) $(H5CCFLAGS) $(FCFLAGS) -o $@ $(srcdir)/$@.f90;
+@BUILD_PARALLEL_CONDITIONAL_FALSE@ $(H5FC) $(H5CCFLAGS) -o $@ $(srcdir)/$@.f90;
# List dependencies for each example. Normally, automake would take
# care of this for us, but if we tell automake about the programs it
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 689439c..89fc1a5 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -184,7 +184,7 @@ set (f90CStub_C_HDRS
add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SRCS} ${f90CStub_C_HDRS})
TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS})
+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)
set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES
@@ -197,7 +197,7 @@ 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})
TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ")
- target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_SHARED_LIBS})
+ 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})
set_target_properties (${HDF5_F90_C_LIBSH_TARGET} PROPERTIES
@@ -291,9 +291,10 @@ set_source_files_properties (${f90_F_SRCS} PROPERTIES LANGUAGE Fortran)
add_library (${HDF5_F90_LIB_TARGET} STATIC ${f90_F_SRCS})
set (SHARED_LINK_FLAGS " ")
TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_F90_LIB_TARGET} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET})
+target_link_libraries (${HDF5_F90_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET})
+target_link_libraries (${HDF5_F90_LIB_TARGET} PRIVATE ${LINK_Fortran_LIBS})
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- target_link_libraries (${HDF5_F90_LIB_TARGET} ${MPI_Fortran_LIBRARIES})
+ 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)
@@ -317,9 +318,10 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def")
endif ()
TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS})
- target_link_libraries (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_link_libraries (${HDF5_F90_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET})
+ target_link_libraries (${HDF5_F90_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS})
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- target_link_libraries (${HDF5_F90_LIBSH_TARGET} ${MPI_Fortran_LIBRARIES})
+ 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})
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index c896ea0..a182618 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -647,6 +647,7 @@ dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
+fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -734,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 = 0
+LT_VERS_REVISION = 1
LT_VERS_AGE = 3
-LT_CXX_VERS_INTERFACE = 14
+LT_CXX_VERS_INTERFACE = 15
LT_CXX_VERS_REVISION = 0
LT_CXX_VERS_AGE = 0
LT_F_VERS_INTERFACE = 10
-LT_F_VERS_REVISION = 4
+LT_F_VERS_REVISION = 5
LT_F_VERS_AGE = 0
LT_HL_VERS_INTERFACE = 12
-LT_HL_VERS_REVISION = 0
+LT_HL_VERS_REVISION = 1
LT_HL_VERS_AGE = 2
LT_HL_CXX_VERS_INTERFACE = 12
-LT_HL_CXX_VERS_REVISION = 0
+LT_HL_CXX_VERS_REVISION = 1
LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 10
-LT_HL_F_VERS_REVISION = 3
+LT_HL_F_VERS_REVISION = 4
LT_HL_F_VERS_AGE = 0
LT_TOOLS_VERS_INTERFACE = 10
-LT_TOOLS_VERS_REVISION = 5
+LT_TOOLS_VERS_REVISION = 6
LT_TOOLS_VERS_AGE = 0
AM_FCLIBS = $(LIBHDF5)
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index 47642c9..29ef83f 100644
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -307,7 +307,7 @@ if test "x$do_link" = "xyes"; then
link_args="$link_args -L${libdir}"
case "$host_os" in
- linux*) flag="-Wl,-rpath -Wl," ;;
+ linux*) flag="@fortran_linux_linker_option@-rpath -Wl," ;;
hpux*) flag="-Wl,+b -Wl," ;;
freebsd*|solaris*) flag="-R" ;;
rs6000*|aix*) flag="-L" ;;
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
index c363b04..e4d8cc1 100644
--- a/fortran/test/CMakeTests.cmake
+++ b/fortran/test/CMakeTests.cmake
@@ -8,7 +8,7 @@
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
-
+#
##############################################################################
##############################################################################
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index df8f9e4..4764b8f 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -655,6 +655,7 @@ dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
+fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index 909cbaf..4aa7f43 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -4,7 +4,7 @@ PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
-INCLUDE_DIRECTORIES (${MPI_Fortran_INCLUDE_PATH} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
+set (TESTPAR_INCLUDES ${MPI_Fortran_INCLUDE_DIRS} ${CMAKE_Fortran_MODULE_DIRECTORY}/static ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
#-----------------------------------------------------------------------------
# Add Tests
@@ -27,7 +27,7 @@ target_link_libraries (parallel_test
if (WIN32 AND MSVC)
target_link_libraries (parallel_test "ws2_32.lib")
endif ()
-target_include_directories (parallel_test PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+target_include_directories (parallel_test PRIVATE ${TESTPAR_INCLUDES})
set_target_properties (parallel_test PROPERTIES LINKER_LANGUAGE Fortran)
set_target_properties (parallel_test PROPERTIES FOLDER test/fortran)
diff --git a/fortran/testpar/CMakeTests.cmake b/fortran/testpar/CMakeTests.cmake
index 70ce541..d00a6fc 100644
--- a/fortran/testpar/CMakeTests.cmake
+++ b/fortran/testpar/CMakeTests.cmake
@@ -8,11 +8,11 @@
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
-
+#
##############################################################################
##############################################################################
### T E S T I N G ###
##############################################################################
##############################################################################
-add_test (NAME FORT_parallel_test COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:parallel_test>)
+add_test (NAME FORT_parallel_test COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:parallel_test> ${MPIEXEC_POSTFLAGS})
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index c23b730..f318ce6 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -583,6 +583,7 @@ dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
exec_prefix = @exec_prefix@
+fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@