Skip to content
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

Report build options of VFDs #4304

Merged
merged 7 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,7 @@ set (CMAKE_MODULE_PATH ${HDF_RESOURCES_DIR} ${CMAKE_MODULE_PATH})
# Option to Enable HDFS
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_HDFS "Enable HDFS" OFF)
set(H5_HAVE_LIBHDFS_SETTING OFF)
brtnfld marked this conversation as resolved.
Show resolved Hide resolved
if (HDF5_ENABLE_HDFS)
find_package(JNI REQUIRED)
if (JNI_FOUND)
Expand All @@ -674,6 +675,7 @@ if (HDF5_ENABLE_HDFS)
find_package(HDFS REQUIRED)
if (HDFS_FOUND)
set (H5_HAVE_LIBHDFS 1)
set (H5_HAVE_LIBHDFS_SETTING ON)
set (H5_HAVE_HDFS_H 1)
if (NOT MSVC)
list (APPEND LINK_LIBS -pthread)
Expand Down Expand Up @@ -748,6 +750,7 @@ set (HDF5_SRC_INCLUDE_DIRS
${H5FD_SUBFILING_DIR}
)
option (HDF5_ENABLE_SUBFILING_VFD "Build Parallel HDF5 Subfiling VFD" OFF)
set (H5_HAVE_SUBFILING_VFD_SETTING OFF)
if (HDF5_ENABLE_SUBFILING_VFD)
if (WIN32)
message (FATAL_ERROR " **** Subfiling is not supported on Windows **** ")
Expand Down Expand Up @@ -781,6 +784,7 @@ if (HDF5_ENABLE_SUBFILING_VFD)
endif()

set (H5_HAVE_SUBFILING_VFD 1)
set (H5_HAVE_SUBFILING_VFD_SETTING ON)
# IOC VFD is currently only built when subfiling is enabled
set (H5_HAVE_IOC_VFD 1)

Expand Down
8 changes: 7 additions & 1 deletion config/cmake/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ unset (CMAKE_EXTRA_INCLUDE_FILES)
# Check whether we can build the direct VFD
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_DIRECT_VFD "Build the Direct I/O Virtual File Driver" OFF)
set (HDF5_ENABLE_DIRECT_VFD_SETTING OFF)
if (HDF5_ENABLE_DIRECT_VFD)
# The direct VFD is tied to POSIX direct I/O as enabled by the O_DIRECT
# flag. No other form of direct I/O is supported. This feature also
Expand All @@ -612,6 +613,7 @@ if (HDF5_ENABLE_DIRECT_VFD)

if (HAVE_O_DIRECT AND HAVE_POSIX_MEMALIGN)
set (${HDF_PREFIX}_HAVE_DIRECT 1)
set (HDF5_ENABLE_DIRECT_VFD_SETTING ON)
else ()
message (FATAL_ERROR "The direct VFD was requested but cannot be built.\nIt requires O_DIRECT flag support and posix_memalign()")
endif ()
Expand All @@ -621,11 +623,13 @@ endif ()
# Check if ROS3 driver can be built
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_ROS3_VFD "Build the ROS3 Virtual File Driver" OFF)
set (H5_ENABLE_ROS3_VFD_SETTING OFF)
if (HDF5_ENABLE_ROS3_VFD)
find_package(CURL REQUIRED)
find_package(OpenSSL REQUIRED)
if (${CURL_FOUND} AND ${OPENSSL_FOUND})
set (${HDF_PREFIX}_HAVE_ROS3_VFD 1)
set (H5_ENABLE_ROS3_VFD_SETTING ON)
list (APPEND LINK_LIBS ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES})
INCLUDE_DIRECTORIES (${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR})
else ()
Expand All @@ -637,15 +641,17 @@ endif ()
# Check whether we can build the mirror VFD
# ----------------------------------------------------------------------
option (HDF5_ENABLE_MIRROR_VFD "Build the Mirror Virtual File Driver" OFF)
set (${HDF_PREFIX}_HAVE_MIRROR_VFD_SETTING OFF)
if (HDF5_ENABLE_MIRROR_VFD)
if ( ${HDF_PREFIX}_HAVE_NETINET_IN_H AND
${HDF_PREFIX}_HAVE_NETDB_H AND
${HDF_PREFIX}_HAVE_ARPA_INET_H AND
${HDF_PREFIX}_HAVE_SYS_SOCKET_H AND
${HDF_PREFIX}_HAVE_FORK)
set (${HDF_PREFIX}_HAVE_MIRROR_VFD 1)
set (${HDF_PREFIX}_HAVE_MIRROR_VFD_SETTING ON)
else()
message(WARNING "The socket-based Mirror VFD was requested but cannot be built. System prerequisites are not met.")
message(WARNING "The socket-based Mirror VFD was requested but cannot be built. System prerequisites are not met.")
endif()
endif()

Expand Down
10 changes: 5 additions & 5 deletions config/cmake/libhdf5.settings.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ Dimension scales w/ new references: @DIMENSION_SCALES_WITH_NEW_REF@
I/O filters (external): @EXTERNAL_FILTERS@
_Float16 support: @HDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16@
Map (H5M) API: @H5_HAVE_MAP_API@
Direct VFD: @HDF5_ENABLE_DIRECT_VFD@
Mirror VFD: @H5_HAVE_MIRROR_VFD@
Subfiling VFD: @H5_HAVE_SUBFILING_VFD@
(Read-Only) S3 VFD: @H5_HAVE_ROS3_VFD@
(Read-Only) HDFS VFD: @H5_HAVE_LIBHDFS@
Direct VFD: @HDF5_ENABLE_DIRECT_VFD_SETTING@
Mirror VFD: @H5_HAVE_MIRROR_VFD_SETTING@
Subfiling VFD: @H5_HAVE_SUBFILING_VFD_SETTING@
(Read-Only) S3 VFD: @H5_ENABLE_ROS3_VFD_SETTING@
(Read-Only) HDFS VFD: @H5_HAVE_LIBHDFS_SETTING@
Packages w/ extra debug output: @INTERNAL_DEBUG_OUTPUT@
API Tracing: @HDF5_ENABLE_TRACE@
Using memory checker: @HDF5_ENABLE_USING_MEMCHECKER@
Expand Down
Loading