diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-12-20 23:00:24 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-12-28 22:30:51 (GMT) |
commit | 732074d47e02c2e01fe794351c681d64b93a5f47 (patch) | |
tree | 116a4a4bdca56dd8b6c8094f5004bb2579763f46 /testpar | |
parent | 08f7c97077585f9a9c36dc9c6f976e53fafdc690 (diff) | |
download | hdf5-732074d47e02c2e01fe794351c681d64b93a5f47.zip hdf5-732074d47e02c2e01fe794351c681d64b93a5f47.tar.gz hdf5-732074d47e02c2e01fe794351c681d64b93a5f47.tar.bz2 |
Add library INTERFACE and MPI to tools
Diffstat (limited to 'testpar')
-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 b116d66..997d1a1 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -30,14 +30,20 @@ set (testphdf5_SOURCES add_executable (testphdf5 ${testphdf5_SOURCES}) 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) |