From 1706712515205e21b92908bdbdf2325f6a69366e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 17 Aug 2023 11:47:32 -0500 Subject: [PATCH 1/3] Update presets, examples uncompress, szip cache --- CMakeInstallation.cmake | 40 +++++++++++++----------- CMakePresets.json | 12 ++++--- config/cmake-presets/hidden-presets.json | 2 -- config/cmake/cacheinit.cmake | 4 +++ config/cmake/scripts/HDF5options.cmake | 4 +-- release_docs/INSTALL_CMake.txt | 2 +- 6 files changed, 37 insertions(+), 27 deletions(-) diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index cc7d219fa8c..c7b6a1f6a26 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -154,13 +154,20 @@ if (HDF5_PACK_EXAMPLES) option (EXAMPLES_USE_RELEASE_NAME "Use the released examples artifact name" OFF) option (EXAMPLES_DOWNLOAD "Download to use released examples files" OFF) if (EXAMPLES_DOWNLOAD) + if (EXAMPLES_USE_RELEASE_NAME) + set (EXAMPLES_NAME ${EXAMPLES_TGZ_ORIGNAME}) + else () + set (EXAMPLES_NAME ${HDF5_EXAMPLES_COMPRESSED}) + endif () if (NOT EXAMPLES_USE_LOCALCONTENT) - set (EXAMPLES_URL ${EXAMPLES_TGZ_ORIGPATH}/${EXAMPLES_TGZ_ORIGNAME}) + set (EXAMPLES_URL ${EXAMPLES_TGZ_ORIGPATH}/${EXAMPLES_NAME}) + file (DOWNLOAD ${EXAMPLES_URL} ${HDF5_BINARY_DIR}/${HDF5_EXAMPLES_COMPRESSED} STATUS EX_DL) + message (STATUS "Examples file is ${EXAMPLES_URL} STATUS=${EX_DL}") else () - set (EXAMPLES_URL ${TGZPATH}/${EXAMPLES_TGZ_ORIGNAME}) + set (EXAMPLES_URL ${TGZPATH}/${EXAMPLES_NAME}) + file (COPY_FILE ${EXAMPLES_URL} ${HDF5_BINARY_DIR}/${HDF5_EXAMPLES_COMPRESSED} RESULT EX_DL) + message (STATUS "Examples file is ${EXAMPLES_URL} RESULT=${EX_DL}") endif () - message (VERBOSE "Examples file is ${EXAMPLES_URL}") - file (DOWNLOAD ${EXAMPLES_URL} ${HDF5_BINARY_DIR}/${HDF5_EXAMPLES_COMPRESSED}) if (EXISTS "${HDF5_BINARY_DIR}/${HDF5_EXAMPLES_COMPRESSED}") execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf ${HDF5_EXAMPLES_COMPRESSED} @@ -168,7 +175,6 @@ if (HDF5_PACK_EXAMPLES) COMMAND_ECHO STDOUT ) endif () - set (EXAMPLES_USE_RELEASE_NAME ON CACHE BOOL "" FORCE) else () if (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}") execute_process( @@ -178,20 +184,18 @@ if (HDF5_PACK_EXAMPLES) ) endif () endif () - if (EXAMPLES_USE_RELEASE_NAME) - get_filename_component (EX_LAST_EXT ${HDF5_EXAMPLES_COMPRESSED} LAST_EXT) - if (${EX_LAST_EXT} STREQUAL ".zip") - get_filename_component (EX_DIR_NAME ${HDF5_EXAMPLES_COMPRESSED} NAME_WLE) - else () - get_filename_component (EX_DIR_NAME ${HDF5_EXAMPLES_COMPRESSED} NAME_WLE) - get_filename_component (EX_DIR_NAME ${EX_DIR_NAME} NAME_WLE) - endif () - execute_process( - COMMAND ${CMAKE_COMMAND} -E rename ${EX_DIR_NAME} HDF5Examples - WORKING_DIRECTORY ${HDF5_BINARY_DIR} - COMMAND_ECHO STDOUT - ) + get_filename_component (EX_LAST_EXT ${HDF5_EXAMPLES_COMPRESSED} LAST_EXT) + if (${EX_LAST_EXT} STREQUAL ".zip") + get_filename_component (EX_DIR_NAME ${HDF5_EXAMPLES_COMPRESSED} NAME_WLE) + else () + get_filename_component (EX_DIR_NAME ${HDF5_EXAMPLES_COMPRESSED} NAME_WLE) + get_filename_component (EX_DIR_NAME ${EX_DIR_NAME} NAME_WLE) endif () + execute_process( + COMMAND ${CMAKE_COMMAND} -E rename ${EX_DIR_NAME} HDF5Examples + WORKING_DIRECTORY ${HDF5_BINARY_DIR} + COMMAND_ECHO STDOUT + ) install ( DIRECTORY ${HDF5_BINARY_DIR}/HDF5Examples DESTINATION ${HDF5_INSTALL_DATA_DIR} diff --git a/CMakePresets.json b/CMakePresets.json index 03bad0adc76..50542d47db1 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -9,6 +9,8 @@ "hidden": true, "inherits": "ci-base", "cacheVariables": { + "description": "Basic build using Ninja generator", + "generator": "Ninja", "HDF5_ALLOW_EXTERNAL_SUPPORT": "NO", "TGZPATH": {"type": "STRING", "value": "${sourceParentDir}/temp"} } @@ -34,7 +36,8 @@ "cacheVariables": { "HDF5_PACKAGE_EXTLIBS": "ON", "ZLIB_USE_LOCALCONTENT": "OFF", - "LIBAEC_USE_LOCALCONTENT": "OFF" + "LIBAEC_USE_LOCALCONTENT": "OFF", + "HDF5_ENABLE_SZIP_SUPPORT": "ON" } }, { @@ -86,17 +89,18 @@ "name": "ci-ExamplesVars", "hidden": true, "cacheVariables": { - "HDF5_EXAMPLES_COMPRESSED": {"type": "STRING", "value": "hdf5-examples-2.0.3.tar.gz"}, + "HDF5_EXAMPLES_COMPRESSED": {"type": "STRING", "value": "hdf5-examples-2.0.4.tar.gz"}, "HDF5_EXAMPLES_COMPRESSED_DIR": {"type": "STRING", "value": "${sourceParentDir}/temp"}, "EXAMPLES_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/HDFGroup/hdf5-examples/archive/refs/tags/"}, - "EXAMPLES_TGZ_ORIGNAME": {"type": "STRING", "value": "2.0.3.tar.gz"} + "EXAMPLES_TGZ_ORIGNAME": {"type": "STRING", "value": "2.0.4.tar.gz"} } }, { "name": "ci-StdExamples", "hidden": true, - "inherits": ["ci-base", "ci-ExamplesVars", "ci-base-tgz"], + "inherits": ["ci-ExamplesVars", "ci-base-tgz"], "cacheVariables": { + "EXAMPLES_USE_RELEASE_NAME": "ON", "EXAMPLES_USE_LOCALCONTENT": "OFF", "HDF5_PACK_EXAMPLES": "ON", "EXAMPLES_DOWNLOAD": "ON" diff --git a/config/cmake-presets/hidden-presets.json b/config/cmake-presets/hidden-presets.json index 18ffdd17f5f..a72f0c32b89 100644 --- a/config/cmake-presets/hidden-presets.json +++ b/config/cmake-presets/hidden-presets.json @@ -4,8 +4,6 @@ { "name": "ci-base", "displayName": "Basic Config", - "description": "Basic build using Ninja generator", - "generator": "Ninja", "hidden": true, "binaryDir": "${sourceParentDir}/build/${presetName}", "installDir": "${sourceParentDir}/install/${presetName}" diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index ad61584c902..9a0d073a707 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -32,6 +32,10 @@ set_property (CACHE HDF5_INSTALL_MOD_FORTRAN PROPERTY STRINGS NO SHARED STATIC) set (HDF5_BUILD_GENERATORS ON CACHE BOOL "Build Test Generators" FORCE) +set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE) + +set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE) + set (MPIEXEC_MAX_NUMPROCS "4" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE) set (HDF5_ENABLE_ALL_WARNINGS ON CACHE BOOL "Enable all warnings" FORCE) diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake index ba5fc248c4c..5267212a09c 100644 --- a/config/cmake/scripts/HDF5options.cmake +++ b/config/cmake/scripts/HDF5options.cmake @@ -69,9 +69,9 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRIN ### disable using ext zlib #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF") -### disable using ext szip +### enable using ext szip #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON") -#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF") +#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=ON") #### package examples #### #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACK_EXAMPLES:BOOL=ON -DHDF5_EXAMPLES_COMPRESSED:STRING=HDF5Examples-2.0.3-Source.tar.gz -DHDF5_EXAMPLES_COMPRESSED_DIR:PATH=${CTEST_SCRIPT_DIRECTORY}") diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 11f63fa1008..75738adbde3 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -373,7 +373,7 @@ IV. Further considerations the settings for the developers' environment. Then the only options needed on the command line are those options that are different. Example using HDF default cache file: - cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 12 2013" \ + cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 16 2019" \ -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \ -DCMAKE_BUILD_TYPE:STRING=Release .. From 8dcf2a77c24a39908faa2da1ec08320ec1500b99 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 17 Aug 2023 13:12:08 -0500 Subject: [PATCH 2/3] revert generator setting --- CMakePresets.json | 4 +--- config/cmake-presets/hidden-presets.json | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 50542d47db1..dcb6ff5ee76 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -9,8 +9,6 @@ "hidden": true, "inherits": "ci-base", "cacheVariables": { - "description": "Basic build using Ninja generator", - "generator": "Ninja", "HDF5_ALLOW_EXTERNAL_SUPPORT": "NO", "TGZPATH": {"type": "STRING", "value": "${sourceParentDir}/temp"} } @@ -98,7 +96,7 @@ { "name": "ci-StdExamples", "hidden": true, - "inherits": ["ci-ExamplesVars", "ci-base-tgz"], + "inherits": ["ci-base", "ci-ExamplesVars", "ci-base-tgz"], "cacheVariables": { "EXAMPLES_USE_RELEASE_NAME": "ON", "EXAMPLES_USE_LOCALCONTENT": "OFF", diff --git a/config/cmake-presets/hidden-presets.json b/config/cmake-presets/hidden-presets.json index a72f0c32b89..18ffdd17f5f 100644 --- a/config/cmake-presets/hidden-presets.json +++ b/config/cmake-presets/hidden-presets.json @@ -4,6 +4,8 @@ { "name": "ci-base", "displayName": "Basic Config", + "description": "Basic build using Ninja generator", + "generator": "Ninja", "hidden": true, "binaryDir": "${sourceParentDir}/build/${presetName}", "installDir": "${sourceParentDir}/install/${presetName}" From 3fc1d13f561b6f08d386b3aa70693c9889d4bd6b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 18 Aug 2023 09:18:57 -0500 Subject: [PATCH 3/3] remove obsolete file --- .gitattributes | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 38f1959267d..084de90778c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -203,7 +203,6 @@ java/src/hdf/CMakeLists.txt -text java/src/hdf/hdf5lib/CMakeLists.txt -text java/src/hdf/hdf5lib/H5.java -text java/src/hdf/hdf5lib/HDF5Constants.java -text -java/src/hdf/hdf5lib/HDF5GroupInfo.java -text java/src/hdf/hdf5lib/HDFArray.java -text java/src/hdf/hdf5lib/HDFNativeData.java -text java/src/hdf/hdf5lib/callbacks/Callbacks.java -text