-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Update VOL CMake for REST VOL #3450
Changes from 1 commit
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 |
---|---|---|
|
@@ -34,11 +34,31 @@ if (HDF5_VOL_ALLOW_EXTERNAL) | |
message (FATAL_ERROR "HDF5_ALLOW_EXTERNAL_SUPPORT must be set to 'GIT' to allow building of external HDF5 VOL connectors") | ||
endif () | ||
|
||
set (HDF5_LIB_TARGETS "") | ||
set (HDF5_HL_LIB_TARGETS "") | ||
|
||
if (BUILD_STATIC_LIBS) | ||
list(APPEND HDF5_LIB_TARGETS ${HDF5_LIB_TARGET}) | ||
list(APPEND HDF5_HL_LIB_TARGETS ${HDF5_HL_LIB_TARGET}) | ||
endif() | ||
|
||
if (BUILD_SHARED_LIBS) | ||
list(APPEND HDF5_LIB_TARGETS ${HDF5_LIBSH_TARGET}) | ||
list(APPEND HDF5_HL_LIB_TARGETS ${HDF5_HL_LIBSH_TARGET}) | ||
endif() | ||
|
||
# For compatibility, set some variables that projects would | ||
# typically look for after calling find_package(HDF5) | ||
set (HDF5_FOUND 1) | ||
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 is where these vars should have a prefix like the plugins. 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.
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 code is specifically removing the 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. Right. In plugins and others I do the same thing except with a prefix - of course it requires some control over the other package or we do this with zlib/szip - overwrite the CMakeLists.txt file that gets imported from the repo. See the config/cmake dirs LIBEAC and SZIP. 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. Here using a prefix would break the builds since we don't have any control over the external packages really and can't reliably predict what their CMake code would look like in order to try overwriting things to use a prefix. |
||
set (HDF5_LIBRARIES "${HDF5_LIBSH_TARGET};${LINK_LIBS};${LINK_COMP_LIBS};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>") | ||
set (HDF5_LIBRARIES "${HDF5_LIB_TARGETS};${LINK_LIBS};${LINK_COMP_LIBS};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPI::MPI_C>") | ||
set (HDF5_INCLUDE_DIRS "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") | ||
set (HDF5_DIR "${HDF5_SOURCE_DIR}") | ||
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. I believe 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 the VOLs actually use this HDF5_DIR variable - because I think it is only informational and shouldn't be used otherwise. 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. It was used in the 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.
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. If the VOL is built as a subdirectory under the HDF5 library, then I think it should inherit HDF5's CMake variables, including this one. 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. But it doesn't exist yet, until packaged? HDF5_DIR is NOT HDF5_SOURCE_DIR. Need to look at the CMake FindHDF5.cmake module file. 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. At least I think so. How does the VOL actually use that variable? 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 VOL uses I might be confused - I think |
||
|
||
set (HDF5_C_LIBRARIES "${HDF5_LIB_TARGETS}") | ||
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. Hmm, shouldn't this essentially be the same as 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. Fixed - this was initially to prevent spurious dependency creation in the REST VOL CMake, but I fixed that on the REST VOL's side. |
||
|
||
if (HDF5_BUILD_HL_LIB) | ||
set (HDF5_C_HL_LIBRARIES "${HDF5_HL_LIB_TARGETS}") | ||
endif() | ||
|
||
set (HDF5_MAX_EXTERNAL_VOLS 10) | ||
set (HDF5_EXTERNAL_VOL_TARGETS "") | ||
|
@@ -134,6 +154,8 @@ if (HDF5_VOL_ALLOW_EXTERNAL) | |
define_property ( | ||
TARGET | ||
PROPERTY HDF5_VOL_TARGETS | ||
BRIEF_DOCS "Generated targets of this connector" | ||
FULL_DOCS "Generated targets of this connector" | ||
) | ||
|
||
set_target_properties ( | ||
|
@@ -149,6 +171,7 @@ if (HDF5_VOL_ALLOW_EXTERNAL) | |
TARGET | ||
PROPERTY HDF5_VOL_NAME | ||
BRIEF_DOCS "VOL connector name to use for the HDF5_VOL_CONNECTOR environment variable when testing" | ||
FULL_DOCS "VOL connector name to use for the HDF5_VOL_CONNECTOR environment variable when testing" | ||
) | ||
|
||
set_target_properties ( | ||
|
@@ -164,6 +187,7 @@ if (HDF5_VOL_ALLOW_EXTERNAL) | |
TARGET | ||
PROPERTY HDF5_VOL_TEST_PARALLEL | ||
BRIEF_DOCS "Whether the VOL connector should be tested with the parallel API tests" | ||
FULL_DOCS "Whether the VOL connector should be tested with the parallel API tests" | ||
) | ||
|
||
set_target_properties ( | ||
|
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 both static and shared are enabled you will have all libraries in the link!
If VOL uses dynamic load function, then you can't use static HDF5 libs, anyway.
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.
Also, make sure these variables aren't used anywhere else, maybe?