diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-12-21 20:41:48 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-12-21 20:41:48 (GMT) |
commit | ef2ac0784508083ac057586feb6ad9bbdd98e5bd (patch) | |
tree | 3083ec710691b9353e9aee5e2ad7095ca8701890 /testpar/CMakeLists.txt | |
parent | 68c9914f9b5501cc8470775e689cb2c2c64fe912 (diff) | |
download | hdf5-ef2ac0784508083ac057586feb6ad9bbdd98e5bd.zip hdf5-ef2ac0784508083ac057586feb6ad9bbdd98e5bd.tar.gz hdf5-ef2ac0784508083ac057586feb6ad9bbdd98e5bd.tar.bz2 |
Update link target commands
Diffstat (limited to 'testpar/CMakeLists.txt')
-rw-r--r-- | testpar/CMakeLists.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index 0be5961..1043cd6 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -29,14 +29,20 @@ set (testphdf5_SRCS add_executable (testphdf5 ${testphdf5_SRCS}) TARGET_NAMING (testphdf5 STATIC) TARGET_C_PROPERTIES (testphdf5 STATIC " " " ") -target_link_libraries (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) +target_link_libraries (testphdf5 ${HDF5_TEST_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) +if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) + target_link_libraries (testphdf5 PRIVATE ${MPI_C_LIBRARIES}) +endif () set_target_properties (testphdf5 PROPERTIES FOLDER test/par) MACRO (ADD_H5P_EXE file) add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c) TARGET_NAMING (${file} STATIC) TARGET_C_PROPERTIES (${file} STATIC " " " ") - target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) + target_link_libraries (${file} ${HDF5_TEST_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET}) + if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND) + target_link_libraries (${file} PRIVATE ${MPI_C_LIBRARIES}) + endif () set_target_properties (${file} PROPERTIES FOLDER test/par) ENDMACRO (ADD_H5P_EXE file) |