Skip to content

Commit

Permalink
ENH: Various changes after merging new HDF5
Browse files Browse the repository at this point in the history
- Fixed various merge conflicts
- Had to add/remove a few files.
- Improved comments that specify ITK-specific changes
  • Loading branch information
seanm authored and hjmjohnson committed Jan 1, 2022
1 parent 621b4bd commit 4eafe84
Show file tree
Hide file tree
Showing 15 changed files with 126 additions and 514 deletions.
4 changes: 4 additions & 0 deletions Modules/ThirdParty/HDF5/src/itkhdf5/CMakeInstallation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ if (WIN32)
find_program (WIX_EXECUTABLE candle PATHS "${CPACK_WIX_ROOT}/bin")
endif ()

# ITK --start
if(0) # Skip for ITK internal build
# ITK --stop

#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
Expand Down Expand Up @@ -114,7 +116,9 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
COMPONENT configinstall
)
endif ()
# ITK --start
endif() # Skip for ITK internal build
# ITK --stop

#-----------------------------------------------------------------------------
# Configure the libhdf5.settings file for the lib info
Expand Down
5 changes: 1 addition & 4 deletions Modules/ThirdParty/HDF5/src/itkhdf5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -502,12 +502,10 @@ option (BUILD_STATIC_LIBS "Build Static Libraries" ON)
set (H5_ENABLE_STATIC_LIB NO)
option (BUILD_SHARED_LIBS "Build Shared Libraries" ON)
set (H5_ENABLE_SHARED_LIB NO)

# ITK --start
option (ONLY_SHARED_LIBS "Only Build Shared Libraries" ${BUILD_SHARED_LIBS})
#option (ONLY_SHARED_LIBS "Only Build Shared Libraries" OFF)
mark_as_advanced (ONLY_SHARED_LIBS)
# ITK --stop
mark_as_advanced (ONLY_SHARED_LIBS)

if (BUILD_STATIC_LIBS)
set (H5_ENABLE_STATIC_LIB YES)
Expand Down Expand Up @@ -1186,4 +1184,3 @@ option (HDF5_USE_PREGEN "Use pre-generated Files" OFF)
option (HDF5_BATCH_H5DETECT "Use a batch command for running h5detect" OFF)

include (CMakeInstallation.cmake)

56 changes: 56 additions & 0 deletions Modules/ThirdParty/HDF5/src/itkhdf5/CMakePlugins.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#
# Copyright by The HDF Group.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#

include (ExternalProject)
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO")
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)")
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
option (PLUGIN_USE_EXTERNAL "Use External Library Building for filter PLUGIN" 1)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
set (PLUGIN_URL ${PLUGIN_GIT_URL} CACHE STRING "Path to PLUGIN git repository")
set (PLUGIN_BRANCH ${PLUGIN_GIT_BRANCH})
elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
if (NOT TGZPATH)
set (TGZPATH ${HDF5_SOURCE_DIR})
endif ()
set (PLUGIN_URL ${TGZPATH}/${PLUGIN_TGZ_NAME})
if (NOT EXISTS "${PLUGIN_URL}")
set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE BOOL "" FORCE)
message (STATUS "Filter PLUGIN file ${PLUGIN_URL} not found")
endif ()
else ()
set (PLUGIN_USE_EXTERNAL 0)
endif ()
endif ()

#-----------------------------------------------------------------------------
# Option for PLUGIN support
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_PLUGIN_SUPPORT "Enable PLUGIN Filters" OFF)
if (HDF5_ENABLE_PLUGIN_SUPPORT)
if (NOT PLUGIN_USE_EXTERNAL)
find_package (PLUGIN NAMES ${PLUGIN_PACKAGE_NAME}${HDF_PACKAGE_EXT})
if (NOT PLUGIN_FOUND)
find_package (PLUGIN) # Legacy find
endif ()
endif ()
if (NOT PLUGIN_FOUND)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_PLUGIN_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
message (STATUS "Filter PLUGIN is built")
else ()
message (FATAL_ERROR " PLUGIN is Required for PLUGIN support in HDF5")
endif ()
endif ()
message (STATUS "Filter PLUGIN is ON")
endif ()
4 changes: 4 additions & 0 deletions Modules/ThirdParty/HDF5/src/itkhdf5/CTestConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@ set (UPDATE_TYPE git)
set (VALGRIND_COMMAND "/usr/bin/valgrind")
set (VALGRIND_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")

# ITK --start
if(FALSE) # ITK commented out
# ITK --stop
set (CTEST_TEST_TIMEOUT 1200 CACHE STRING
"Maximum time allowed before CTest will kill the test.")
set (DART_TESTING_TIMEOUT 1200 CACHE STRING
"Maximum time allowed before CTest will kill the test." FORCE)

set (CTEST_SUBMIT_RETRY_DELAY 20 CACHE STRING
"How long to wait between timed-out CTest submissions.")
# ITK --start
endif() # ITK commented out
# ITK --stop
9 changes: 6 additions & 3 deletions Modules/ThirdParty/HDF5/src/itkhdf5/c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ endif ()
#-----------------------------------------------------------------------------
# Build the CPP unit tests
#-----------------------------------------------------------------------------
#ITK REMOVED if (BUILD_TESTING)
#ITK REMOVED add_subdirectory (test)
#ITK REMOVEDendif ()
# ITK --start
# ITK removed
#if (BUILD_TESTING)
# add_subdirectory (test)
#endif ()
# ITK --stop
Loading

0 comments on commit 4eafe84

Please sign in to comment.