-
-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add THREADS check to configuration file #4746
Changes from 3 commits
d4da16a
c5c2807
8e6764e
c3dc085
771a1aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,7 +92,7 @@ if (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL) | |
find_package(MPI QUIET REQUIRED) | ||
endif () | ||
|
||
if (${HDF5_PACKAGE_NAME}_ENABLE_THREADSAFE OR ${HDF5_PACKAGE_NAME}_ENABLE_SUBFILING_VFD) | ||
if (${HDF5_PACKAGE_NAME}_ENABLE_THREADSAFE OR ${HDF5_PACKAGE_NAME}_ENABLE_THREADS OR ${HDF5_PACKAGE_NAME}_ENABLE_SUBFILING_VFD) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "${HDF5_PACKAGE_NAME}_ENABLE_THREADSAFE" and "${HDF5_PACKAGE_NAME}_ENABLE_SUBFILING_VFD)" components are no longer correct and should be removed. (Leaving just ${HDF5_PACKAGE_NAME}_ENABLE_THREADS) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are they no longer correct, if they are set in the library? This file is the status of the options used to build the library. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you mean that since they require threads that is why we only need to check threads? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This check is only about threads, not threadsafety or subfiling. |
||
set(THREADS_PREFER_PTHREAD_FLAG ON) | ||
find_package(Threads QUIET REQUIRED) | ||
endif () | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This piece seems wrong, as it's eliminating all the macros that were previously set that show what kind of threads are found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No that section is not needed for Examples. These changes only affect the Examples when using the library binary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I see.
Then this entire section of the CMake file should be removed, since the examples don't use threading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Until we add examples that test such feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the library requires the THREADS library it still needs to be checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Applications that link to a threadsafe version of HDF5 don't need to make this check in their CMake builds, correct?