Skip to content

Commit

Permalink
BUG: hdf5: mark more cache variables as internal
Browse files Browse the repository at this point in the history
Hide additional HDF5 cmake variables by marking them as internal and
prevent deeper CMake files from force setting otherwise.
  • Loading branch information
blowekamp authored and hjmjohnson committed Dec 19, 2024
1 parent 60c3ae5 commit 29b5858
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Modules/ThirdParty/HDF5/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,19 @@ set (HDF5_ENABLE_MAP_API OFF CACHE INTERNAL "Build the map API")
set (HDF5_ENABLE_WARNINGS_AS_ERRORS OFF CACHE INTERNAL "Interpret some warnings as errors")
set (HDF5_MINGW_STATIC_GCC_LIBS OFF CACHE INTERNAL "")
set (HDF5_MSVC_NAMING_CONVENTION OFF CACHE INTERNAL "Use MSVC Naming conventions for Shared Libraries")
set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE INTERNAL "Enable PLUGIN Filters")
set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE INTERNAL "Enable PLUGIN Filters")

set (HDF5_BUILD_STATIC_TOOLS OFF CACHE INTERNAL "Build Static Tools NOT Shared Tools")
set (HDF5_ENABLE_MAP_API OFF CACHE INTERNAL "Build the map API")
set (HDF5_ENABLE_NONSTANDARD_FEATURES ON CACHE INTERNAL "Enable support for non-standard programming language features")
set (HDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16 ON CACHE INTERNAL "Enable support for _Float16 C datatype")
set (HDF5_ENABLE_SUBFILING_VFD OFF CACHE INTERNAL "Build Parallel HDF5 Subfiling VFD")
set (HDF5_USE_LIBAEC_STATIC OFF CACHE INTERNAL "Use static AEC library" )
set (HDF5_USE_ZLIB_NG OFF CACHE INTERNAL "Use zlib-ng library as zlib library" )
set (HDF5_USE_ZLIB_STATIC OFF CACHE INTERNAL "Find static zlib library" )
set (ALLOW_UNSUPPORTED OFF CACHE INTERNAL "Allow unsupported combinations of configure options")
set (HDF5_ENABLE_HDFS OFF CACHE INTERNAL "Enable HDFS")
set (HDF5_ENABLE_ROS3_VFD OFF CACHE INTERNAL "Build the ROS3 Virtual File Driver")
set (DEFAULT_API_VERSION "v114" CACHE INTERNAL "Enable v1.14 API (v16, v18, v110, v112, v114)")


if (NOT BUILD_SHARED_LIBS)
Expand Down
4 changes: 4 additions & 0 deletions Modules/ThirdParty/HDF5/src/itkhdf5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,12 @@ if (ONLY_SHARED_LIBS)
set (HDF5_BUILD_STATIC_TOOLS OFF CACHE BOOL "Build Static Tools NOT Shared Tools" FORCE)
endif ()

#[[ ITK --start
if (NOT BUILD_SHARED_LIBS AND NOT HDF5_BUILD_STATIC_TOOLS)
message (VERBOSE "Cannot build shared tools without shared libraries. Building static tools.")
set (HDF5_BUILD_STATIC_TOOLS ON CACHE BOOL "Build Static Tools NOT Shared Tools" FORCE)
endif ()
# ITK --end ]]

if (BUILD_STATIC_LIBS)
set (H5_ENABLE_STATIC_LIB YES)
Expand Down Expand Up @@ -977,7 +979,9 @@ option (HDF5_ENABLE_MAP_API "Build the map API" OFF)
if (HDF5_ENABLE_MAP_API)
set (H5_HAVE_MAP_API 1)
else ()
#[[ ITK --start
set (HDF5_ENABLE_MAP_API OFF CACHE BOOL "Build the map API" FORCE)
# ITK --end ]]
endif ()

#-----------------------------------------------------------------------------
Expand Down

0 comments on commit 29b5858

Please sign in to comment.