From bfe867c4cb7b636da21ff4245a2c1da6d96f1955 Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Mon, 28 Aug 2023 10:10:30 -0500 Subject: sync cmake and examples changes (#3438) * sync cmake and examples changes * Add java lib changes * Update jave log files * Update java logger version * More logger version changes --- .gitattributes | 6 +- .github/workflows/cmake-ctest.yml | 50 +++--- CMakeInstallation.cmake | 67 ++++++-- CMakeLists.txt | 10 +- CMakePresets.json | 72 +++++---- bin/release | 6 +- config/cmake-presets/hidden-presets.json | 4 +- config/cmake/CTestScript.cmake | 169 --------------------- config/cmake/HDF5_Examples.cmake.in | 119 --------------- config/cmake/HDF5_Examples_options.cmake | 68 --------- config/cmake/cacheinit.cmake | 7 + config/cmake/examples/CTestScript.cmake | 176 ++++++++++++++++++++++ config/cmake/examples/HDF5_Examples.cmake.in | 119 +++++++++++++++ config/cmake/examples/HDF5_Examples_options.cmake | 68 +++++++++ java/examples/datasets/CMakeLists.txt | 2 +- java/examples/datasets/JavaDatasetExample.sh.in | 6 +- java/examples/datasets/Makefile.am | 2 +- java/examples/datatypes/JavaDatatypeExample.sh.in | 6 +- java/examples/datatypes/Makefile.am | 2 +- java/examples/groups/JavaGroupExample.sh.in | 6 +- java/examples/groups/Makefile.am | 2 +- java/examples/intro/JavaIntroExample.sh.in | 6 +- java/examples/intro/Makefile.am | 2 +- java/lib/ext/slf4j-nop-1.7.33.jar | Bin 4020 -> 0 bytes java/lib/ext/slf4j-nop-2.0.6.jar | Bin 0 -> 4071 bytes java/lib/ext/slf4j-simple-1.7.33.jar | Bin 15400 -> 0 bytes java/lib/ext/slf4j-simple-2.0.6.jar | Bin 0 -> 15239 bytes java/lib/slf4j-api-1.7.33.jar | Bin 41473 -> 0 bytes java/lib/slf4j-api-2.0.6.jar | Bin 0 -> 62531 bytes java/src/Makefile.am | 10 +- java/src/hdf/hdf5lib/H5.java | 5 +- java/src/jni/CMakeLists.txt | 2 +- java/test/Makefile.am | 2 +- java/test/junit.sh.in | 6 +- 34 files changed, 537 insertions(+), 463 deletions(-) delete mode 100644 config/cmake/CTestScript.cmake delete mode 100644 config/cmake/HDF5_Examples.cmake.in delete mode 100755 config/cmake/HDF5_Examples_options.cmake create mode 100644 config/cmake/examples/CTestScript.cmake create mode 100644 config/cmake/examples/HDF5_Examples.cmake.in create mode 100644 config/cmake/examples/HDF5_Examples_options.cmake delete mode 100644 java/lib/ext/slf4j-nop-1.7.33.jar create mode 100644 java/lib/ext/slf4j-nop-2.0.6.jar delete mode 100644 java/lib/ext/slf4j-simple-1.7.33.jar create mode 100644 java/lib/ext/slf4j-simple-2.0.6.jar delete mode 100644 java/lib/slf4j-api-1.7.33.jar create mode 100644 java/lib/slf4j-api-2.0.6.jar diff --git a/.gitattributes b/.gitattributes index 2c6dbc5..d060a25 100644 --- a/.gitattributes +++ b/.gitattributes @@ -191,12 +191,12 @@ java/examples/testfiles/examples.intro.H5_CreateGroup.txt -text java/examples/testfiles/examples.intro.H5_CreateGroupAbsoluteRelative.txt -text java/examples/testfiles/examples.intro.H5_CreateGroupDataset.txt -text java/examples/testfiles/examples.intro.H5_ReadWrite.txt -text -java/lib/ext/slf4j-nop-1.7.33.jar -text svneol=unset#application/zip -java/lib/ext/slf4j-simple-1.7.33.jar -text svneol=unset#application/zip +java/lib/ext/slf4j-nop-2.0.6.jar -text svneol=unset#application/zip +java/lib/ext/slf4j-simple-2.0.6.jar -text svneol=unset#application/zip java/lib/hamcrest-core.jar -text svneol=unset#application/java-archive java/lib/junit.jar -text svneol=unset#application/java-archive java/lib/simplelogger.properties -text -java/lib/slf4j-api-1.7.33.jar -text svneol=unset#application/zip +java/lib/slf4j-api-2.0.6.jar -text svneol=unset#application/zip java/src/CMakeLists.txt -text java/src/Makefile.am -text java/src/hdf/CMakeLists.txt -text diff --git a/.github/workflows/cmake-ctest.yml b/.github/workflows/cmake-ctest.yml index dd65ed0..55d1ca0 100644 --- a/.github/workflows/cmake-ctest.yml +++ b/.github/workflows/cmake-ctest.yml @@ -65,13 +65,13 @@ jobs: - name: Publish binary (Windows) id: publish-ctest-binary run: | - mkdir "${{ runner.workspace }}/build" - mkdir "${{ runner.workspace }}/build/hdf5" - Copy-Item -Path ${{ runner.workspace }}/hdf5/hdfsrc/COPYING -Destination ${{ runner.workspace }}/build/hdf5/ - Copy-Item -Path ${{ runner.workspace }}/hdf5/hdfsrc/COPYING_LBNL_HDF5 -Destination ${{ runner.workspace }}/build/hdf5/ - Copy-Item -Path ${{ runner.workspace }}/hdf5/hdfsrc/README.md -Destination ${{ runner.workspace }}/build/hdf5/ - Copy-Item -Path ${{ runner.workspace }}/hdf5/build/ci-StdShar-MSVC/* -Destination ${{ runner.workspace }}/build/hdf5/ -Include *.zip - cd "${{ runner.workspace }}/build" + mkdir "${{ runner.workspace }}/build110" + mkdir "${{ runner.workspace }}/build110/hdf5" + Copy-Item -Path ${{ runner.workspace }}/hdf5/hdfsrc/COPYING -Destination ${{ runner.workspace }}/build110/hdf5/ + Copy-Item -Path ${{ runner.workspace }}/hdf5/hdfsrc/COPYING_LBNL_HDF5 -Destination ${{ runner.workspace }}/build110/hdf5/ + Copy-Item -Path ${{ runner.workspace }}/hdf5/hdfsrc/README.md -Destination ${{ runner.workspace }}/build110/hdf5/ + Copy-Item -Path ${{ runner.workspace }}/hdf5/build110/ci-StdShar-MSVC/* -Destination ${{ runner.workspace }}/build110/hdf5/ -Include *.zip + cd "${{ runner.workspace }}/build110" 7z a -tzip ${{ steps.set-file-base.outputs.FILE_BASE }}-win_vs2022.zip hdf5 shell: pwsh @@ -86,7 +86,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: zip-vs2022-binary - path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-win_vs2022.zip + path: ${{ runner.workspace }}/build110/${{ steps.set-file-base.outputs.FILE_BASE }}-win_vs2022.zip if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` build_and_test_linux: @@ -128,13 +128,13 @@ jobs: - name: Publish binary (Linux) id: publish-ctest-binary run: | - mkdir "${{ runner.workspace }}/build" - mkdir "${{ runner.workspace }}/build/hdf5" - cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING ${{ runner.workspace }}/build/hdf5 - cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING_LBNL_HDF5 ${{ runner.workspace }}/build/hdf5 - cp ${{ runner.workspace }}/hdf5/hdfsrc/README.md ${{ runner.workspace }}/build/hdf5 - cp ${{ runner.workspace }}/hdf5/build/ci-StdShar-GNUC/*.tar.gz ${{ runner.workspace }}/build/hdf5 - cd "${{ runner.workspace }}/build" + mkdir "${{ runner.workspace }}/build110" + mkdir "${{ runner.workspace }}/build110/hdf5" + cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING ${{ runner.workspace }}/build110/hdf5 + cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING_LBNL_HDF5 ${{ runner.workspace }}/build110/hdf5 + cp ${{ runner.workspace }}/hdf5/hdfsrc/README.md ${{ runner.workspace }}/build110/hdf5 + cp ${{ runner.workspace }}/hdf5/build110/ci-StdShar-GNUC/*.tar.gz ${{ runner.workspace }}/build110/hdf5 + cd "${{ runner.workspace }}/build110" tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204.tar.gz hdf5 shell: bash @@ -148,7 +148,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: tgz-ubuntu-2204-binary - path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204.tar.gz + path: ${{ runner.workspace }}/build110/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` # Save doxygen files created by ctest script @@ -156,7 +156,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: docs-doxygen - path: ${{ runner.workspace }}/hdf5/build/ci-StdShar-GNUC/hdf5lib_docs/html + path: ${{ runner.workspace }}/hdf5/build110/ci-StdShar-GNUC/hdf5lib_docs/html if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` build_and_test_mac: @@ -203,13 +203,13 @@ jobs: - name: Publish binary (MacOS) id: publish-ctest-binary run: | - mkdir "${{ runner.workspace }}/build" - mkdir "${{ runner.workspace }}/build/hdf5" - cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING ${{ runner.workspace }}/build/hdf5 - cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING_LBNL_HDF5 ${{ runner.workspace }}/build/hdf5 - cp ${{ runner.workspace }}/hdf5/hdfsrc/README.md ${{ runner.workspace }}/build/hdf5 - cp ${{ runner.workspace }}/hdf5/build/ci-StdShar-Clang/*.tar.gz ${{ runner.workspace }}/build/hdf5 - cd "${{ runner.workspace }}/build" + mkdir "${{ runner.workspace }}/build110" + mkdir "${{ runner.workspace }}/build110/hdf5" + cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING ${{ runner.workspace }}/build110/hdf5 + cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING_LBNL_HDF5 ${{ runner.workspace }}/build110/hdf5 + cp ${{ runner.workspace }}/hdf5/hdfsrc/README.md ${{ runner.workspace }}/build110/hdf5 + cp ${{ runner.workspace }}/hdf5/build110/ci-StdShar-Clang/*.tar.gz ${{ runner.workspace }}/build110/hdf5 + cd "${{ runner.workspace }}/build110" tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-osx12.tar.gz hdf5 shell: bash @@ -223,6 +223,6 @@ jobs: uses: actions/upload-artifact@v3 with: name: tgz-osx12-binary - path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-osx12.tar.gz + path: ${{ runner.workspace }}/build110/${{ steps.set-file-base.outputs.FILE_BASE }}-osx12.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 25c6e7f..1fb7714 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -138,7 +138,7 @@ install ( option (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF) if (HDF5_PACK_EXAMPLES) configure_file ( - ${HDF_RESOURCES_DIR}/HDF5_Examples.cmake.in + ${HDF_RESOURCES_DIR}/examples/HDF5_Examples.cmake.in ${HDF5_BINARY_DIR}/HDF5_Examples.cmake @ONLY ) install ( @@ -146,17 +146,58 @@ if (HDF5_PACK_EXAMPLES) DESTINATION ${HDF5_INSTALL_DATA_DIR} COMPONENT hdfdocuments ) - if (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}") - execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED} - ) - install ( - DIRECTORY ${HDF5_BINARY_DIR}/HDF5Examples - DESTINATION ${HDF5_INSTALL_DATA_DIR} - USE_SOURCE_PERMISSIONS - COMPONENT hdfdocuments - ) + + 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_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_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 () + if (EXISTS "${HDF5_BINARY_DIR}/${HDF5_EXAMPLES_COMPRESSED}") + execute_process( + COMMAND ${CMAKE_COMMAND} -E tar xzf ${HDF5_EXAMPLES_COMPRESSED} + WORKING_DIRECTORY ${HDF5_BINARY_DIR} + COMMAND_ECHO STDOUT + ) + endif () + else () + if (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}") + execute_process( + COMMAND ${CMAKE_COMMAND} -E tar xzf ${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED} + WORKING_DIRECTORY ${HDF5_BINARY_DIR} + COMMAND_ECHO STDOUT + ) + endif () endif () + 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} + USE_SOURCE_PERMISSIONS + COMPONENT hdfdocuments + ) install ( FILES ${HDF5_SOURCE_DIR}/release_docs/USING_CMake_Examples.txt @@ -165,13 +206,13 @@ if (HDF5_PACK_EXAMPLES) ) install ( FILES - ${HDF_RESOURCES_DIR}/CTestScript.cmake + ${HDF_RESOURCES_DIR}/examples/CTestScript.cmake DESTINATION ${HDF5_INSTALL_DATA_DIR} COMPONENT hdfdocuments ) install ( FILES - ${HDF_RESOURCES_DIR}/HDF5_Examples_options.cmake + ${HDF_RESOURCES_DIR}/examples/HDF5_Examples_options.cmake DESTINATION ${HDF5_INSTALL_DATA_DIR} COMPONENT hdfdocuments ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 785c97b..f61c3a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,9 +236,9 @@ set (HDF5_JAVA_JNI_SRC_DIR ${HDF5_SOURCE_DIR}/java/src/jni) set (HDF5_JAVA_HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/java/src/hdf) set (HDF5_JAVA_TEST_SRC_DIR ${HDF5_SOURCE_DIR}/java/test) set (HDF5_JAVA_LIB_DIR ${HDF5_SOURCE_DIR}/java/lib) -set (HDF5_JAVA_LOGGING_JAR ${HDF5_SOURCE_DIR}/java/lib/slf4j-api-1.7.33.jar) -set (HDF5_JAVA_LOGGING_NOP_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-nop-1.7.33.jar) -set (HDF5_JAVA_LOGGING_SIMPLE_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-simple-1.7.33.jar) +set (HDF5_JAVA_LOGGING_JAR ${HDF5_SOURCE_DIR}/java/lib/slf4j-api-2.0.6.jar) +set (HDF5_JAVA_LOGGING_NOP_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-nop-2.0.6.jar) +set (HDF5_JAVA_LOGGING_SIMPLE_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-simple-2.0.6.jar) set (HDF5_DOXYGEN_DIR ${HDF5_SOURCE_DIR}/doxygen) set (HDF5_SRC_INCLUDE_DIRS ${HDF5_SRC_DIR}) @@ -955,11 +955,11 @@ if (BUILD_TESTING) mark_as_advanced (HDF5_TEST_JAVA) if (NOT HDF5_EXTERNALLY_CONFIGURED) - if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test") + if (EXISTS "${HDF5_TEST_SRC_DIR}" AND IS_DIRECTORY "${HDF5_TEST_SRC_DIR}") add_subdirectory (test) endif () if (H5_HAVE_PARALLEL) - if (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar") + if (EXISTS "${HDF5_TEST_PAR_DIR}" AND IS_DIRECTORY "${HDF5_TEST_PAR_DIR}") add_subdirectory (testpar) endif () endif () diff --git a/CMakePresets.json b/CMakePresets.json index 13766ca..c72b3b0 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -14,28 +14,35 @@ } }, { - "name": "ci-StdCompression", + "name": "ci-CompressionVars", "hidden": true, - "inherits": "ci-base-tgz", "cacheVariables": { "BUILD_ZLIB_WITH_FETCHCONTENT": "ON", "ZLIB_PACKAGE_NAME": {"type": "STRING", "value": "zlib"}, "ZLIB_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/madler/zlib/releases/download/v1.2.13"}, "ZLIB_TGZ_ORIGNAME": {"type": "STRING", "value": "zlib-1.2.13.tar.gz"}, - "ZLIB_USE_LOCALCONTENT": "OFF", "BUILD_SZIP_WITH_FETCHCONTENT": "ON", "LIBAEC_PACKAGE_NAME": {"type": "STRING", "value": "libaec"}, "LIBAEC_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6"}, - "LIBAEC_TGZ_ORIGNAME": {"type": "STRING", "value": "libaec-1.0.6.tar.gz"}, - "LIBAEC_USE_LOCALCONTENT": "OFF" + "LIBAEC_TGZ_ORIGNAME": {"type": "STRING", "value": "libaec-1.0.6.tar.gz"} + } + }, + { + "name": "ci-StdCompression", + "hidden": true, + "inherits": ["ci-base-tgz", "ci-CompressionVars"], + "cacheVariables": { + "HDF5_PACKAGE_EXTLIBS": "ON", + "ZLIB_USE_LOCALCONTENT": "OFF", + "LIBAEC_USE_LOCALCONTENT": "OFF", + "HDF5_ENABLE_SZIP_SUPPORT": "ON" } }, { "name": "ci-base-plugins", "hidden": true, - "inherits": "ci-base-tgz", "cacheVariables": { - "PLUGIN_TGZ_NAME": {"type": "STRING", "value": "hdf5_plugins-1.14.0.tar.gz"}, + "PLUGIN_TGZ_NAME": {"type": "STRING", "value": "hdf5_plugins.tar.gz"}, "PLUGIN_PACKAGE_NAME": {"type": "STRING", "value": "pl"}, "BSHUF_TGZ_NAME": {"type": "STRING", "value": "bitshuffle.tar.gz"}, "BSHUF_PACKAGE_NAME": {"type": "STRING", "value": "bshuf"}, @@ -63,32 +70,49 @@ } }, { - "name": "ci-StdPlugins", + "name": "ci-PluginsVars", "hidden": true, - "inherits": ["ci-base-plugins", "ci-base-tgz"], "cacheVariables": { "HDF5_ENABLE_PLUGIN_SUPPORT": "ON", "PLUGIN_TGZ_ORIGPATH": {"type": "STRING", "value": "https://github.com/HDFGroup/hdf5_plugins/archive/refs/tags"}, - "PLUGIN_TGZ_ORIGNAME": {"type": "STRING", "value": "hdf5_plugins-1.14.0.tar.gz"} + "PLUGIN_TGZ_ORIGNAME": {"type": "STRING", "value": "hdf5_plugins-master.tar.gz"} } }, - { - "name": "ci-StdExamples", + { + "name": "ci-StdPlugins", "hidden": true, - "inherits": "ci-base", + "inherits": ["ci-base-plugins", "ci-PluginsVars", "ci-base-tgz"], "cacheVariables": { - "HDF5_PACK_EXAMPLES": "ON", - "HDF5_EXAMPLES_COMPRESSED": {"type": "STRING", "value": "hdf5-examples-2.0.3.tar.gz"}, + "H5PL_VERS_MAJOR": "1", + "H5PL_VERS_MINOR": "10", + "H5PL_VERS_RELEASE": "11" + } + }, + { + "name": "ci-ExamplesVars", + "hidden": true, + "cacheVariables": { + "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"], + "cacheVariables": { + "EXAMPLES_USE_RELEASE_NAME": "ON", + "EXAMPLES_USE_LOCALCONTENT": "OFF", + "HDF5_PACK_EXAMPLES": "ON", "EXAMPLES_DOWNLOAD": "ON" } }, - { + { "name": "ci-StdShar", "hidden": true, - "inherits": "ci-StdCompression", + "inherits": ["ci-StdCompression", "ci-StdExamples"], "cacheVariables": { "HDF_PACKAGE_NAMESPACE": {"type": "STRING", "value": "hdf5::"}, "HDF5_INSTALL_MOD_FORTRAN": "NO", @@ -105,8 +129,7 @@ "ci-x64-Release-MSVC", "ci-CPP", "ci-Java", - "ci-StdShar", - "ci-StdExamples" + "ci-StdShar" ] }, { @@ -117,8 +140,7 @@ "ci-CPP", "ci-Fortran", "ci-Java", - "ci-StdShar", - "ci-StdExamples" + "ci-StdShar" ] }, { @@ -129,8 +151,7 @@ "ci-CPP", "ci-Fortran", "ci-Java", - "ci-StdShar", - "ci-StdExamples" + "ci-StdShar" ] }, { @@ -141,8 +162,7 @@ "ci-CPP", "ci-Fortran", "ci-Java", - "ci-StdShar", - "ci-StdExamples" + "ci-StdShar" ] } ], diff --git a/bin/release b/bin/release index bb0932c..1226d33 100755 --- a/bin/release +++ b/bin/release @@ -206,7 +206,7 @@ tar2cmakezip() cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmziptmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmziptmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.3-Source.zip $cmziptmpsubdir - cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-1_10_10.zip $cmziptmpsubdir + cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-master.zip $cmziptmpsubdir cp $cmziptmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmziptmpsubdir cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmziptmpsubdir cp $cmziptmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmziptmpsubdir @@ -298,7 +298,7 @@ tar2cmaketgz() cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmgztmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.3-Source.tar.gz $cmgztmpsubdir - cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-1_10_10.tar.gz $cmgztmpsubdir + cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-master.tar.gz $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5options.cmake $cmgztmpsubdir @@ -377,7 +377,7 @@ tar2hpccmaketgz() cp /mnt/scr1/pre-release/hdf5/CMake/LIBAEC.tar.gz $cmgztmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/ZLib.tar.gz $cmgztmpsubdir cp /mnt/scr1/pre-release/hdf5/CMake/HDF5Examples-2.0.3-Source.tar.gz $cmgztmpsubdir - cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-1_10_10.tar.gz $cmgztmpsubdir + cp /mnt/scr1/pre-release/hdf5/CMake/hdf5_plugins-master.tar.gz $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/CTestScript.cmake $cmgztmpsubdir cp $cmgztmpsubdir/$version/config/cmake/scripts/HDF5config.cmake $cmgztmpsubdir diff --git a/config/cmake-presets/hidden-presets.json b/config/cmake-presets/hidden-presets.json index 18ffdd1..2cd1b14 100644 --- a/config/cmake-presets/hidden-presets.json +++ b/config/cmake-presets/hidden-presets.json @@ -7,8 +7,8 @@ "description": "Basic build using Ninja generator", "generator": "Ninja", "hidden": true, - "binaryDir": "${sourceParentDir}/build/${presetName}", - "installDir": "${sourceParentDir}/install/${presetName}" + "binaryDir": "${sourceParentDir}/build110/${presetName}", + "installDir": "${sourceParentDir}/install110/${presetName}" }, { "name": "ci-x64", diff --git a/config/cmake/CTestScript.cmake b/config/cmake/CTestScript.cmake deleted file mode 100644 index dcf2685..0000000 --- a/config/cmake/CTestScript.cmake +++ /dev/null @@ -1,169 +0,0 @@ -# -# 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. -# -cmake_minimum_required (VERSION 3.12) -######################################################## -# For any comments please contact cdashhelp@hdfgroup.org -# -######################################################## -# ----------------------------------------------------------- -# -- Get environment -# ----------------------------------------------------------- -if (NOT SITE_OS_NAME) - ## machine name not provided - attempt to discover with uname - ## -- set hostname - ## -------------------------- - find_program (HOSTNAME_CMD NAMES hostname) - exec_program (${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME) - set (CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}") - find_program (UNAME NAMES uname) - macro (getuname name flag) - exec_program ("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}") - endmacro () - - getuname (osname -s) - getuname (osrel -r) - getuname (cpu -m) - message (STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n") - - set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}") - if (SITE_BUILDNAME_SUFFIX) - set (CTEST_BUILD_NAME "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}") - endif () - set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS}") -else () - ## machine name provided - ## -------------------------- - if (CMAKE_HOST_UNIX) - set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_OS_BITS}-${SITE_COMPILER_NAME}-${SITE_COMPILER_VERSION}") - else () - set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}") - endif () - if (SITE_BUILDNAME_SUFFIX) - set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}") - endif () - set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") -endif () - -#----------------------------------------------------------------------------- -# MacOS machines need special options -#----------------------------------------------------------------------------- -if (APPLE) - # Compiler choice - execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE) - execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE) - set (ENV{CC} "${XCODE_CC}") - set (ENV{CXX} "${XCODE_CXX}") - - set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") -endif () - -#----------------------------------------------------------------------------- -set (NEED_REPOSITORY_CHECKOUT 0) -set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") -if (CTEST_USE_TAR_SOURCE) - ## Uncompress source if tar or zip file provided - ## -------------------------- - if (WIN32 AND NOT MINGW) - message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]") - execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv) - else () - message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]") - execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv) - endif () - - if (NOT rv EQUAL 0) - message (STATUS "extracting... [error-(${rv}) clean up]") - file (REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}") - message (FATAL_ERROR "error: extract of ${CTEST_USE_TAR_SOURCE} failed") - endif () -endif () - -#----------------------------------------------------------------------------- -## Clear the build directory -## -------------------------- -set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) -if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") - ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY}) -else () - file (MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") -endif () - -# Use multiple CPU cores to build -include (ProcessorCount) -ProcessorCount (N) -if (NOT N EQUAL 0) - if (MAX_PROC_COUNT) - if (N GREATER MAX_PROC_COUNT) - set (N ${MAX_PROC_COUNT}) - endif () - endif () - if (NOT WIN32) - set (CTEST_BUILD_FLAGS -j${N}) - endif () - set (ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) -endif () - -#----------------------------------------------------------------------------- -# Initialize the CTEST commands -#------------------------------ -set(CTEST_CONFIGURE_TOOLSET "") -if(CMAKE_GENERATOR_TOOLSET) - set(CTEST_CONFIGURE_TOOLSET "-T${CMAKE_GENERATOR_TOOLSET}") -endif() -set(CTEST_CONFIGURE_ARCHITECTURE "") -if(CMAKE_GENERATOR_ARCHITECTURE) - set(CTEST_CONFIGURE_ARCHITECTURE "-A${CMAKE_GENERATOR_ARCHITECTURE}") -endif() -set (CTEST_CONFIGURE_COMMAND - "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\"" -) -#----------------------------------------------------------------------------- - -#----------------------------------------------------------------------------- -## -- set output to english -set ($ENV{LC_MESSAGES} "en_EN") - -#----------------------------------------------------------------------------- - configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake) - ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}") -#----------------------------------------------------------------------------- - ## NORMAL process - ## -- LOCAL_SUBMIT reports to CDash server - ## -------------------------- - ctest_start (Experimental) - ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) - if (LOCAL_SUBMIT) - ctest_submit (PARTS Configure Notes) - endif () - if (${res} LESS 0 OR ${res} GREATER 0) - file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n") - endif () - - ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res NUMBER_ERRORS errval) - if (LOCAL_SUBMIT) - ctest_submit (PARTS Build) - endif () - if (${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0) - file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n") - endif () - - ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) - if (LOCAL_SUBMIT) - ctest_submit (PARTS Test) - endif() - if (${res} LESS 0 OR ${res} GREATER 0) - file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n") - endif () - if (${res} LESS 0 OR ${res} GREATER 0) - message (FATAL_ERROR "tests FAILED") - endif () -#----------------------------------------------------------------------------- diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in deleted file mode 100644 index 9f3db03..0000000 --- a/config/cmake/HDF5_Examples.cmake.in +++ /dev/null @@ -1,119 +0,0 @@ -# -# 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. -# -cmake_minimum_required (VERSION 3.12) -############################################################################################################### -# This script will build and run the examples from a folder -# Execute from a command line: -# ctest -S HDF5_Examples.cmake,OPTION=VALUE -C Release -VV -O test.log -############################################################################################################### - -set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") -if("@CMAKE_GENERATOR_TOOLSET@") - set(CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") -endif() -if("@CMAKE_GENERATOR_ARCHITECTURE@") - set(CMAKE_GENERATOR_ARCHITECTURE "@CMAKE_GENERATOR_ARCHITECTURE@") -endif() -set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) - -# handle input parameters to script. -#INSTALLDIR - HDF5 root folder -#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo -#CTEST_SOURCE_NAME - name of source folder; HDF5Examples -if(DEFINED CTEST_SCRIPT_ARG) - # transform ctest script arguments of the form - # script.ctest,var1=value1,var2=value2 - # to variables with the respective names set to the respective values - string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}") - foreach(current_var ${script_args}) - if("${current_var}" MATCHES "^([^=]+)=(.+)$") - set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") - endif() - endforeach() -endif() - -################################################################### -### Following Line is one of [Release, RelWithDebInfo, Debug] ##### -set(CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}") -if(NOT DEFINED CTEST_CONFIGURATION_TYPE) - set(CTEST_CONFIGURATION_TYPE "Release") -endif() -set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=${CTEST_CONFIGURATION_TYPE}") -################################################################## - -if(NOT DEFINED INSTALLDIR) - if(WIN32) - set(INSTALLDIR "%ProgramFiles%/HDF_Group/@HDF5_PACKAGE_NAME@/@HDF5_PACKAGE_VERSION@") - else() - set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") - endif() -endif() - -if(NOT DEFINED CTEST_SOURCE_NAME) - set(CTEST_SOURCE_NAME "HDF5Examples") -endif() - -if(NOT DEFINED HDF_LOCAL) - set(CDASH_LOCAL "NO") -else() - set(CDASH_LOCAL "YES") -endif() -if(NOT DEFINED CTEST_SITE) - set(CTEST_SITE "local") -endif() -if(NOT DEFINED CTEST_BUILD_NAME) - set(CTEST_BUILD_NAME "examples") -endif() -set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") - -#TAR_SOURCE - name of tarfile -#if(NOT DEFINED TAR_SOURCE) -# set(CTEST_USE_TAR_SOURCE "HDF5Examples-2.0.1-Source") -#endif() - -############################################################################################################### -set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ROOT:PATH=${INSTALLDIR}") -if(WIN32) - set(SITE_OS_NAME "Windows") - set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) - set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") - set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") -else(APPLE) - set(ENV{DYLD_LIBRARY_PATH} "${INSTALLDIR}/lib") - set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) - set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") - set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") -else() - set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") - set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) - set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") - set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") -endif() -### default HDF5_PLUGIN_PATH to where the filter libraries are located -set(ENV{HDF5_PLUGIN_PATH} "${INSTALLDIR}/lib/plugin") -if(${CDASH_LOCAL}) - set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") -endif() -set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") - -############################################################################################################### -# For any comments please contact cdashhelp@hdfgroup.org -# -############################################################################################################### - -if(WIN32) - include(${CTEST_SCRIPT_DIRECTORY}\\HDF5_Examples_options.cmake) - include(${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake) -else() - include(${CTEST_SCRIPT_DIRECTORY}/HDF5_Examples_options.cmake) - include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake) -endif() diff --git a/config/cmake/HDF5_Examples_options.cmake b/config/cmake/HDF5_Examples_options.cmake deleted file mode 100755 index cdd49eb..0000000 --- a/config/cmake/HDF5_Examples_options.cmake +++ /dev/null @@ -1,68 +0,0 @@ -# -# 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. -# -############################################################################################# -#### Change default configuration of options in config/cmake/cacheinit.cmake file ### -#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ### -#### DEFAULT: ### -#### BUILD_SHARED_LIBS:BOOL=OFF ### -#### HDF_BUILD_C:BOOL=ON ### -#### HDF_BUILD_CXX:BOOL=OFF ### -#### HDF_BUILD_FORTRAN:BOOL=OFF ### -#### HDF_BUILD_JAVA:BOOL=OFF ### -#### HDF_BUILD_FILTERS:BOOL=OFF ### -#### BUILD_TESTING:BOOL=OFF ### -#### HDF_ENABLE_PARALLEL:BOOL=OFF ### -#### HDF_ENABLE_THREADSAFE:BOOL=OFF ### -############################################################################################# - -### uncomment/comment and change the following lines for other configuration options -### build with shared libraries -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=ON") - -############################################################################################# -#### languages #### -### disable C builds -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_C:BOOL=OFF") - -### enable C++ builds -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_CXX:BOOL=ON") - -### enable Fortran builds -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") - -### enable JAVA builds -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=ON") - -############################################################################################# -### enable FILTERS builds -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FILTERS:BOOL=ON") -### default HDF5_PLUGIN_PATH to where the filter libraries are located -#set(ENV{HDF5_PLUGIN_PATH} "${INSTALLDIR}/lib/plugin") - -############################################################################################# -### enable parallel program builds -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_ENABLE_PARALLEL:BOOL=ON") - -############################################################################################# -### match the hdf5 library namespace -set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NAMESPACE:STRING=hdf5::") - -############################################################################################# -### enable threadsafe program builds -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_ENABLE_THREADSAFE:BOOL=ON") - -############################################################################################# -### enable test program builds, requires reference files in testfiles subdirectory -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=ON") -#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCOMPARE_TESTING:BOOL=ON") - -############################################################################################# diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index 3cae5ab..75723a8 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) @@ -69,6 +73,9 @@ set (LIBAEC_USE_LOCALCONTENT ON CACHE BOOL "Use local file for LIBAEC FetchConte set (PLUGIN_TGZ_NAME "hdf5_plugins.tar.gz" CACHE STRING "Use PLUGINS from compressed file" FORCE) set (PLUGIN_PACKAGE_NAME "pl" CACHE STRING "Name of PLUGIN package" FORCE) +set (H5PL_VERS_MAJOR "1" CACHE STRING "Major version of hdf5 package for PLUGIN package" FORCE) +set (H5PL_VERS_MINOR "10" CACHE STRING "Minor version of hdf5 package for PLUGIN package" FORCE) +set (H5PL_VERS_RELEASE "11" CACHE STRING "Release version of hdf5 package for PLUGIN package" FORCE) ############# # bitshuffle diff --git a/config/cmake/examples/CTestScript.cmake b/config/cmake/examples/CTestScript.cmake new file mode 100644 index 0000000..76bce56 --- /dev/null +++ b/config/cmake/examples/CTestScript.cmake @@ -0,0 +1,176 @@ +# +# 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. +# +cmake_minimum_required (VERSION 3.12) +######################################################## +# For any comments please contact cdashhelp@hdfgroup.org +# +######################################################## +# ----------------------------------------------------------- +# -- Get environment +# ----------------------------------------------------------- +if (NOT SITE_OS_NAME) + ## machine name not provided - attempt to discover with uname + ## -- set hostname + ## -------------------------- + find_program (HOSTNAME_CMD NAMES hostname) + exec_program (${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME) + set (CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}") + find_program (UNAME NAMES uname) + macro (getuname name flag) + exec_program ("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}") + endmacro () + + getuname (osname -s) + getuname (osrel -r) + getuname (cpu -m) + message (STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n") + + set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}") +else () + ## machine name provided + ## -------------------------- + if (CMAKE_HOST_UNIX) + set (CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_OS_BITS}-${SITE_COMPILER_NAME}-${SITE_COMPILER_VERSION}") + else () + set (CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}") + endif () +endif () +if (SITE_BUILDNAME_SUFFIX) + set (CTEST_BUILD_NAME "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}") +endif () +set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") + +# Launchers work only with Makefile and Ninja generators. +if(NOT "${CTEST_CMAKE_GENERATOR}" MATCHES "Make|Ninja" OR LOCAL_SKIP_TEST) + set(CTEST_USE_LAUNCHERS 0) + set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 0) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=OFF") +else() + set(CTEST_USE_LAUNCHERS 1) + set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 1) + set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON") +endif() + +#----------------------------------------------------------------------------- +# MacOS machines need special options +#----------------------------------------------------------------------------- +if (APPLE) + # Compiler choice + execute_process (COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process (COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE) + set (ENV{CC} "${XCODE_CC}") + set (ENV{CXX} "${XCODE_CXX}") + + set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF") +endif () + +#----------------------------------------------------------------------------- +set (NEED_REPOSITORY_CHECKOUT 0) +set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"") +if (CTEST_USE_TAR_SOURCE) + ## Uncompress source if tar or zip file provided + ## -------------------------- + if (WIN32 AND NOT MINGW) + message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]") + execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv) + else () + message (STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]") + execute_process (COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv) + endif () + + if (NOT rv EQUAL 0) + message (STATUS "extracting... [error-(${rv}) clean up]") + file (REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}") + message (FATAL_ERROR "error: extract of ${CTEST_USE_TAR_SOURCE} failed") + endif () +endif () + +#----------------------------------------------------------------------------- +## Clear the build directory +## -------------------------- +set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) +if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}") + ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY}) +else () + file (MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}") +endif () + +# Use multiple CPU cores to build +include (ProcessorCount) +ProcessorCount (N) +if (NOT N EQUAL 0) + if (MAX_PROC_COUNT) + if (N GREATER MAX_PROC_COUNT) + set (N ${MAX_PROC_COUNT}) + endif () + endif () + if (NOT WIN32) + set (CTEST_BUILD_FLAGS -j${N}) + endif () + set (ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N}) +endif () + +#----------------------------------------------------------------------------- +# Initialize the CTEST commands +#------------------------------ +set(CTEST_CONFIGURE_TOOLSET "") +if(CMAKE_GENERATOR_TOOLSET) + set(CTEST_CONFIGURE_TOOLSET "-T${CMAKE_GENERATOR_TOOLSET}") +endif() +set(CTEST_CONFIGURE_ARCHITECTURE "") +if(CMAKE_GENERATOR_ARCHITECTURE) + set(CTEST_CONFIGURE_ARCHITECTURE "-A${CMAKE_GENERATOR_ARCHITECTURE}") +endif() +set (CTEST_CONFIGURE_COMMAND + "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\"" +) +#----------------------------------------------------------------------------- + +#----------------------------------------------------------------------------- +## -- set output to english +set ($ENV{LC_MESSAGES} "en_EN") + +#----------------------------------------------------------------------------- + configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake) + ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}") +#----------------------------------------------------------------------------- + ## NORMAL process + ## -- LOCAL_SUBMIT reports to CDash server + ## -------------------------- + ctest_start (Experimental) + ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) + if (LOCAL_SUBMIT) + ctest_submit (PARTS Configure Notes) + endif () + if (${res} LESS 0 OR ${res} GREATER 0) + file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n") + endif () + + ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res NUMBER_ERRORS errval) + if (LOCAL_SUBMIT) + ctest_submit (PARTS Build) + endif () + if (${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0) + file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n") + endif () + + ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res) + if (LOCAL_SUBMIT) + ctest_submit (PARTS Test) + endif() + if (${res} LESS 0 OR ${res} GREATER 0) + file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n") + endif () + if (${res} LESS 0 OR ${res} GREATER 0) + message (FATAL_ERROR "tests FAILED") + endif () +#----------------------------------------------------------------------------- diff --git a/config/cmake/examples/HDF5_Examples.cmake.in b/config/cmake/examples/HDF5_Examples.cmake.in new file mode 100644 index 0000000..da2502c --- /dev/null +++ b/config/cmake/examples/HDF5_Examples.cmake.in @@ -0,0 +1,119 @@ +# +# 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. +# +cmake_minimum_required (VERSION 3.12) +############################################################################################################### +# This script will build and run the examples from a folder +# Execute from a command line: +# ctest -S HDF5_Examples.cmake,OPTION=VALUE -C Release -VV -O test.log +############################################################################################################### + +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +if("@CMAKE_GENERATOR_TOOLSET@") + set(CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") +endif() +if("@CMAKE_GENERATOR_ARCHITECTURE@") + set(CMAKE_GENERATOR_ARCHITECTURE "@CMAKE_GENERATOR_ARCHITECTURE@") +endif() +set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY}) + +# handle input parameters to script. +#INSTALLDIR - HDF5 root folder +#CTEST_CONFIGURATION_TYPE - Release, Debug, RelWithDebInfo +#CTEST_SOURCE_NAME - name of source folder; HDF5Examples +if(DEFINED CTEST_SCRIPT_ARG) + # transform ctest script arguments of the form + # script.ctest,var1=value1,var2=value2 + # to variables with the respective names set to the respective values + string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}") + foreach(current_var ${script_args}) + if("${current_var}" MATCHES "^([^=]+)=(.+)$") + set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}") + endif() + endforeach() +endif() + +################################################################### +### Following Line is one of [Release, RelWithDebInfo, Debug] ##### +set(CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}") +if(NOT DEFINED CTEST_CONFIGURATION_TYPE) + set(CTEST_CONFIGURATION_TYPE "Release") +endif() +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=${CTEST_CONFIGURATION_TYPE}") +################################################################## + +if(NOT DEFINED INSTALLDIR) + if(WIN32) + set(INSTALLDIR "%ProgramFiles%/HDF_Group/@HDF5_PACKAGE_NAME@/@HDF5_PACKAGE_VERSION@") + else() + set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") + endif() +endif() + +if(NOT DEFINED CTEST_SOURCE_NAME) + set(CTEST_SOURCE_NAME "HDF5Examples") +endif() + +if(NOT DEFINED HDF_LOCAL) + set(CDASH_LOCAL "NO") +else() + set(CDASH_LOCAL "YES") +endif() +if(NOT DEFINED CTEST_SITE) + set(CTEST_SITE "local") +endif() +if(NOT DEFINED CTEST_BUILD_NAME) + set(CTEST_BUILD_NAME "examples") +endif() +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") + +#TAR_SOURCE - name of tarfile +#if(NOT DEFINED TAR_SOURCE) +# set(CTEST_USE_TAR_SOURCE "HDF5Examples-2.0.1-Source") +#endif() + +############################################################################################################### +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ROOT:PATH=${INSTALLDIR}") +if(WIN32) + set(SITE_OS_NAME "Windows") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}") +elseif(APPLE) + set(ENV{DYLD_LIBRARY_PATH} "${INSTALLDIR}/lib") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") +else() + set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib") + set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build) + set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}") + set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}") +endif() +### default HDF5_PLUGIN_PATH to where the filter libraries are located +set(ENV{HDF5_PLUGIN_PATH} "${INSTALLDIR}/lib/plugin") +if(${CDASH_LOCAL}) + set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCDASH_LOCAL:BOOL=ON") +endif() +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@") + +############################################################################################################### +# For any comments please contact cdashhelp@hdfgroup.org +# +############################################################################################################### + +if(WIN32) + include(${CTEST_SCRIPT_DIRECTORY}\\HDF5_Examples_options.cmake) + include(${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake) +else() + include(${CTEST_SCRIPT_DIRECTORY}/HDF5_Examples_options.cmake) + include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake) +endif() diff --git a/config/cmake/examples/HDF5_Examples_options.cmake b/config/cmake/examples/HDF5_Examples_options.cmake new file mode 100644 index 0000000..cdd49eb --- /dev/null +++ b/config/cmake/examples/HDF5_Examples_options.cmake @@ -0,0 +1,68 @@ +# +# 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. +# +############################################################################################# +#### Change default configuration of options in config/cmake/cacheinit.cmake file ### +#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ### +#### DEFAULT: ### +#### BUILD_SHARED_LIBS:BOOL=OFF ### +#### HDF_BUILD_C:BOOL=ON ### +#### HDF_BUILD_CXX:BOOL=OFF ### +#### HDF_BUILD_FORTRAN:BOOL=OFF ### +#### HDF_BUILD_JAVA:BOOL=OFF ### +#### HDF_BUILD_FILTERS:BOOL=OFF ### +#### BUILD_TESTING:BOOL=OFF ### +#### HDF_ENABLE_PARALLEL:BOOL=OFF ### +#### HDF_ENABLE_THREADSAFE:BOOL=OFF ### +############################################################################################# + +### uncomment/comment and change the following lines for other configuration options +### build with shared libraries +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=ON") + +############################################################################################# +#### languages #### +### disable C builds +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_C:BOOL=OFF") + +### enable C++ builds +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_CXX:BOOL=ON") + +### enable Fortran builds +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON") + +### enable JAVA builds +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_JAVA:BOOL=ON") + +############################################################################################# +### enable FILTERS builds +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FILTERS:BOOL=ON") +### default HDF5_PLUGIN_PATH to where the filter libraries are located +#set(ENV{HDF5_PLUGIN_PATH} "${INSTALLDIR}/lib/plugin") + +############################################################################################# +### enable parallel program builds +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_ENABLE_PARALLEL:BOOL=ON") + +############################################################################################# +### match the hdf5 library namespace +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NAMESPACE:STRING=hdf5::") + +############################################################################################# +### enable threadsafe program builds +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_ENABLE_THREADSAFE:BOOL=ON") + +############################################################################################# +### enable test program builds, requires reference files in testfiles subdirectory +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=ON") +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCOMPARE_TESTING:BOOL=ON") + +############################################################################################# diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt index 7542e8e..6ed03ca 100644 --- a/java/examples/datasets/CMakeLists.txt +++ b/java/examples/datasets/CMakeLists.txt @@ -80,7 +80,7 @@ endforeach () if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL) get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY OUTPUT_NAME) - set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name}$<$,$>:${CMAKE_DEBUG_POSTFIX}>;") + set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name}$<$:${CMAKE_DEBUG_POSTFIX}>;") set (last_test "") foreach (example ${HDF_JAVA_EXAMPLES}) diff --git a/java/examples/datasets/JavaDatasetExample.sh.in b/java/examples/datasets/JavaDatasetExample.sh.in index b299ff2..9683076 100644 --- a/java/examples/datasets/JavaDatasetExample.sh.in +++ b/java/examples/datasets/JavaDatasetExample.sh.in @@ -58,8 +58,8 @@ $top_builddir/java/src/jni/.libs/libhdf5_java.* $top_builddir/java/src/$JARFILE " LIST_JAR_TESTFILES=" -$HDFLIB_HOME/slf4j-api-1.7.33.jar -$HDFLIB_HOME/ext/slf4j-simple-1.7.33.jar +$HDFLIB_HOME/slf4j-api-2.0.6.jar +$HDFLIB_HOME/ext/slf4j-simple-2.0.6.jar " LIST_DATA_FILES=" $HDFTEST_HOME/../testfiles/examples.datasets.H5Ex_D_Alloc.txt @@ -222,7 +222,7 @@ JAVAEXEFLAGS=@H5_JAVAFLAGS@ COPY_LIBFILES_TO_BLDLIBDIR COPY_DATAFILES_TO_BLDDIR -CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-1.7.33.jar:"$BLDLIBDIR"/slf4j-simple-1.7.33.jar:"$TESTJARFILE"" +CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-2.0.6.jar:"$BLDLIBDIR"/slf4j-simple-2.0.6.jar:"$TESTJARFILE"" TEST=/usr/bin/test if [ ! -x /usr/bin/test ] diff --git a/java/examples/datasets/Makefile.am b/java/examples/datasets/Makefile.am index 8b71ced..d4bb666 100644 --- a/java/examples/datasets/Makefile.am +++ b/java/examples/datasets/Makefile.am @@ -27,7 +27,7 @@ classes: pkgpath = examples/datasets hdfjarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar -CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/slf4j-api-1.7.33.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-1.7.33.jar:$$CLASSPATH +CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/slf4j-api-2.0.6.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-2.0.6.jar:$$CLASSPATH jarfile = jar$(PACKAGE_TARNAME)datasets.jar diff --git a/java/examples/datatypes/JavaDatatypeExample.sh.in b/java/examples/datatypes/JavaDatatypeExample.sh.in index a82d883..fc4a627 100644 --- a/java/examples/datatypes/JavaDatatypeExample.sh.in +++ b/java/examples/datatypes/JavaDatatypeExample.sh.in @@ -55,8 +55,8 @@ $top_builddir/java/src/jni/.libs/libhdf5_java.* $top_builddir/java/src/$JARFILE " LIST_JAR_TESTFILES=" -$HDFLIB_HOME/slf4j-api-1.7.33.jar -$HDFLIB_HOME/ext/slf4j-simple-1.7.33.jar +$HDFLIB_HOME/slf4j-api-2.0.6.jar +$HDFLIB_HOME/ext/slf4j-simple-2.0.6.jar " LIST_DATA_FILES=" $HDFTEST_HOME/../testfiles/examples.datatypes.H5Ex_T_Array.txt @@ -218,7 +218,7 @@ JAVAEXEFLAGS=@H5_JAVAFLAGS@ COPY_LIBFILES_TO_BLDLIBDIR COPY_DATAFILES_TO_BLDDIR -CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-1.7.33.jar:"$BLDLIBDIR"/slf4j-simple-1.7.33.jar:"$TESTJARFILE"" +CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-2.0.6.jar:"$BLDLIBDIR"/slf4j-simple-2.0.6.jar:"$TESTJARFILE"" TEST=/usr/bin/test if [ ! -x /usr/bin/test ] diff --git a/java/examples/datatypes/Makefile.am b/java/examples/datatypes/Makefile.am index 55ff91f..12e5cb8 100644 --- a/java/examples/datatypes/Makefile.am +++ b/java/examples/datatypes/Makefile.am @@ -27,7 +27,7 @@ classes: pkgpath = examples/datatypes hdfjarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar -CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/slf4j-api-1.7.33.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-1.7.33.jar:$$CLASSPATH +CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/slf4j-api-2.0.6.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-2.0.6.jar:$$CLASSPATH jarfile = jar$(PACKAGE_TARNAME)datatypes.jar diff --git a/java/examples/groups/JavaGroupExample.sh.in b/java/examples/groups/JavaGroupExample.sh.in index 1b84ed3..4773579 100644 --- a/java/examples/groups/JavaGroupExample.sh.in +++ b/java/examples/groups/JavaGroupExample.sh.in @@ -57,8 +57,8 @@ $top_builddir/java/src/jni/.libs/libhdf5_java.* $top_builddir/java/src/$JARFILE " LIST_JAR_TESTFILES=" -$HDFLIB_HOME/slf4j-api-1.7.33.jar -$HDFLIB_HOME/ext/slf4j-simple-1.7.33.jar +$HDFLIB_HOME/slf4j-api-2.0.6.jar +$HDFLIB_HOME/ext/slf4j-simple-2.0.6.jar " LIST_ITER_FILES=" $HDFTEST_HOME/h5ex_g_iterate.h5 @@ -257,7 +257,7 @@ COPY_LIBFILES_TO_BLDLIBDIR COPY_DATAFILES_TO_BLDDIR COPY_ITERFILES_TO_BLDITERDIR -CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-1.7.33.jar:"$BLDLIBDIR"/slf4j-simple-1.7.33.jar:"$TESTJARFILE"" +CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-2.0.6.jar:"$BLDLIBDIR"/slf4j-simple-2.0.6.jar:"$TESTJARFILE"" TEST=/usr/bin/test if [ ! -x /usr/bin/test ] diff --git a/java/examples/groups/Makefile.am b/java/examples/groups/Makefile.am index c520860..a3fb774 100644 --- a/java/examples/groups/Makefile.am +++ b/java/examples/groups/Makefile.am @@ -27,7 +27,7 @@ classes: pkgpath = examples/groups hdfjarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar -CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/slf4j-api-1.7.33.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-1.7.33.jar:$$CLASSPATH +CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/slf4j-api-2.0.6.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-2.0.6.jar:$$CLASSPATH jarfile = jar$(PACKAGE_TARNAME)groups.jar diff --git a/java/examples/intro/JavaIntroExample.sh.in b/java/examples/intro/JavaIntroExample.sh.in index 41ed694..56b6e57 100644 --- a/java/examples/intro/JavaIntroExample.sh.in +++ b/java/examples/intro/JavaIntroExample.sh.in @@ -55,8 +55,8 @@ $top_builddir/java/src/jni/.libs/libhdf5_java.* $top_builddir/java/src/$JARFILE " LIST_JAR_TESTFILES=" -$HDFLIB_HOME/slf4j-api-1.7.33.jar -$HDFLIB_HOME/ext/slf4j-simple-1.7.33.jar +$HDFLIB_HOME/slf4j-api-2.0.6.jar +$HDFLIB_HOME/ext/slf4j-simple-2.0.6.jar " LIST_DATA_FILES=" $HDFTEST_HOME/../testfiles/examples.intro.H5_CreateDataset.txt @@ -207,7 +207,7 @@ JAVAEXEFLAGS=@H5_JAVAFLAGS@ COPY_LIBFILES_TO_BLDLIBDIR COPY_DATAFILES_TO_BLDDIR -CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-1.7.33.jar:"$BLDLIBDIR"/slf4j-simple-1.7.33.jar:"$TESTJARFILE"" +CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/slf4j-api-2.0.6.jar:"$BLDLIBDIR"/slf4j-simple-2.0.6.jar:"$TESTJARFILE"" TEST=/usr/bin/test if [ ! -x /usr/bin/test ] diff --git a/java/examples/intro/Makefile.am b/java/examples/intro/Makefile.am index 741f122..b6d6a1f 100644 --- a/java/examples/intro/Makefile.am +++ b/java/examples/intro/Makefile.am @@ -27,7 +27,7 @@ classes: pkgpath = examples/intro hdfjarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar -CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/slf4j-api-1.7.33.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-1.7.33.jar:$$CLASSPATH +CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/slf4j-api-2.0.6.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-2.0.6.jar:$$CLASSPATH jarfile = jar$(PACKAGE_TARNAME)intro.jar diff --git a/java/lib/ext/slf4j-nop-1.7.33.jar b/java/lib/ext/slf4j-nop-1.7.33.jar deleted file mode 100644 index aa8fc09..0000000 Binary files a/java/lib/ext/slf4j-nop-1.7.33.jar and /dev/null differ diff --git a/java/lib/ext/slf4j-nop-2.0.6.jar b/java/lib/ext/slf4j-nop-2.0.6.jar new file mode 100644 index 0000000..27740a5 Binary files /dev/null and b/java/lib/ext/slf4j-nop-2.0.6.jar differ diff --git a/java/lib/ext/slf4j-simple-1.7.33.jar b/java/lib/ext/slf4j-simple-1.7.33.jar deleted file mode 100644 index ebf4846..0000000 Binary files a/java/lib/ext/slf4j-simple-1.7.33.jar and /dev/null differ diff --git a/java/lib/ext/slf4j-simple-2.0.6.jar b/java/lib/ext/slf4j-simple-2.0.6.jar new file mode 100644 index 0000000..f8913c0 Binary files /dev/null and b/java/lib/ext/slf4j-simple-2.0.6.jar differ diff --git a/java/lib/slf4j-api-1.7.33.jar b/java/lib/slf4j-api-1.7.33.jar deleted file mode 100644 index db3730d..0000000 Binary files a/java/lib/slf4j-api-1.7.33.jar and /dev/null differ diff --git a/java/lib/slf4j-api-2.0.6.jar b/java/lib/slf4j-api-2.0.6.jar new file mode 100644 index 0000000..a2cb802 Binary files /dev/null and b/java/lib/slf4j-api-2.0.6.jar differ diff --git a/java/src/Makefile.am b/java/src/Makefile.am index 8820fd8..b36f8a1 100644 --- a/java/src/Makefile.am +++ b/java/src/Makefile.am @@ -36,7 +36,7 @@ jarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar hdf5_javadir = $(libdir) pkgpath = hdf/hdf5lib -CLASSPATH_ENV=CLASSPATH=.:$(top_srcdir)/java/lib/slf4j-api-1.7.33.jar:$$CLASSPATH +CLASSPATH_ENV=CLASSPATH=.:$(top_srcdir)/java/lib/slf4j-api-2.0.6.jar:$$CLASSPATH AM_JAVACFLAGS = $(H5_JAVACFLAGS) -deprecation @@ -109,26 +109,22 @@ hdf5_java_JAVA = \ ${pkgpath}/HDFArray.java \ ${pkgpath}/HDFNativeData.java -$(jarfile): classhdf5_java.stamp classes docs +$(jarfile): classhdf5_java.stamp classes $(JAR) cvf $@ -C $(JAVAROOT)/ $(pkgpath) hdf5_java_DATA = $(jarfile) -.PHONY: docs classes +.PHONY: classes WINDOWTITLE = 'HDF5 Java' DOCTITLE = '

HDF5 Java Wrapper

' SRCDIR = '$(pkgpath)' -docs: - $(JAVADOC) -sourcepath $(srcdir) -d javadoc -Xdoclint:none -use -splitIndex -windowtitle $(WINDOWTITLE) -doctitle $(DOCTITLE) -J-Xmx180m -verbose -overview $(top_srcdir)/java/src/hdf/overview.html -classpath $(CLASSPATH_ENV) hdf.hdf5lib - CLEANFILES = classhdf5_java.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/callbacks/*.class $(JAVAROOT)/$(pkgpath)/exceptions/*.class $(JAVAROOT)/$(pkgpath)/structs/*.class $(JAVAROOT)/$(pkgpath)/*.class clean: rm -rf $(JAVAROOT)/* rm -f $(jarfile) - rm -rf javadoc rm -f classhdf5_java.stamp diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 601dc3f..dc0df5a 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -55,6 +55,9 @@ import hdf.hdf5lib.structs.H5G_info_t; import hdf.hdf5lib.structs.H5L_info_t; import hdf.hdf5lib.structs.H5O_info_t; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * @page HDF5LIB HDF5 Java API Package * This class is the Java interface for the HDF5 library. @@ -255,7 +258,7 @@ public class H5 implements java.io.Serializable { */ private static final long serialVersionUID = 6129888282117053288L; - private final static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(H5.class); + private final static Logger log = LoggerFactory.getLogger(H5.class); /** * @ingroup JH5 diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt index 56a1ab8..1436092 100644 --- a/java/src/jni/CMakeLists.txt +++ b/java/src/jni/CMakeLists.txt @@ -104,7 +104,7 @@ if (HDF5_EXPORTED_TARGETS) ${HDF5_EXPORTED_TARGETS} LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries - RUNTIME DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT libraries FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT libraries INCLUDES DESTINATION include ) diff --git a/java/test/Makefile.am b/java/test/Makefile.am index a18ed93..f9f0ab8 100644 --- a/java/test/Makefile.am +++ b/java/test/Makefile.am @@ -27,7 +27,7 @@ classes: pkgpath = test hdfjarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar -CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/junit.jar:$(top_srcdir)/java/lib/hamcrest-core.jar:$(top_srcdir)/java/lib/slf4j-api-1.7.33.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-1.7.33.jar:$$CLASSPATH +CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/junit.jar:$(top_srcdir)/java/lib/hamcrest-core.jar:$(top_srcdir)/java/lib/slf4j-api-2.0.6.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-2.0.6.jar:$$CLASSPATH jarfile = jar$(PACKAGE_TARNAME)test.jar diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index 9f5334c..a407c5c 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -67,8 +67,8 @@ $top_builddir/java/src/jni/.libs/libhdf5_java.* LIST_JAR_TESTFILES=" $HDFLIB_HOME/hamcrest-core.jar $HDFLIB_HOME/junit.jar -$HDFLIB_HOME/slf4j-api-1.7.33.jar -$HDFLIB_HOME/ext/slf4j-simple-1.7.33.jar +$HDFLIB_HOME/slf4j-api-2.0.6.jar +$HDFLIB_HOME/ext/slf4j-simple-2.0.6.jar " LIST_JAR_FILES=" $top_builddir/java/src/$JARFILE @@ -299,7 +299,7 @@ JAVAEXEFLAGS=@H5_JAVAFLAGS@ COPY_LIBFILES_TO_BLDLIBDIR COPY_DATAFILES_TO_BLDDIR -CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/junit.jar:"$BLDLIBDIR"/hamcrest-core.jar:"$BLDLIBDIR"/slf4j-api-1.7.33.jar:"$BLDLIBDIR"/slf4j-simple-1.7.33.jar:"$TESTJARFILE"" +CPATH=".:"$BLDLIBDIR"/"$JARFILE":"$BLDLIBDIR"/junit.jar:"$BLDLIBDIR"/hamcrest-core.jar:"$BLDLIBDIR"/slf4j-api-2.0.6.jar:"$BLDLIBDIR"/slf4j-simple-2.0.6.jar:"$TESTJARFILE"" TEST=/usr/bin/test if [ ! -x /usr/bin/test ] -- cgit v0.12