summaryrefslogtreecommitdiffstats
path: root/examples/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-12-20 19:33:57 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-12-20 19:33:57 (GMT)
commit50238cb285c37dc32029f1891f069fc76f5cbb07 (patch)
tree46cf6cea051e1d7e5a2b1e9170833f23cd19151b /examples/CMakeLists.txt
parent925f3c9b54368005da0129d5928142f04f53ef57 (diff)
downloadhdf5-50238cb285c37dc32029f1891f069fc76f5cbb07.zip
hdf5-50238cb285c37dc32029f1891f069fc76f5cbb07.tar.gz
hdf5-50238cb285c37dc32029f1891f069fc76f5cbb07.tar.bz2
Par example needs to link with mpi libs
Diffstat (limited to 'examples/CMakeLists.txt')
-rw-r--r--examples/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index d8eb1a2..04a99ce 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -63,13 +63,13 @@ if (H5_HAVE_PARALLEL)
add_executable (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
TARGET_NAMING (ph5example STATIC)
TARGET_C_PROPERTIES (ph5example STATIC " " " ")
- target_link_libraries (ph5example ${HDF5_LIB_TARGET})
+ target_link_libraries (ph5example ${HDF5_LIB_TARGET} ${MPI_C_LIBRARIES})
set_target_properties (ph5example PROPERTIES FOLDER examples)
if (BUILD_SHARED_LIBS)
add_executable (ph5example-shared ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c)
TARGET_NAMING (ph5example-shared SHARED)
TARGET_C_PROPERTIES (ph5example-shared SHARED " " " ")
- target_link_libraries (ph5example-shared ${HDF5_LIBSH_TARGET})
+ target_link_libraries (ph5example-shared ${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES})
set_target_properties (ph5example-shared PROPERTIES FOLDER examples)
endif ()
endif ()