diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-11-01 18:41:44 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-11-01 18:41:44 (GMT) |
commit | f8fd6d0b41a242aae93689e1477478bc78bae471 (patch) | |
tree | d85ec9fabc353b7b401f48216000cbc37b7835f6 /src | |
parent | 930cfc402dc2f17b1dbe9a6b3c5e15b95cc4c7ea (diff) | |
download | hdf5-f8fd6d0b41a242aae93689e1477478bc78bae471.zip hdf5-f8fd6d0b41a242aae93689e1477478bc78bae471.tar.gz hdf5-f8fd6d0b41a242aae93689e1477478bc78bae471.tar.bz2 |
Correct usage of MPI vars
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1651b15..4be86a9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -881,13 +881,12 @@ set (gen_SRCS ${HDF5_BINARY_DIR}/H5Tinit.c ${HDF5_BINARY_DIR}/H5lib_settings.c) add_library (${HDF5_LIB_TARGET} STATIC ${common_SRCS} ${gen_SRCS} ${H5_PUBLIC_HEADERS} ${H5_PRIVATE_HEADERS} ${H5_GENERATED_HEADERS}) TARGET_C_PROPERTIES (${HDF5_LIB_TARGET} STATIC " " " ") -target_link_libraries (${HDF5_LIB_TARGET} PRIVATE ${LINK_LIBS}) +target_link_libraries (${HDF5_LIB_TARGET} PUBLIC ${LINK_LIBS}) if (NOT WIN32) - target_link_libraries (${HDF5_LIB_TARGET} PRIVATE dl) + target_link_libraries (${HDF5_LIB_TARGET} PUBLIC dl) endif () if (H5_HAVE_PARALLEL AND MPI_C_FOUND) - target_include_directories (${HDF5_LIB_TARGET} PRIVATE ${MPI_C_INCLUDE_PATH}) - target_link_libraries (${HDF5_LIB_TARGET} PRIVATE MPI::MPI_C}) + target_include_directories (${HDF5_LIB_TARGET} PUBLIC ${MPI_C_INCLUDE_DIRS}) endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT ${HDF5_LIB_TARGET}) H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} STATIC) @@ -931,8 +930,7 @@ if (BUILD_SHARED_LIBS) target_link_libraries (${HDF5_LIBSH_TARGET} PUBLIC dl) endif () if (H5_HAVE_PARALLEL AND MPI_C_FOUND) - target_include_directories (${HDF5_LIBSH_TARGET} PRIVATE ${MPI_C_INCLUDE_PATH}) - target_link_libraries (${HDF5_LIBSH_TARGET} PRIVATE MPI::MPI_C) + target_include_directories (${HDF5_LIBSH_TARGET} PUBLIC ${MPI_C_INCLUDE_DIRS}) endif () set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_LIBSH_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_LIBSH_TARGET} ${HDF5_LIB_NAME} SHARED ${HDF5_PACKAGE_SOVERSION}) |