Skip to content

Commit

Permalink
updated resetting status if cmake option fails
Browse files Browse the repository at this point in the history
  • Loading branch information
brtnfld committed Apr 2, 2024
1 parent c839151 commit 1b2604f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ if (HDF5_ENABLE_HDFS)
list (APPEND LINK_LIBS -pthread)
endif ()
else ()
set (HDF5_ENABLE_HDFS OFF CACHE BOOL "Enable HDFS" FORCE)
message (FATAL_ERROR "Set to use libhdfs library, but could not find or use libhdfs. Please verify that the path to HADOOP_HOME is valid, and/or reconfigure without HDF5_ENABLE_HDFS")
endif ()
endif ()
Expand Down Expand Up @@ -806,8 +807,12 @@ if (HDF5_ENABLE_SUBFILING_VFD)

unset (CMAKE_EXTRA_INCLUDE_FILES)
unset (CMAKE_REQUIRED_LIBRARIES)
if(NOT H5_HAVE_SUBFILING_VFD EQUAL 1)
set (HDF5_ENABLE_SUBFILING_VFD OFF CACHE BOOL "Build Parallel HDF5 Subfiling VFD" FORCE)
endif()
endif()


#option (DEFAULT_API_VERSION "Enable v1.16 API (v16, v18, v110, v112, v114, v116)" "v116")
set (DEFAULT_API_VERSION "v116" CACHE STRING "Enable v1.16 API (v16, v18, v110, v112, v114, v116)")
set_property (CACHE DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112 v114 v116)
Expand Down Expand Up @@ -940,6 +945,8 @@ endif ()
option (HDF5_ENABLE_MAP_API "Build the map API" OFF)
if (HDF5_ENABLE_MAP_API)
set (H5_HAVE_MAP_API 1)
else ()
set (HDF5_ENABLE_MAP_API OFF CACHE BOOL "Build the map API" FORCE)
endif ()

#-----------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions config/cmake/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,7 @@ if (HDF5_ENABLE_DIRECT_VFD)
if (HAVE_O_DIRECT AND HAVE_POSIX_MEMALIGN)
set (${HDF_PREFIX}_HAVE_DIRECT 1)
else ()
set (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE)
message (FATAL_ERROR "The direct VFD was requested but cannot be built.\nIt requires O_DIRECT flag support and posix_memalign()")
endif ()
endif ()
Expand All @@ -629,6 +630,7 @@ option (HDF5_ENABLE_ROS3_VFD "Build the ROS3 Virtual File Driver" OFF)
list (APPEND LINK_LIBS ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES})
INCLUDE_DIRECTORIES (${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR})
else ()
set (HDF5_ENABLE_ROS3_VFD OFF CACHE BOOL "Build the ROS3 Virtual File Driver" FORCE)
message (WARNING "The Read-Only S3 VFD was requested but cannot be built.\nPlease check that openssl and cURL are available on your\nsystem, and/or re-configure without option HDF5_ENABLE_ROS3_VFD.")
endif ()
endif ()
Expand All @@ -645,6 +647,7 @@ if (HDF5_ENABLE_MIRROR_VFD)
${HDF_PREFIX}_HAVE_FORK)
set (${HDF_PREFIX}_HAVE_MIRROR_VFD 1)
else()
set (HDF5_ENABLE_MIRROR_VFD OFF CACHE BOOL "Build the Mirror Virtual File Driver" FORCE)
message(WARNING "The socket-based Mirror VFD was requested but cannot be built. System prerequisites are not met.")
endif()
endif()
Expand Down

0 comments on commit 1b2604f

Please sign in to comment.