diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-11-02 18:46:13 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-11-02 18:46:13 (GMT) |
commit | c4b899a9ed617078e9a8f9a11a03e09d9eb02491 (patch) | |
tree | ac440dca0073e82add1a12fabfa34b35680bbd66 /fortran | |
parent | 54fd43fe1641687319f06b54affc9ae05f277a6a (diff) | |
download | hdf5-c4b899a9ed617078e9a8f9a11a03e09d9eb02491.zip hdf5-c4b899a9ed617078e9a8f9a11a03e09d9eb02491.tar.gz hdf5-c4b899a9ed617078e9a8f9a11a03e09d9eb02491.tar.bz2 |
HDFFV-10321 Merge from 1.8
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/CMakeLists.txt | 2 | ||||
-rw-r--r-- | fortran/examples/CMakeLists.txt | 2 | ||||
-rw-r--r-- | fortran/examples/CMakeTests.cmake | 6 | ||||
-rw-r--r-- | fortran/src/CMakeLists.txt | 8 | ||||
-rw-r--r-- | fortran/test/CMakeTests.cmake | 2 | ||||
-rw-r--r-- | fortran/testpar/CMakeLists.txt | 4 | ||||
-rw-r--r-- | fortran/testpar/CMakeTests.cmake | 4 |
7 files changed, 12 insertions, 16 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/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/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 689439c..9527bc0 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -291,9 +291,9 @@ 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} ${HDF5_F90_C_LIB_TARGET} ${HDF5_LIB_TARGET} ${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 +317,9 @@ 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} ${HDF5_F90_C_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${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/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/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}) |