summaryrefslogtreecommitdiffstats
path: root/fortran/examples
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-06-06 18:44:56 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-06-06 18:44:56 (GMT)
commitdf64de9eedea0cb7796f37f9c141d81c636742c7 (patch)
treecb7cad59009a443131d8f5eaa02e431bdc1b5c73 /fortran/examples
parenta55e79b07d421cb177dce4ae722a1a5f32de6239 (diff)
downloadhdf5-df64de9eedea0cb7796f37f9c141d81c636742c7.zip
hdf5-df64de9eedea0cb7796f37f9c141d81c636742c7.tar.gz
hdf5-df64de9eedea0cb7796f37f9c141d81c636742c7.tar.bz2
Add fortran MPI to test and example
Diffstat (limited to 'fortran/examples')
-rw-r--r--fortran/examples/CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index 68b817e..0c570c6 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -155,7 +155,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
target_include_directories (f90_ex_ph5example
PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
)
target_compile_options(f90_ex_ph5example
PRIVATE
@@ -164,6 +164,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
target_link_libraries (f90_ex_ph5example
PRIVATE
${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET}
+ $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
)
# set_property(TARGET f90_ex_ph5example APPEND PROPERTY
# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
@@ -183,7 +184,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_executable (f90_ex_ph5example-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
target_include_directories (f90_ex_ph5example-shared
PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
)
target_compile_options(f90_ex_ph5example-shared
PRIVATE
@@ -192,6 +193,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
target_link_libraries (f90_ex_ph5example-shared
PRIVATE
${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}
+ $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
)
# set_property(TARGET f90_ex_ph5example-shared APPEND PROPERTY
# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">