Skip to content

Commit 4623373

Browse files
committed
build_hdf5: parallel options
1 parent f118886 commit 4623373

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

cmake/build_hdf5.cmake

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ ${zlib_root}
5151
-DHDF5_BUILD_CPP_LIB:BOOL=false
5252
-DBUILD_TESTING:BOOL=false
5353
-DHDF5_BUILD_EXAMPLES:BOOL=false
54-
-DUSE_LIBAEC:bool=true)
54+
-DUSE_LIBAEC:bool=true
55+
)
5556

5657
if(hdf5_parallel)
5758
find_package(MPI REQUIRED COMPONENTS C)
@@ -93,11 +94,8 @@ add_dependencies(HDF5::HDF5 HDF5)
9394

9495
target_link_libraries(HDF5::HDF5 INTERFACE ZLIB::ZLIB)
9596

96-
set(THREADS_PREFER_PTHREAD_FLAG true)
9797
find_package(Threads)
98-
if(Threads_FOUND)
99-
target_link_libraries(HDF5::HDF5 INTERFACE Threads::Threads)
100-
endif(Threads_FOUND)
98+
target_link_libraries(HDF5::HDF5 INTERFACE ${CMAKE_THREAD_LIBS_INIT})
10199

102100
# libdl and libm are needed on some systems--don't remove
103101
target_link_libraries(HDF5::HDF5 INTERFACE ${CMAKE_DL_LIBS})

0 commit comments

Comments
 (0)