From c54c02b3e0fa81f4f9bf37afb79bb620af61b0f5 Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Mon, 18 Mar 2024 13:21:54 -0500 Subject: [PATCH] Correct the URL for registered filters (#91) --- .github/workflows/cmake-ctest.yml | 91 +++++++---- .github/workflows/daily-build.yml | 6 +- .github/workflows/release-files.yml | 46 +++--- .github/workflows/release.yml | 5 +- .github/workflows/tarball.yml | 6 +- BLOSC/config/cmake/HDFMacros.cmake | 77 ++++----- BLOSC/config/cmake/HDFPluginMacros.cmake | 143 +++++++---------- .../cmake/binex/config/cmake/HDFMacros.cmake | 79 +++++----- .../binex/config/cmake/HDFPluginMacros.cmake | 66 ++++---- .../config/cmake/binex/example/h5ex_d_blosc.c | 2 +- .../binex/example/testfiles/h5ex_d_blosc.ddl | 2 +- .../binex/example/testfiles/h5ex_d_blosc.tst | 2 +- .../h5repack_layout.h5-ud_convert.ddl | 14 +- BLOSC/example/h5ex_d_blosc.c | 2 +- BLOSC/example/testfiles/h5ex_d_blosc.ddl | 2 +- BLOSC/example/testfiles/h5ex_d_blosc.tst | 2 +- .../h5repack_layout.h5-ud_convert.ddl | 14 +- .../h5repack_layout.h5-ud_convert_lz.ddl | 14 +- .../h5repack_layout.h5-ud_convert_lz4.ddl | 14 +- .../h5repack_layout.h5-ud_convert_lz4hc.ddl | 14 +- .../h5repack_layout.h5-ud_convert_zlib.ddl | 14 +- .../h5repack_layout.h5-ud_convert_zstd.ddl | 14 +- BLOSC/src/H5Zblosc.c | 2 +- BSHUF/config/cmake/HDFMacros.cmake | 77 ++++----- BSHUF/config/cmake/HDFPluginMacros.cmake | 149 ++++++++---------- .../cmake/binex/config/cmake/HDFMacros.cmake | 79 +++++----- .../binex/config/cmake/HDFPluginMacros.cmake | 66 ++++---- .../config/cmake/binex/example/h5ex_d_bshuf.c | 2 +- BSHUF/example/h5ex_d_bshuf.c | 2 +- BZIP2/config/cmake/HDFMacros.cmake | 77 ++++----- BZIP2/config/cmake/HDFPluginMacros.cmake | 149 ++++++++---------- .../cmake/binex/config/cmake/HDFMacros.cmake | 79 +++++----- .../binex/config/cmake/HDFPluginMacros.cmake | 66 ++++---- .../config/cmake/binex/example/h5ex_d_bzip2.c | 2 +- .../binex/example/testfiles/h5ex_d_bzip2.ddl | 2 +- .../binex/example/testfiles/h5ex_d_bzip2.tst | 2 +- .../h5repack_layout.h5-ud_convert.ddl | 14 +- BZIP2/example/h5ex_d_bzip2.c | 2 +- BZIP2/example/testfiles/h5ex_d_bzip2.ddl | 2 +- BZIP2/example/testfiles/h5ex_d_bzip2.tst | 2 +- .../h5repack_layout.h5-ud_convert.ddl | 14 +- BZIP2/src/H5Zbzip2.c | 4 +- JPEG/config/cmake/HDFMacros.cmake | 81 +++++----- JPEG/config/cmake/HDFPluginMacros.cmake | 149 ++++++++---------- .../cmake/binex/config/cmake/HDFMacros.cmake | 79 +++++----- .../binex/config/cmake/HDFPluginMacros.cmake | 66 ++++---- JPEG/config/cmake/binex/example/h5ex_d_jpeg.c | 2 +- .../binex/example/testfiles/h5ex_d_jpeg.ddl | 2 +- .../binex/example/testfiles/h5ex_d_jpeg.tst | 2 +- .../h5repack_layout.h5-ud_convert.ddl | 14 +- JPEG/example/h5ex_d_jpeg.c | 2 +- JPEG/example/testfiles/h5ex_d_jpeg.ddl | 2 +- JPEG/example/testfiles/h5ex_d_jpeg.tst | 2 +- JPEG/src/H5Zjpeg.c | 2 +- LZ4/config/cmake/HDFMacros.cmake | 77 ++++----- LZ4/config/cmake/HDFPluginMacros.cmake | 149 ++++++++---------- .../cmake/binex/config/cmake/HDFMacros.cmake | 79 +++++----- .../binex/config/cmake/HDFPluginMacros.cmake | 66 ++++---- LZ4/config/cmake/binex/example/h5ex_d_lz4.c | 2 +- .../binex/example/testfiles/h5ex_d_lz4.ddl | 2 +- .../binex/example/testfiles/h5ex_d_lz4.tst | 2 +- .../h5repack_layout.h5-ud_convert.ddl | 14 +- LZ4/example/h5ex_d_lz4.c | 2 +- LZ4/example/testfiles/h5ex_d_lz4.ddl | 2 +- LZ4/example/testfiles/h5ex_d_lz4.tst | 2 +- .../h5repack_layout.h5-ud_convert.ddl | 14 +- LZ4/src/H5Zlz4.c | 2 +- LZF/config/cmake/HDFMacros.cmake | 77 ++++----- LZF/config/cmake/HDFPluginMacros.cmake | 149 ++++++++---------- .../cmake/binex/config/cmake/HDFMacros.cmake | 79 +++++----- .../binex/config/cmake/HDFPluginMacros.cmake | 66 ++++---- LZF/config/cmake/binex/example/h5ex_d_lzf.c | 2 +- .../binex/example/testfiles/h5ex_d_lzf.ddl | 2 +- .../binex/example/testfiles/h5ex_d_lzf.tst | 2 +- .../h5repack_layout.h5-ud_convert.ddl | 14 +- LZF/example/h5ex_d_lzf.c | 2 +- LZF/example/testfiles/h5ex_d_lzf.ddl | 2 +- LZF/example/testfiles/h5ex_d_lzf.tst | 2 +- .../h5repack_layout.h5-ud_convert.ddl | 14 +- LZF/src/H5Zlzf.c | 4 +- MAFISC/config/cmake/HDFMacros.cmake | 77 ++++----- MAFISC/config/cmake/HDFPluginMacros.cmake | 149 ++++++++---------- .../cmake/binex/config/cmake/HDFMacros.cmake | 79 +++++----- .../binex/config/cmake/HDFPluginMacros.cmake | 66 ++++---- .../cmake/binex/example/h5ex_d_mafisc.c | 2 +- MAFISC/example/h5ex_d_mafisc.c | 2 +- SZ/config/cmake/HDFMacros.cmake | 77 ++++----- SZ/config/cmake/HDFPluginMacros.cmake | 149 ++++++++---------- .../cmake/binex/config/cmake/HDFMacros.cmake | 79 +++++----- .../binex/config/cmake/HDFPluginMacros.cmake | 66 ++++---- SZ/config/cmake/binex/example/h5ex_d_sz.c | 2 +- SZ/example/h5ex_d_sz.c | 2 +- SZ/src/H5Zszf.c | 2 +- ZFP/config/cmake/HDFMacros.cmake | 77 ++++----- ZFP/config/cmake/HDFPluginMacros.cmake | 149 ++++++++---------- .../cmake/binex/config/cmake/HDFMacros.cmake | 79 +++++----- .../binex/config/cmake/HDFPluginMacros.cmake | 66 ++++---- ZFP/config/cmake/binex/example/h5ex_d_zfp.c | 2 +- ZFP/example/h5ex_d_zfp.c | 2 +- ZSTD/config/cmake/HDFMacros.cmake | 77 ++++----- ZSTD/config/cmake/HDFPluginMacros.cmake | 149 ++++++++---------- .../cmake/binex/config/cmake/HDFMacros.cmake | 79 +++++----- .../binex/config/cmake/HDFPluginMacros.cmake | 66 ++++---- ZSTD/config/cmake/binex/example/h5ex_d_zstd.c | 2 +- .../binex/example/testfiles/h5ex_d_zstd.ddl | 2 +- .../binex/example/testfiles/h5ex_d_zstd.tst | 2 +- .../h5repack_layout.h5-ud_convert.ddl | 14 +- ZSTD/example/h5ex_d_zstd.c | 2 +- ZSTD/example/testfiles/h5ex_d_zstd.ddl | 2 +- ZSTD/example/testfiles/h5ex_d_zstd.tst | 2 +- ZSTD/src/H5Zzstd.c | 2 +- config/cmake/HDFMacros.cmake | 77 ++++----- config/cmake/HDFPluginMacros.cmake | 95 +++++------ .../cmake/binex/config/cmake/HDFMacros.cmake | 79 +++++----- .../binex/config/cmake/HDFPluginMacros.cmake | 66 ++++---- config/cmake/binex/example/h5ex_d_blosc.c | 2 +- config/cmake/binex/example/h5ex_d_bshuf.c | 2 +- config/cmake/binex/example/h5ex_d_bzip2.c | 2 +- config/cmake/binex/example/h5ex_d_jpeg.c | 2 +- config/cmake/binex/example/h5ex_d_lz4.c | 2 +- config/cmake/binex/example/h5ex_d_lzf.c | 2 +- config/cmake/binex/example/h5ex_d_mafisc.c | 2 +- config/cmake/binex/example/h5ex_d_pl.c | 2 +- config/cmake/binex/example/h5ex_d_sz.c | 2 +- config/cmake/binex/example/h5ex_d_zfp.c | 2 +- config/cmake/binex/example/h5ex_d_zstd.c | 2 +- .../binex/example/testfiles/h5ex_d_blosc.ddl | 2 +- .../binex/example/testfiles/h5ex_d_blosc.tst | 2 +- .../binex/example/testfiles/h5ex_d_bzip2.ddl | 2 +- .../binex/example/testfiles/h5ex_d_bzip2.tst | 2 +- .../binex/example/testfiles/h5ex_d_jpeg.ddl | 2 +- .../binex/example/testfiles/h5ex_d_jpeg.tst | 2 +- .../binex/example/testfiles/h5ex_d_lz4.ddl | 2 +- .../binex/example/testfiles/h5ex_d_lz4.tst | 2 +- .../binex/example/testfiles/h5ex_d_lzf.ddl | 2 +- .../binex/example/testfiles/h5ex_d_lzf.tst | 2 +- .../binex/example/testfiles/h5ex_d_pl.ddl | 2 +- .../binex/example/testfiles/h5ex_d_pl.tst | 2 +- .../binex/example/testfiles/h5ex_d_zstd.ddl | 2 +- .../binex/example/testfiles/h5ex_d_zstd.tst | 2 +- .../h5repack_layout.h5-ud_convert.ddl | 2 +- ...h5repack_layout.h5-ud_pl_blosc_convert.ddl | 4 +- .../h5repack_layout.h5-ud_pl_bz2_convert.ddl | 2 +- .../h5repack_layout.h5-ud_pl_convert.ddl | 6 +- .../h5repack_layout.h5-ud_pl_lz4_convert.ddl | 6 +- docs/PluginLibraries.txt | 2 +- 146 files changed, 2197 insertions(+), 2370 deletions(-) diff --git a/.github/workflows/cmake-ctest.yml b/.github/workflows/cmake-ctest.yml index eac10606..36b6e4f6 100644 --- a/.github/workflows/cmake-ctest.yml +++ b/.github/workflows/cmake-ctest.yml @@ -1,6 +1,6 @@ name: hdf5 plugins ctest runs -# Controls when the action will run. Triggers the workflow on a schedule +# Controls when the action will run. Triggers the workflow on a call on: workflow_call: inputs: @@ -12,6 +12,10 @@ on: description: "The common base name of the source tarballs" required: true type: string + preset_name: + description: "The common base name of the preset configuration name to control the build" + required: true + type: string use_environ: description: 'Environment to locate files' type: string @@ -21,8 +25,6 @@ on: permissions: contents: read -# A workflow run is made up of one or more jobs that can run sequentially or -# in parallel jobs: build_and_test_win: # Windows w/ MSVC + CMake @@ -44,7 +46,7 @@ jobs: with: repo: 'HDFGroup/hdf5' version: 'tags/snapshot' - file: '${{ inputs.use_hdf }}-win_vs2022.zip' + file: '${{ inputs.use_hdf }}-win-vs2022_cl.zip' - name: Get hdf5 release if: ${{ (inputs.use_environ == 'release') }} @@ -52,10 +54,10 @@ jobs: with: repo: 'HDFGroup/hdf5' version: 'tags/${{ inputs.use_hdf }}' - file: '${{ inputs.use_hdf }}-win_vs2022.zip' + file: '${{ inputs.use_hdf }}-win-vs2022_cl.zip' - name: Uncompress gh binary (Win) - run: 7z x ${{ github.workspace }}/${{ inputs.use_hdf }}-win_vs2022.zip + run: 7z x ${{ github.workspace }}/${{ inputs.use_hdf }}-win-vs2022_cl.zip - name: Uncompress hdf5 binary (Win) working-directory: ${{ github.workspace }}/hdf5 @@ -92,11 +94,18 @@ jobs: run: | FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT + if [[ '${{ inputs.use_environ }}' == 'snapshots' ]] + then + SOURCE_NAME_BASE=$(echo "hdfsrc") + else + SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE") + fi + echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT shell: bash # Get files created by release script - name: Get zip-tarball (Windows) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: zip-tarball path: ${{ github.workspace }} @@ -120,8 +129,8 @@ jobs: env: HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }} run: | - cd "${{ runner.workspace }}/hdf5_plugins/hdfsrc" - cmake --workflow --preset=ci-StdShar-MSVC --fresh + cd "${{ runner.workspace }}/hdf5_plugins/${{ steps.set-file-base.outputs.SOURCE_BASE }}" + cmake --workflow --preset=${{ inputs.preset_name }}-MSVC --fresh shell: bash - name: Publish binary (Windows) @@ -129,11 +138,11 @@ jobs: run: | mkdir "${{ runner.workspace }}/build" mkdir "${{ runner.workspace }}/build/hdf5_plugins" - Copy-Item -Path ${{ runner.workspace }}/hdf5_plugins/hdfsrc/COPYING -Destination ${{ runner.workspace }}/build/hdf5_plugins/ + Copy-Item -Path ${{ runner.workspace }}/hdf5_plugins/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING -Destination ${{ runner.workspace }}/build/hdf5_plugins/ Copy-Item -Path ${{ runner.workspace }}/hdf5_plugins/hdfsrc/README.md -Destination ${{ runner.workspace }}/build/hdf5_plugins/ - Copy-Item -Path ${{ runner.workspace }}/hdf5_plugins/build/ci-StdShar-MSVC/* -Destination ${{ runner.workspace }}/build/hdf5_plugins/ -Include *.zip + Copy-Item -Path ${{ runner.workspace }}/hdf5_plugins/build/${{ inputs.preset_name }}-MSVC/* -Destination ${{ runner.workspace }}/build/hdf5_plugins/ -Include *.zip cd "${{ runner.workspace }}/build" - 7z a -tzip ${{ steps.set-file-base.outputs.FILE_BASE }}-win_vs2022.zip hdf5_plugins + 7z a -tzip ${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip hdf5_plugins shell: pwsh - name: List files in the space (Windows) @@ -144,10 +153,10 @@ jobs: # Save files created by ctest script - name: Save published binary (Windows) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: zip-vs2022-binary - path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-win_vs2022.zip + name: zip-vs2022_cl-binary + path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` build_and_test_linux: @@ -167,7 +176,7 @@ jobs: with: repo: 'HDFGroup/hdf5' version: 'tags/snapshot' - file: '${{ inputs.use_hdf }}-ubuntu-2204.tar.gz' + file: '${{ inputs.use_hdf }}-ubuntu-2204_gcc.tar.gz' - name: Get hdf5 release if: ${{ (inputs.use_environ == 'release') }} @@ -175,7 +184,7 @@ jobs: with: repo: 'HDFGroup/hdf5' version: 'tags/${{ inputs.use_hdf }}' - file: '${{ inputs.use_hdf }}-ubuntu-2204.tar.gz' + file: '${{ inputs.use_hdf }}-ubuntu-2204_gcc.tar.gz' - name: List files for the space (Linux) run: | @@ -183,7 +192,7 @@ jobs: ls ${{ runner.workspace }} - name: Uncompress gh binary (Linux) - run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf }}-ubuntu-2204.tar.gz + run: tar -zxvf ${{ github.workspace }}/${{ inputs.use_hdf }}-ubuntu-2204_gcc.tar.gz - name: Uncompress hdf5 binary (Linux) run: | @@ -206,10 +215,17 @@ jobs: run: | FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT + if [[ '${{ inputs.use_environ }}' == 'snapshots' ]] + then + SOURCE_NAME_BASE=$(echo "hdfsrc") + else + SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE") + fi + echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT # Get files created by release script - name: Get tgz-tarball (Linux) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tgz-tarball path: ${{ github.workspace }} @@ -226,8 +242,8 @@ jobs: env: HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }} run: | - cd "${{ runner.workspace }}/hdf5_plugins/hdfsrc" - cmake --workflow --preset=ci-StdShar-GNUC --fresh + cd "${{ runner.workspace }}/hdf5_plugins/${{ steps.set-file-base.outputs.SOURCE_BASE }}" + cmake --workflow --preset=${{ inputs.preset_name }}-GNUC --fresh shell: bash - name: Publish binary (Linux) @@ -235,11 +251,11 @@ jobs: run: | mkdir "${{ runner.workspace }}/build" mkdir "${{ runner.workspace }}/build/hdf5_plugins" - cp ${{ runner.workspace }}/hdf5_plugins/hdfsrc/COPYING ${{ runner.workspace }}/build/hdf5_plugins + cp ${{ runner.workspace }}/hdf5_plugins/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING ${{ runner.workspace }}/build/hdf5_plugins cp ${{ runner.workspace }}/hdf5_plugins/hdfsrc/README.md ${{ runner.workspace }}/build/hdf5_plugins - cp ${{ runner.workspace }}/hdf5_plugins/build/ci-StdShar-GNUC/*.tar.gz ${{ runner.workspace }}/build/hdf5_plugins + cp ${{ runner.workspace }}/hdf5_plugins/build/${{ inputs.preset_name }}-GNUC/*.tar.gz ${{ runner.workspace }}/build/hdf5_plugins cd "${{ runner.workspace }}/build" - tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204.tar.gz hdf5_plugins + tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz hdf5_plugins shell: bash - name: List files in the space (Linux) @@ -249,10 +265,10 @@ jobs: # Save files created by ctest script - name: Save published binary (Linux) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: tgz-ubuntu-2204-binary - path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204.tar.gz + name: tgz-ubuntu-2204_gcc-binary + path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` build_and_test_mac: @@ -311,10 +327,17 @@ jobs: run: | FILE_NAME_BASE=$(echo "${{ inputs.file_base }}") echo "FILE_BASE=$FILE_NAME_BASE" >> $GITHUB_OUTPUT + if [[ '${{ inputs.use_environ }}' == 'snapshots' ]] + then + SOURCE_NAME_BASE=$(echo "hdfsrc") + else + SOURCE_NAME_BASE=$(echo "$FILE_NAME_BASE") + fi + echo "SOURCE_BASE=$SOURCE_NAME_BASE" >> $GITHUB_OUTPUT # Get files created by release script - name: Get tgz-tarball (MacOS) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tgz-tarball path: ${{ github.workspace }} @@ -326,14 +349,14 @@ jobs: - name: Uncompress source (MacOS) run: tar -zxvf ${{ github.workspace }}/${{ steps.set-file-base.outputs.FILE_BASE }}.tar.gz - + - name: Run ctest (MacOS) id: run-ctest env: HDF5_ROOT: ${{ steps.set-hdf5lib-name.outputs.HDF5_ROOT }} run: | - cd "${{ runner.workspace }}/hdf5_plugins/hdfsrc" - cmake --workflow --preset=ci-StdShar-Clang --fresh + cd "${{ runner.workspace }}/hdf5_plugins/${{ steps.set-file-base.outputs.SOURCE_BASE }}" + cmake --workflow --preset=${{ inputs.preset_name }}-Clang --fresh shell: bash - name: Publish binary (MacOS) @@ -341,9 +364,9 @@ jobs: run: | mkdir "${{ runner.workspace }}/build" mkdir "${{ runner.workspace }}/build/hdf5_plugins" - cp ${{ runner.workspace }}/hdf5_plugins/hdfsrc/COPYING ${{ runner.workspace }}/build/hdf5_plugins + cp ${{ runner.workspace }}/hdf5_plugins/${{ steps.set-file-base.outputs.SOURCE_BASE }}/COPYING ${{ runner.workspace }}/build/hdf5_plugins cp ${{ runner.workspace }}/hdf5_plugins/hdfsrc/README.md ${{ runner.workspace }}/build/hdf5_plugins - cp ${{ runner.workspace }}/hdf5_plugins/build/ci-StdShar-Clang/*.tar.gz ${{ runner.workspace }}/build/hdf5_plugins + cp ${{ runner.workspace }}/hdf5_plugins/build/${{ inputs.preset_name }}-Clang/*.tar.gz ${{ runner.workspace }}/build/hdf5_plugins cd "${{ runner.workspace }}/build" tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-osx12.tar.gz hdf5_plugins shell: bash @@ -355,7 +378,7 @@ jobs: # Save files created by ctest script - name: Save published binary (MacOS) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: tgz-osx12-binary path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-osx12.tar.gz diff --git a/.github/workflows/daily-build.yml b/.github/workflows/daily-build.yml index 682b191e..97623b20 100644 --- a/.github/workflows/daily-build.yml +++ b/.github/workflows/daily-build.yml @@ -1,6 +1,5 @@ name: hdf5 plugins daily build -# Controls when the action will run. Triggers the workflow on a schedule on: workflow_dispatch: inputs: @@ -14,8 +13,6 @@ on: type: string required: false default: snapshots -# push: -# branches: [ "master" ] pull_request: branches: [ "master" ] @@ -33,7 +30,7 @@ jobs: run-environ: ${{ steps.getinputs.outputs.INPUTS_ENVIRON }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4.1.1 - name: Get hdf5 release base name uses: dsaltares/fetch-gh-release-asset@master @@ -70,6 +67,7 @@ jobs: uses: ./.github/workflows/cmake-ctest.yml with: file_base: ${{ needs.call-workflow-tarball.outputs.file_base }} + preset_name: ci-StdShar use_hdf: ${{ needs.get-base-names.outputs.hdf5-name }} use_environ: ${{ needs.get-base-names.outputs.run-environ }} if: ${{ ((needs.get-base-names.outputs.run-environ == 'snapshots') && ((needs.call-workflow-tarball.outputs.has_changes == 'true') || (needs.get-base-names.outputs.run-ignore == 'ignore'))) || (needs.get-base-names.outputs.run-environ == 'release') }} diff --git a/.github/workflows/release-files.yml b/.github/workflows/release-files.yml index 5d21aff0..ad0a5ac5 100644 --- a/.github/workflows/release-files.yml +++ b/.github/workflows/release-files.yml @@ -40,7 +40,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Get Sources - uses: actions/checkout@v4 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: fetch-depth: 0 @@ -49,7 +49,7 @@ jobs: run: | git checkout ${{ inputs.file_sha }} - - uses: rickstaa/action-create-tag@v1 + - uses: rickstaa/action-create-tag@a1c7777fcb2fee4f19b0f283ba888afa11678b72 # v1.7.2 id: "tag_create" with: commit_sha: ${{ inputs.file_sha }} @@ -77,45 +77,51 @@ jobs: # Get files created by tarball script - name: Get tgz-tarball (Linux) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tgz-tarball path: ${{ github.workspace }} - name: Get zip-tarball (Windows) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: zip-tarball path: ${{ github.workspace }} # Get files created by cmake-ctest script - name: Get published binary (Windows) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: - name: zip-vs2022-binary + name: zip-vs2022_cl-binary path: ${{ github.workspace }} - name: Get published binary (MacOS) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: name: tgz-osx12-binary path: ${{ github.workspace }} - name: Get published binary (Linux) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 with: - name: tgz-ubuntu-2204-binary + name: tgz-ubuntu-2204_gcc-binary path: ${{ github.workspace }} + - name: Create sha256 sums for files + run: | + sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz >> sha256sums.txt + sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.zip >> sha256sums.txt + sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-osx12.tar.gz >> sha256sums.txt + sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz >> sha256sums.txt + sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_cl.zip >> sha256sums.txt + - name: Store snapshot name - if: ${{ (inputs.use_environ == 'snapshots') }} run: | echo "${{ steps.get-file-base.outputs.FILE_BASE }}" > ./last-file.txt - name: PreRelease tag id: create_prerelease - if: ${{ (inputs.use_environ == 'snapshots') }} - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 with: tag_name: "${{ inputs.use_tag }}" prerelease: true @@ -128,22 +134,6 @@ jobs: ${{ steps.get-file-base.outputs.FILE_BASE }}-win_vs2022.zip if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - - name: Release tag - id: create_release - if: ${{ (inputs.use_environ == 'release') }} - uses: softprops/action-gh-release@v1 - with: - tag_name: "${{ inputs.use_tag }}" - prerelease: false - #body_path: ${{ github.workspace }}-CHANGELOG.txt - files: | - ${{ inputs.file_branch }}.tar.gz - ${{ inputs.file_branch }}.zip - ${{ inputs.file_branch }}-osx12.tar.gz - ${{ inputs.file_branch }}-ubuntu-2204.tar.gz - ${{ inputs.file_branch }}-win_vs2022.zip - if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - - name: List files for the space (Linux) run: | ls -l ${{ github.workspace }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b58f640..c33861e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,14 +67,14 @@ jobs: # Save files created by release script - name: Save tgz-tarball - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: tgz-tarball path: ${{ steps.set-file-base.outputs.FILE_BASE }}.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - name: Save zip-tarball - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: zip-tarball path: ${{ steps.set-file-base.outputs.FILE_BASE }}.zip @@ -85,6 +85,7 @@ jobs: uses: ./.github/workflows/cmake-ctest.yml with: use_hdf: ${{ needs.log-the-inputs.outputs.rel_tag }} + preset_name: ci-StdShar file_base: ${{ needs.create-files-ctest.outputs.file_base }} use_environ: release diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index a6546720..85f8b90a 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -83,7 +83,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Get Sources - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.1 with: path: hdfsrc @@ -124,14 +124,14 @@ jobs: # Save files created by release script - name: Save tgz-tarball - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: tgz-tarball path: ${{ steps.set-file-base.outputs.FILE_BASE }}.tar.gz if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` - name: Save zip-tarball - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: zip-tarball path: ${{ steps.set-file-base.outputs.FILE_BASE }}.zip diff --git a/BLOSC/config/cmake/HDFMacros.cmake b/BLOSC/config/cmake/HDFMacros.cmake index 0cf9f192..ec2113ad 100644 --- a/BLOSC/config/cmake/HDFMacros.cmake +++ b/BLOSC/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,7 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) include (FetchContent) endmacro () @@ -508,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/BLOSC/config/cmake/HDFPluginMacros.cmake b/BLOSC/config/cmake/HDFPluginMacros.cmake index 58d9043b..b33268e1 100644 --- a/BLOSC/config/cmake/HDFPluginMacros.cmake +++ b/BLOSC/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) string (TOUPPER ${varname} PLUGIN_PACKAGE_VARNAME) @@ -105,32 +106,7 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Setup output Directories #----------------------------------------------------------------------------- - if (NOT ${PLUGIN_PACKAGE_NAME}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${PLUGIN_PACKAGE_NAME}) #----------------------------------------------------------------------------- # Targets built within this project are exported at Install time for use @@ -154,6 +130,8 @@ macro (BASIC_SETTINGS varname) set (LIB_TYPE SHARED) add_definitions (-D${PLUGIN_PACKAGE_NAME}_BUILT_AS_DYNAMIC_LIB) + set (CMAKE_POSITION_INDEPENDENT_CODE ON) + if (MSVC) set (CMAKE_MFC_FLAG 0) endif () @@ -161,9 +139,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -171,7 +153,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -182,11 +164,11 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () - option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" OFF) + option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" ${DISABLE_H5PL_ENCODER}) if (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER) set (FILTER_DECODE_ONLY 1) endif () @@ -217,26 +199,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -271,17 +233,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -299,21 +276,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () @@ -437,7 +414,12 @@ macro (INSTALL_SUPPORT varname) set (CPACK_RESOURCE_FILE_README "${CMAKE_BINARY_DIR}/README.txt") set (CPACK_PACKAGE_RELOCATABLE TRUE) set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PLUGIN_NAME} Installation") - set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + if (H5PL_OVERRIDE_VERSION) + string(TOUPPER ${HDF5_PACKAGE_NAME} PLUGIN_HDF5_PACKAGE_NAME) + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${PLUGIN_HDF5_PACKAGE_NAME}/${H5PL_OVERRIDE_VERSION}") + else () + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + endif () set (CPACK_GENERATOR "TGZ") if (WIN32) @@ -470,13 +452,14 @@ macro (INSTALL_SUPPORT varname) endif () # WiX variables set (CPACK_WIX_UNINSTALL "1") - set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/COPYING.txt") +# set (CPACK_WIX_PRODUCT_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}\\\\${PLUGIN_PACKAGE_NAME}.ico") elseif (APPLE) list (APPEND CPACK_GENERATOR "STGZ") list (APPEND CPACK_GENERATOR "DragNDrop") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") -# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5blosc.gif") +# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5pl.gif") option (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE "Package the ${PLUGIN_PACKAGE_NAME} Library in a Bundle" OFF) if (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE) @@ -484,7 +467,7 @@ macro (INSTALL_SUPPORT varname) set (CPACK_BUNDLE_NAME "${${PLUGIN_PACKAGE_NAME}_PACKAGE_STRING}") set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") -# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5BLOSC.icns") +# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5PL.icns") # set (CPACK_BUNDLE_PLIST "${${PLUGIN_PACKAGE_NAME}_BINARY_DIR}/CMakeFiles/Info.plist") set (CPACK_APPLE_GUI_INFO_STRING "${PLUGIN_PACKAGE_NAME} Plugin Library") set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © ???. All rights reserved.") @@ -527,31 +510,23 @@ macro (INSTALL_SUPPORT varname) set (CPACK_RPM_PACKAGE_RELOCATABLE ON) endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") - else () - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};libraries;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};headers;/") - endif () - + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") set (CPACK_ALL_INSTALL_TYPES Full User) set (CPACK_INSTALL_TYPE_FULL_DISPLAY_NAME "Everything") endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - include (CPack) + include (CPack) - cpack_add_component_group(Runtime) + cpack_add_component_group(Runtime) - cpack_add_component (libraries - DISPLAY_NAME "${PLUGIN_NAME} Libraries" - GROUP Runtime - ) - cpack_add_component_group(hdfdocuments - DISPLAY_NAME "${PLUGIN_NAME} Documents" - GROUP Documents - INSTALL_TYPES Full User - ) - endif () + cpack_add_component (libraries + DISPLAY_NAME "${PLUGIN_NAME} Libraries" + GROUP Runtime + ) + cpack_add_component_group(hdfdocuments + DISPLAY_NAME "${PLUGIN_NAME} Documents" + GROUP Documents + INSTALL_TYPES Full User + ) endif () endmacro () diff --git a/BLOSC/config/cmake/binex/config/cmake/HDFMacros.cmake b/BLOSC/config/cmake/binex/config/cmake/HDFMacros.cmake index 5e63ec23..ec2113ad 100644 --- a/BLOSC/config/cmake/binex/config/cmake/HDFMacros.cmake +++ b/BLOSC/config/cmake/binex/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,9 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) + + include (FetchContent) endmacro () macro (ADD_H5_FLAGS h5_flag_var infile) @@ -506,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/BLOSC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/BLOSC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index 46ef02f9..d2fdb5dd 100644 --- a/BLOSC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/BLOSC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- @@ -85,9 +86,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -95,7 +100,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -136,7 +141,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () @@ -164,26 +169,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -218,17 +203,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -246,21 +246,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () diff --git a/BLOSC/config/cmake/binex/example/h5ex_d_blosc.c b/BLOSC/config/cmake/binex/example/h5ex_d_blosc.c index 4eb637ba..b9823c92 100644 --- a/BLOSC/config/cmake/binex/example/h5ex_d_blosc.c +++ b/BLOSC/config/cmake/binex/example/h5ex_d_blosc.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 7; /* number of elements in cd_values */ diff --git a/BLOSC/config/cmake/binex/example/testfiles/h5ex_d_blosc.ddl b/BLOSC/config/cmake/binex/example/testfiles/h5ex_d_blosc.ddl index 324fa1df..df1a8760 100644 --- a/BLOSC/config/cmake/binex/example/testfiles/h5ex_d_blosc.ddl +++ b/BLOSC/config/cmake/binex/example/testfiles/h5ex_d_blosc.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 128 4 1 2 } } } diff --git a/BLOSC/config/cmake/binex/example/testfiles/h5ex_d_blosc.tst b/BLOSC/config/cmake/binex/example/testfiles/h5ex_d_blosc.tst index ace1975e..ba671c62 100644 --- a/BLOSC/config/cmake/binex/example/testfiles/h5ex_d_blosc.tst +++ b/BLOSC/config/cmake/binex/example/testfiles/h5ex_d_blosc.tst @@ -5,7 +5,7 @@ blosc filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 32001 Number of parameters is 7 with the value 4 1 2 - To find more about the filter check HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading blosc compressed data ................ Maximum value in DS1 is 1890 blosc filter is available now since H5Dread triggered loading of the filter. diff --git a/BLOSC/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl b/BLOSC/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl index c8cfadac..7da3e917 100644 --- a/BLOSC/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl +++ b/BLOSC/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 } } } @@ -76,7 +76,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 } } } @@ -98,7 +98,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 800 } } } @@ -120,7 +120,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 } } } @@ -142,7 +142,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 } } } diff --git a/BLOSC/example/h5ex_d_blosc.c b/BLOSC/example/h5ex_d_blosc.c index 4eb637ba..b9823c92 100644 --- a/BLOSC/example/h5ex_d_blosc.c +++ b/BLOSC/example/h5ex_d_blosc.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 7; /* number of elements in cd_values */ diff --git a/BLOSC/example/testfiles/h5ex_d_blosc.ddl b/BLOSC/example/testfiles/h5ex_d_blosc.ddl index 324fa1df..df1a8760 100644 --- a/BLOSC/example/testfiles/h5ex_d_blosc.ddl +++ b/BLOSC/example/testfiles/h5ex_d_blosc.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 128 4 1 2 } } } diff --git a/BLOSC/example/testfiles/h5ex_d_blosc.tst b/BLOSC/example/testfiles/h5ex_d_blosc.tst index ace1975e..ba671c62 100644 --- a/BLOSC/example/testfiles/h5ex_d_blosc.tst +++ b/BLOSC/example/testfiles/h5ex_d_blosc.tst @@ -5,7 +5,7 @@ blosc filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 32001 Number of parameters is 7 with the value 4 1 2 - To find more about the filter check HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading blosc compressed data ................ Maximum value in DS1 is 1890 blosc filter is available now since H5Dread triggered loading of the filter. diff --git a/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert.ddl b/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert.ddl index c8cfadac..7da3e917 100644 --- a/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert.ddl +++ b/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 } } } @@ -76,7 +76,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 } } } @@ -98,7 +98,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 800 } } } @@ -120,7 +120,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 } } } @@ -142,7 +142,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 } } } diff --git a/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_lz.ddl b/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_lz.ddl index d46b5db1..b05a5d3f 100644 --- a/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_lz.ddl +++ b/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_lz.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 0 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 0 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 0 } } } @@ -76,7 +76,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 0 } } } @@ -98,7 +98,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 800 5 1 0 } } } @@ -120,7 +120,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 0 } } } @@ -142,7 +142,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 0 } } } diff --git a/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_lz4.ddl b/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_lz4.ddl index fdf2e3d1..599cd84a 100755 --- a/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_lz4.ddl +++ b/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_lz4.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 1 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 1 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 1 } } } @@ -76,7 +76,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 1 } } } @@ -98,7 +98,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 800 5 1 1 } } } @@ -120,7 +120,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 1 } } } @@ -142,7 +142,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 1 } } } diff --git a/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_lz4hc.ddl b/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_lz4hc.ddl index 28acd3e2..38b2dec7 100644 --- a/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_lz4hc.ddl +++ b/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_lz4hc.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 2 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 2 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 2 } } } @@ -76,7 +76,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 2 } } } @@ -98,7 +98,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 800 5 1 2 } } } @@ -120,7 +120,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 2 } } } @@ -142,7 +142,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 2 } } } diff --git a/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_zlib.ddl b/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_zlib.ddl index 12d426c4..3f03e7a3 100644 --- a/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_zlib.ddl +++ b/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_zlib.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 4 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 4 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 4 } } } @@ -76,7 +76,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 4 } } } @@ -98,7 +98,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 800 5 1 4 } } } @@ -120,7 +120,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 4 } } } @@ -142,7 +142,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 4 } } } diff --git a/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_zstd.ddl b/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_zstd.ddl index 5d25e5b1..0fcf8174 100644 --- a/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_zstd.ddl +++ b/BLOSC/example/testfiles/h5repack_layout.h5-ud_convert_zstd.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 5 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 5 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 5 } } } @@ -76,7 +76,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 5 } } } @@ -98,7 +98,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 800 5 1 5 } } } @@ -120,7 +120,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 5 } } } @@ -142,7 +142,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 5 } } } diff --git a/BLOSC/src/H5Zblosc.c b/BLOSC/src/H5Zblosc.c index 44730cf9..ac0a9623 100644 --- a/BLOSC/src/H5Zblosc.c +++ b/BLOSC/src/H5Zblosc.c @@ -89,7 +89,7 @@ const H5Z_class2_t blosc_H5Filter[1] = {{ 1, /* encoder_present flag (set to true) */ #endif 1, /* decoder_present flag (set to true) */ - "HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html", /* Filter name for debugging */ + "HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html", /* Filter name for debugging */ NULL, /* The "can apply" callback */ (H5Z_set_local_func_t)(blosc_set_local), /* The "set local" callback */ (H5Z_func_t)(blosc_filter), /* The actual filter function */ diff --git a/BSHUF/config/cmake/HDFMacros.cmake b/BSHUF/config/cmake/HDFMacros.cmake index 0cf9f192..ec2113ad 100644 --- a/BSHUF/config/cmake/HDFMacros.cmake +++ b/BSHUF/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,7 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) include (FetchContent) endmacro () @@ -508,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/BSHUF/config/cmake/HDFPluginMacros.cmake b/BSHUF/config/cmake/HDFPluginMacros.cmake index e46dc4f9..b33268e1 100644 --- a/BSHUF/config/cmake/HDFPluginMacros.cmake +++ b/BSHUF/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) string (TOUPPER ${varname} PLUGIN_PACKAGE_VARNAME) @@ -105,32 +106,7 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Setup output Directories #----------------------------------------------------------------------------- - if (NOT ${PLUGIN_PACKAGE_NAME}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${PLUGIN_PACKAGE_NAME}) #----------------------------------------------------------------------------- # Targets built within this project are exported at Install time for use @@ -154,6 +130,8 @@ macro (BASIC_SETTINGS varname) set (LIB_TYPE SHARED) add_definitions (-D${PLUGIN_PACKAGE_NAME}_BUILT_AS_DYNAMIC_LIB) + set (CMAKE_POSITION_INDEPENDENT_CODE ON) + if (MSVC) set (CMAKE_MFC_FLAG 0) endif () @@ -161,9 +139,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -171,7 +153,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -182,11 +164,11 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () - option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" OFF) + option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" ${DISABLE_H5PL_ENCODER}) if (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER) set (FILTER_DECODE_ONLY 1) endif () @@ -217,26 +199,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -271,17 +233,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -299,21 +276,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () @@ -432,12 +409,17 @@ macro (INSTALL_SUPPORT varname) set (CPACK_PACKAGE_VERSION_MAJOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MAJOR}") set (CPACK_PACKAGE_VERSION_MINOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MINOR}") set (CPACK_PACKAGE_VERSION_PATCH "") - #set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") - set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") + set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_README "${CMAKE_BINARY_DIR}/README.txt") set (CPACK_PACKAGE_RELOCATABLE TRUE) set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PLUGIN_NAME} Installation") - set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + if (H5PL_OVERRIDE_VERSION) + string(TOUPPER ${HDF5_PACKAGE_NAME} PLUGIN_HDF5_PACKAGE_NAME) + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${PLUGIN_HDF5_PACKAGE_NAME}/${H5PL_OVERRIDE_VERSION}") + else () + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + endif () set (CPACK_GENERATOR "TGZ") if (WIN32) @@ -470,13 +452,14 @@ macro (INSTALL_SUPPORT varname) endif () # WiX variables set (CPACK_WIX_UNINSTALL "1") - set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/COPYING.txt") +# set (CPACK_WIX_PRODUCT_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}\\\\${PLUGIN_PACKAGE_NAME}.ico") elseif (APPLE) list (APPEND CPACK_GENERATOR "STGZ") list (APPEND CPACK_GENERATOR "DragNDrop") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") -# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5bshuf.gif") +# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5pl.gif") option (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE "Package the ${PLUGIN_PACKAGE_NAME} Library in a Bundle" OFF) if (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE) @@ -484,7 +467,7 @@ macro (INSTALL_SUPPORT varname) set (CPACK_BUNDLE_NAME "${${PLUGIN_PACKAGE_NAME}_PACKAGE_STRING}") set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") -# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5BSHUF.icns") +# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5PL.icns") # set (CPACK_BUNDLE_PLIST "${${PLUGIN_PACKAGE_NAME}_BINARY_DIR}/CMakeFiles/Info.plist") set (CPACK_APPLE_GUI_INFO_STRING "${PLUGIN_PACKAGE_NAME} Plugin Library") set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © ???. All rights reserved.") @@ -527,31 +510,23 @@ macro (INSTALL_SUPPORT varname) set (CPACK_RPM_PACKAGE_RELOCATABLE ON) endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") - else () - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};libraries;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};headers;/") - endif () - + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") set (CPACK_ALL_INSTALL_TYPES Full User) set (CPACK_INSTALL_TYPE_FULL_DISPLAY_NAME "Everything") endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - include (CPack) + include (CPack) - cpack_add_component_group(Runtime) + cpack_add_component_group(Runtime) - cpack_add_component (libraries - DISPLAY_NAME "${PLUGIN_NAME} Libraries" - GROUP Runtime - ) - cpack_add_component_group(hdfdocuments - DISPLAY_NAME "${PLUGIN_NAME} Documents" - GROUP Documents - INSTALL_TYPES Full User - ) - endif () + cpack_add_component (libraries + DISPLAY_NAME "${PLUGIN_NAME} Libraries" + GROUP Runtime + ) + cpack_add_component_group(hdfdocuments + DISPLAY_NAME "${PLUGIN_NAME} Documents" + GROUP Documents + INSTALL_TYPES Full User + ) endif () endmacro () diff --git a/BSHUF/config/cmake/binex/config/cmake/HDFMacros.cmake b/BSHUF/config/cmake/binex/config/cmake/HDFMacros.cmake index 5e63ec23..ec2113ad 100644 --- a/BSHUF/config/cmake/binex/config/cmake/HDFMacros.cmake +++ b/BSHUF/config/cmake/binex/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,9 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) + + include (FetchContent) endmacro () macro (ADD_H5_FLAGS h5_flag_var infile) @@ -506,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/BSHUF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/BSHUF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index 46ef02f9..d2fdb5dd 100644 --- a/BSHUF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/BSHUF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- @@ -85,9 +86,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -95,7 +100,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -136,7 +141,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () @@ -164,26 +169,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -218,17 +203,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -246,21 +246,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () diff --git a/BSHUF/config/cmake/binex/example/h5ex_d_bshuf.c b/BSHUF/config/cmake/binex/example/h5ex_d_bshuf.c index 3827c258..99c04a80 100644 --- a/BSHUF/config/cmake/binex/example/h5ex_d_bshuf.c +++ b/BSHUF/config/cmake/binex/example/h5ex_d_bshuf.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 3; /* number of elements in cd_values */ diff --git a/BSHUF/example/h5ex_d_bshuf.c b/BSHUF/example/h5ex_d_bshuf.c index 3827c258..99c04a80 100644 --- a/BSHUF/example/h5ex_d_bshuf.c +++ b/BSHUF/example/h5ex_d_bshuf.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 3; /* number of elements in cd_values */ diff --git a/BZIP2/config/cmake/HDFMacros.cmake b/BZIP2/config/cmake/HDFMacros.cmake index 0cf9f192..ec2113ad 100644 --- a/BZIP2/config/cmake/HDFMacros.cmake +++ b/BZIP2/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,7 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) include (FetchContent) endmacro () @@ -508,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/BZIP2/config/cmake/HDFPluginMacros.cmake b/BZIP2/config/cmake/HDFPluginMacros.cmake index 6395d69f..b33268e1 100644 --- a/BZIP2/config/cmake/HDFPluginMacros.cmake +++ b/BZIP2/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) string (TOUPPER ${varname} PLUGIN_PACKAGE_VARNAME) @@ -105,32 +106,7 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Setup output Directories #----------------------------------------------------------------------------- - if (NOT ${PLUGIN_PACKAGE_NAME}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${PLUGIN_PACKAGE_NAME}) #----------------------------------------------------------------------------- # Targets built within this project are exported at Install time for use @@ -154,6 +130,8 @@ macro (BASIC_SETTINGS varname) set (LIB_TYPE SHARED) add_definitions (-D${PLUGIN_PACKAGE_NAME}_BUILT_AS_DYNAMIC_LIB) + set (CMAKE_POSITION_INDEPENDENT_CODE ON) + if (MSVC) set (CMAKE_MFC_FLAG 0) endif () @@ -161,9 +139,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -171,7 +153,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -182,11 +164,11 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () - option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" OFF) + option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" ${DISABLE_H5PL_ENCODER}) if (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER) set (FILTER_DECODE_ONLY 1) endif () @@ -217,26 +199,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -271,17 +233,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -299,21 +276,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () @@ -432,12 +409,17 @@ macro (INSTALL_SUPPORT varname) set (CPACK_PACKAGE_VERSION_MAJOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MAJOR}") set (CPACK_PACKAGE_VERSION_MINOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MINOR}") set (CPACK_PACKAGE_VERSION_PATCH "") - #set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") - set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") + set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_README "${CMAKE_BINARY_DIR}/README.txt") set (CPACK_PACKAGE_RELOCATABLE TRUE) set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PLUGIN_NAME} Installation") - set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + if (H5PL_OVERRIDE_VERSION) + string(TOUPPER ${HDF5_PACKAGE_NAME} PLUGIN_HDF5_PACKAGE_NAME) + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${PLUGIN_HDF5_PACKAGE_NAME}/${H5PL_OVERRIDE_VERSION}") + else () + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + endif () set (CPACK_GENERATOR "TGZ") if (WIN32) @@ -470,13 +452,14 @@ macro (INSTALL_SUPPORT varname) endif () # WiX variables set (CPACK_WIX_UNINSTALL "1") - set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/COPYING.txt") +# set (CPACK_WIX_PRODUCT_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}\\\\${PLUGIN_PACKAGE_NAME}.ico") elseif (APPLE) list (APPEND CPACK_GENERATOR "STGZ") list (APPEND CPACK_GENERATOR "DragNDrop") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") -# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5bz.gif") +# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5pl.gif") option (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE "Package the ${PLUGIN_PACKAGE_NAME} Library in a Bundle" OFF) if (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE) @@ -484,7 +467,7 @@ macro (INSTALL_SUPPORT varname) set (CPACK_BUNDLE_NAME "${${PLUGIN_PACKAGE_NAME}_PACKAGE_STRING}") set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") -# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5BZ2.icns") +# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5PL.icns") # set (CPACK_BUNDLE_PLIST "${${PLUGIN_PACKAGE_NAME}_BINARY_DIR}/CMakeFiles/Info.plist") set (CPACK_APPLE_GUI_INFO_STRING "${PLUGIN_PACKAGE_NAME} Plugin Library") set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © ???. All rights reserved.") @@ -527,31 +510,23 @@ macro (INSTALL_SUPPORT varname) set (CPACK_RPM_PACKAGE_RELOCATABLE ON) endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") - else () - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};libraries;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};headers;/") - endif () - + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") set (CPACK_ALL_INSTALL_TYPES Full User) set (CPACK_INSTALL_TYPE_FULL_DISPLAY_NAME "Everything") endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - include (CPack) + include (CPack) - cpack_add_component_group(Runtime) + cpack_add_component_group(Runtime) - cpack_add_component (libraries - DISPLAY_NAME "${PLUGIN_NAME} Libraries" - GROUP Runtime - ) - cpack_add_component_group(hdfdocuments - DISPLAY_NAME "${PLUGIN_NAME} Documents" - GROUP Documents - INSTALL_TYPES Full User - ) - endif () + cpack_add_component (libraries + DISPLAY_NAME "${PLUGIN_NAME} Libraries" + GROUP Runtime + ) + cpack_add_component_group(hdfdocuments + DISPLAY_NAME "${PLUGIN_NAME} Documents" + GROUP Documents + INSTALL_TYPES Full User + ) endif () endmacro () diff --git a/BZIP2/config/cmake/binex/config/cmake/HDFMacros.cmake b/BZIP2/config/cmake/binex/config/cmake/HDFMacros.cmake index 5e63ec23..ec2113ad 100644 --- a/BZIP2/config/cmake/binex/config/cmake/HDFMacros.cmake +++ b/BZIP2/config/cmake/binex/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,9 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) + + include (FetchContent) endmacro () macro (ADD_H5_FLAGS h5_flag_var infile) @@ -506,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/BZIP2/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/BZIP2/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index 46ef02f9..d2fdb5dd 100644 --- a/BZIP2/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/BZIP2/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- @@ -85,9 +86,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -95,7 +100,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -136,7 +141,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () @@ -164,26 +169,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -218,17 +203,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -246,21 +246,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () diff --git a/BZIP2/config/cmake/binex/example/h5ex_d_bzip2.c b/BZIP2/config/cmake/binex/example/h5ex_d_bzip2.c index b149721e..d539c30a 100644 --- a/BZIP2/config/cmake/binex/example/h5ex_d_bzip2.c +++ b/BZIP2/config/cmake/binex/example/h5ex_d_bzip2.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 1; /* number of elements in cd_values */ diff --git a/BZIP2/config/cmake/binex/example/testfiles/h5ex_d_bzip2.ddl b/BZIP2/config/cmake/binex/example/testfiles/h5ex_d_bzip2.ddl index 5cf63389..1ee6d311 100644 --- a/BZIP2/config/cmake/binex/example/testfiles/h5ex_d_bzip2.ddl +++ b/BZIP2/config/cmake/binex/example/testfiles/h5ex_d_bzip2.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 } } } diff --git a/BZIP2/config/cmake/binex/example/testfiles/h5ex_d_bzip2.tst b/BZIP2/config/cmake/binex/example/testfiles/h5ex_d_bzip2.tst index a628ae1d..88eee9f4 100644 --- a/BZIP2/config/cmake/binex/example/testfiles/h5ex_d_bzip2.tst +++ b/BZIP2/config/cmake/binex/example/testfiles/h5ex_d_bzip2.tst @@ -5,7 +5,7 @@ bzip2 filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 307 Number of parameters is 1 with the value 2 - To find more about the filter check HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading bzip2 compressed data ................ Maximum value in DS1 is 1890 bzip2 filter is available now since H5Dread triggered loading of the filter. diff --git a/BZIP2/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl b/BZIP2/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl index db070b9f..e3e7b46b 100644 --- a/BZIP2/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl +++ b/BZIP2/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -76,7 +76,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -98,7 +98,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -120,7 +120,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -142,7 +142,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } diff --git a/BZIP2/example/h5ex_d_bzip2.c b/BZIP2/example/h5ex_d_bzip2.c index b149721e..d539c30a 100644 --- a/BZIP2/example/h5ex_d_bzip2.c +++ b/BZIP2/example/h5ex_d_bzip2.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 1; /* number of elements in cd_values */ diff --git a/BZIP2/example/testfiles/h5ex_d_bzip2.ddl b/BZIP2/example/testfiles/h5ex_d_bzip2.ddl index 5cf63389..1ee6d311 100644 --- a/BZIP2/example/testfiles/h5ex_d_bzip2.ddl +++ b/BZIP2/example/testfiles/h5ex_d_bzip2.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 } } } diff --git a/BZIP2/example/testfiles/h5ex_d_bzip2.tst b/BZIP2/example/testfiles/h5ex_d_bzip2.tst index a628ae1d..88eee9f4 100644 --- a/BZIP2/example/testfiles/h5ex_d_bzip2.tst +++ b/BZIP2/example/testfiles/h5ex_d_bzip2.tst @@ -5,7 +5,7 @@ bzip2 filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 307 Number of parameters is 1 with the value 2 - To find more about the filter check HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading bzip2 compressed data ................ Maximum value in DS1 is 1890 bzip2 filter is available now since H5Dread triggered loading of the filter. diff --git a/BZIP2/example/testfiles/h5repack_layout.h5-ud_convert.ddl b/BZIP2/example/testfiles/h5repack_layout.h5-ud_convert.ddl index db070b9f..e3e7b46b 100644 --- a/BZIP2/example/testfiles/h5repack_layout.h5-ud_convert.ddl +++ b/BZIP2/example/testfiles/h5repack_layout.h5-ud_convert.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -76,7 +76,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -98,7 +98,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -120,7 +120,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -142,7 +142,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } diff --git a/BZIP2/src/H5Zbzip2.c b/BZIP2/src/H5Zbzip2.c index 3ed7ab67..96d55ec6 100644 --- a/BZIP2/src/H5Zbzip2.c +++ b/BZIP2/src/H5Zbzip2.c @@ -91,7 +91,7 @@ static size_t H5Z_filter_bzip2(unsigned int flags, size_t cd_nelmts, /* * BZIP2 compression was the first external filter registered by PyTables developers * with The HDF Group - * See http://www.hdfgroup.org/services/contributions.html for more information. + * See https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html for more information. * * If you intend your plugin to be used by others, please register your filter * with The HDF Group. @@ -107,7 +107,7 @@ const H5Z_class2_t H5Z_BZIP2[1] = {{ 1, /* encoder_present flag (set to true) */ #endif 1, /* decoder_present flag (set to true) */ - "HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html", + "HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html", /* Filter name for debugging */ NULL, /* The "can apply" callback */ NULL, /* The "set local" callback */ diff --git a/JPEG/config/cmake/HDFMacros.cmake b/JPEG/config/cmake/HDFMacros.cmake index fa37ba4b..ec2113ad 100644 --- a/JPEG/config/cmake/HDFMacros.cmake +++ b/JPEG/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -74,7 +109,7 @@ macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent) mark_as_advanced (DISABLE_PDB_FILES) if (WIN32 AND MSVC AND NOT DISABLE_PDB_FILES) get_target_property (target_type ${libtarget} TYPE) - if (${libtype} MATCHES "SHARED") + if (${target_type} MATCHES "SHARED") set (targetfilename $) else () get_property (target_name TARGET ${libtarget} PROPERTY "$,$>,OUTPUT_NAME_DEBUG,OUTPUT_NAME_RELWITHDEBINFO>") @@ -143,7 +178,7 @@ macro (HDF_SET_BASE_OPTIONS libtarget libname libtype) endif () endif () - option (HDF_MSVC_NAMING_CONVENTION "Use MSVC Naming conventions for Shared Libraries" OFF) + option (HDF5_MSVC_NAMING_CONVENTION "Use MSVC Naming conventions for Shared Libraries" OFF) if (HDF5_MSVC_NAMING_CONVENTION AND MINGW AND ${libtype} MATCHES "SHARED") set_target_properties (${libtarget} PROPERTIES IMPORT_SUFFIX ".lib" @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,7 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) include (FetchContent) endmacro () @@ -508,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/JPEG/config/cmake/HDFPluginMacros.cmake b/JPEG/config/cmake/HDFPluginMacros.cmake index 85bc7157..b33268e1 100644 --- a/JPEG/config/cmake/HDFPluginMacros.cmake +++ b/JPEG/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) string (TOUPPER ${varname} PLUGIN_PACKAGE_VARNAME) @@ -105,32 +106,7 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Setup output Directories #----------------------------------------------------------------------------- - if (NOT ${PLUGIN_PACKAGE_NAME}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${PLUGIN_PACKAGE_NAME}) #----------------------------------------------------------------------------- # Targets built within this project are exported at Install time for use @@ -154,6 +130,8 @@ macro (BASIC_SETTINGS varname) set (LIB_TYPE SHARED) add_definitions (-D${PLUGIN_PACKAGE_NAME}_BUILT_AS_DYNAMIC_LIB) + set (CMAKE_POSITION_INDEPENDENT_CODE ON) + if (MSVC) set (CMAKE_MFC_FLAG 0) endif () @@ -161,9 +139,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -171,7 +153,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -182,11 +164,11 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () - option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" OFF) + option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" ${DISABLE_H5PL_ENCODER}) if (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER) set (FILTER_DECODE_ONLY 1) endif () @@ -217,26 +199,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -271,17 +233,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -299,21 +276,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () @@ -432,12 +409,17 @@ macro (INSTALL_SUPPORT varname) set (CPACK_PACKAGE_VERSION_MAJOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MAJOR}") set (CPACK_PACKAGE_VERSION_MINOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MINOR}") set (CPACK_PACKAGE_VERSION_PATCH "") - #set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") - set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") + set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_README "${CMAKE_BINARY_DIR}/README.txt") set (CPACK_PACKAGE_RELOCATABLE TRUE) set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PLUGIN_NAME} Installation") - set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + if (H5PL_OVERRIDE_VERSION) + string(TOUPPER ${HDF5_PACKAGE_NAME} PLUGIN_HDF5_PACKAGE_NAME) + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${PLUGIN_HDF5_PACKAGE_NAME}/${H5PL_OVERRIDE_VERSION}") + else () + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + endif () set (CPACK_GENERATOR "TGZ") if (WIN32) @@ -470,13 +452,14 @@ macro (INSTALL_SUPPORT varname) endif () # WiX variables set (CPACK_WIX_UNINSTALL "1") - set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/COPYING.txt") +# set (CPACK_WIX_PRODUCT_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}\\\\${PLUGIN_PACKAGE_NAME}.ico") elseif (APPLE) list (APPEND CPACK_GENERATOR "STGZ") list (APPEND CPACK_GENERATOR "DragNDrop") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") -# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5jpeg.gif") +# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5pl.gif") option (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE "Package the ${PLUGIN_PACKAGE_NAME} Library in a Bundle" OFF) if (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE) @@ -484,7 +467,7 @@ macro (INSTALL_SUPPORT varname) set (CPACK_BUNDLE_NAME "${${PLUGIN_PACKAGE_NAME}_PACKAGE_STRING}") set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") -# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5JPEG.icns") +# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5PL.icns") # set (CPACK_BUNDLE_PLIST "${${PLUGIN_PACKAGE_NAME}_BINARY_DIR}/CMakeFiles/Info.plist") set (CPACK_APPLE_GUI_INFO_STRING "${PLUGIN_PACKAGE_NAME} Plugin Library") set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © ???. All rights reserved.") @@ -527,31 +510,23 @@ macro (INSTALL_SUPPORT varname) set (CPACK_RPM_PACKAGE_RELOCATABLE ON) endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") - else () - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};libraries;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};headers;/") - endif () - + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") set (CPACK_ALL_INSTALL_TYPES Full User) set (CPACK_INSTALL_TYPE_FULL_DISPLAY_NAME "Everything") endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - include (CPack) + include (CPack) - cpack_add_component_group(Runtime) + cpack_add_component_group(Runtime) - cpack_add_component (libraries - DISPLAY_NAME "${PLUGIN_NAME} Libraries" - GROUP Runtime - ) - cpack_add_component_group(hdfdocuments - DISPLAY_NAME "${PLUGIN_NAME} Documents" - GROUP Documents - INSTALL_TYPES Full User - ) - endif () + cpack_add_component (libraries + DISPLAY_NAME "${PLUGIN_NAME} Libraries" + GROUP Runtime + ) + cpack_add_component_group(hdfdocuments + DISPLAY_NAME "${PLUGIN_NAME} Documents" + GROUP Documents + INSTALL_TYPES Full User + ) endif () endmacro () diff --git a/JPEG/config/cmake/binex/config/cmake/HDFMacros.cmake b/JPEG/config/cmake/binex/config/cmake/HDFMacros.cmake index 5e63ec23..ec2113ad 100644 --- a/JPEG/config/cmake/binex/config/cmake/HDFMacros.cmake +++ b/JPEG/config/cmake/binex/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,9 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) + + include (FetchContent) endmacro () macro (ADD_H5_FLAGS h5_flag_var infile) @@ -506,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/JPEG/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/JPEG/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index 46ef02f9..d2fdb5dd 100644 --- a/JPEG/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/JPEG/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- @@ -85,9 +86,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -95,7 +100,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -136,7 +141,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () @@ -164,26 +169,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -218,17 +203,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -246,21 +246,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () diff --git a/JPEG/config/cmake/binex/example/h5ex_d_jpeg.c b/JPEG/config/cmake/binex/example/h5ex_d_jpeg.c index 9c6878f3..0df25ed0 100644 --- a/JPEG/config/cmake/binex/example/h5ex_d_jpeg.c +++ b/JPEG/config/cmake/binex/example/h5ex_d_jpeg.c @@ -45,7 +45,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[3] = {NUM_IMAGES, DIM0, DIM1}, chunk[3] = {CHUNK0, CHUNK1, CHUNK2}; size_t nelmts = 4; /* number of elements in cd_values */ diff --git a/JPEG/config/cmake/binex/example/testfiles/h5ex_d_jpeg.ddl b/JPEG/config/cmake/binex/example/testfiles/h5ex_d_jpeg.ddl index 27ece704..7b0133e9 100644 --- a/JPEG/config/cmake/binex/example/testfiles/h5ex_d_jpeg.ddl +++ b/JPEG/config/cmake/binex/example/testfiles/h5ex_d_jpeg.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32019 - COMMENT HDF5 jpeg filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 jpeg filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 100 512 1024 0 } } } diff --git a/JPEG/config/cmake/binex/example/testfiles/h5ex_d_jpeg.tst b/JPEG/config/cmake/binex/example/testfiles/h5ex_d_jpeg.tst index d3f3bf87..979b01c7 100644 --- a/JPEG/config/cmake/binex/example/testfiles/h5ex_d_jpeg.tst +++ b/JPEG/config/cmake/binex/example/testfiles/h5ex_d_jpeg.tst @@ -5,7 +5,7 @@ jpeg filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 32019 Number of parameters is 4 with the value 100 - To find more about the filter check HDF5 jpeg filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 jpeg filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading jpeg compressed data ................ JPEG quality=100, percent of differing array elements=0.000000 jpeg filter is available now since H5Dread triggered loading of the filter. diff --git a/JPEG/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl b/JPEG/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl index b9e99230..3957fb4e 100644 --- a/JPEG/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl +++ b/JPEG/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 jpeg filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 jpeg filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 jpeg filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 jpeg filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 jpeg filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 jpeg filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -76,7 +76,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 jpeg filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 jpeg filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -98,7 +98,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 jpeg filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 jpeg filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -120,7 +120,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 jpeg filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 jpeg filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -142,7 +142,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 jpeg filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 jpeg filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } diff --git a/JPEG/example/h5ex_d_jpeg.c b/JPEG/example/h5ex_d_jpeg.c index deec03bd..2e5d230f 100644 --- a/JPEG/example/h5ex_d_jpeg.c +++ b/JPEG/example/h5ex_d_jpeg.c @@ -45,7 +45,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[3] = {NUM_IMAGES, DIM0, DIM1}, chunk[3] = {CHUNK0, CHUNK1, CHUNK2}; size_t nelmts = 4; /* number of elements in cd_values */ diff --git a/JPEG/example/testfiles/h5ex_d_jpeg.ddl b/JPEG/example/testfiles/h5ex_d_jpeg.ddl index 1dc8928d..233aee3d 100644 --- a/JPEG/example/testfiles/h5ex_d_jpeg.ddl +++ b/JPEG/example/testfiles/h5ex_d_jpeg.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32019 - COMMENT HDF5 jpeg filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 jpeg filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 100 1024 512 0 } } } diff --git a/JPEG/example/testfiles/h5ex_d_jpeg.tst b/JPEG/example/testfiles/h5ex_d_jpeg.tst index d3f3bf87..979b01c7 100644 --- a/JPEG/example/testfiles/h5ex_d_jpeg.tst +++ b/JPEG/example/testfiles/h5ex_d_jpeg.tst @@ -5,7 +5,7 @@ jpeg filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 32019 Number of parameters is 4 with the value 100 - To find more about the filter check HDF5 jpeg filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 jpeg filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading jpeg compressed data ................ JPEG quality=100, percent of differing array elements=0.000000 jpeg filter is available now since H5Dread triggered loading of the filter. diff --git a/JPEG/src/H5Zjpeg.c b/JPEG/src/H5Zjpeg.c index bf08bd76..10d261f9 100644 --- a/JPEG/src/H5Zjpeg.c +++ b/JPEG/src/H5Zjpeg.c @@ -42,7 +42,7 @@ const H5Z_class2_t H5Z_JPEG[1] = {{ 1, /* encoder_present flag (set to true) */ #endif 1, /* decoder_present flag (set to true) */ - "HDF5 jpeg filter; see http://www.hdfgroup.org/services/contributions.html", + "HDF5 jpeg filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html", /* Filter name for debugging */ #if 0 (H5Z_can_apply_func_t)(H5Z_jpeg_can_apply), /* The "can apply" callback */ diff --git a/LZ4/config/cmake/HDFMacros.cmake b/LZ4/config/cmake/HDFMacros.cmake index 0cf9f192..ec2113ad 100644 --- a/LZ4/config/cmake/HDFMacros.cmake +++ b/LZ4/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,7 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) include (FetchContent) endmacro () @@ -508,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/LZ4/config/cmake/HDFPluginMacros.cmake b/LZ4/config/cmake/HDFPluginMacros.cmake index afb04cbe..b33268e1 100644 --- a/LZ4/config/cmake/HDFPluginMacros.cmake +++ b/LZ4/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) string (TOUPPER ${varname} PLUGIN_PACKAGE_VARNAME) @@ -105,32 +106,7 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Setup output Directories #----------------------------------------------------------------------------- - if (NOT ${PLUGIN_PACKAGE_NAME}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${PLUGIN_PACKAGE_NAME}) #----------------------------------------------------------------------------- # Targets built within this project are exported at Install time for use @@ -154,6 +130,8 @@ macro (BASIC_SETTINGS varname) set (LIB_TYPE SHARED) add_definitions (-D${PLUGIN_PACKAGE_NAME}_BUILT_AS_DYNAMIC_LIB) + set (CMAKE_POSITION_INDEPENDENT_CODE ON) + if (MSVC) set (CMAKE_MFC_FLAG 0) endif () @@ -161,9 +139,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -171,7 +153,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -182,11 +164,11 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () - option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" OFF) + option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" ${DISABLE_H5PL_ENCODER}) if (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER) set (FILTER_DECODE_ONLY 1) endif () @@ -217,26 +199,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -271,17 +233,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -299,21 +276,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () @@ -432,12 +409,17 @@ macro (INSTALL_SUPPORT varname) set (CPACK_PACKAGE_VERSION_MAJOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MAJOR}") set (CPACK_PACKAGE_VERSION_MINOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MINOR}") set (CPACK_PACKAGE_VERSION_PATCH "") - #set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") - set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") + set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_README "${CMAKE_BINARY_DIR}/README.txt") set (CPACK_PACKAGE_RELOCATABLE TRUE) set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PLUGIN_NAME} Installation") - set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + if (H5PL_OVERRIDE_VERSION) + string(TOUPPER ${HDF5_PACKAGE_NAME} PLUGIN_HDF5_PACKAGE_NAME) + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${PLUGIN_HDF5_PACKAGE_NAME}/${H5PL_OVERRIDE_VERSION}") + else () + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + endif () set (CPACK_GENERATOR "TGZ") if (WIN32) @@ -470,13 +452,14 @@ macro (INSTALL_SUPPORT varname) endif () # WiX variables set (CPACK_WIX_UNINSTALL "1") - set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/COPYING.txt") +# set (CPACK_WIX_PRODUCT_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}\\\\${PLUGIN_PACKAGE_NAME}.ico") elseif (APPLE) list (APPEND CPACK_GENERATOR "STGZ") list (APPEND CPACK_GENERATOR "DragNDrop") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") -# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5lz4.gif") +# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5pl.gif") option (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE "Package the ${PLUGIN_PACKAGE_NAME} Library in a Bundle" OFF) if (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE) @@ -484,7 +467,7 @@ macro (INSTALL_SUPPORT varname) set (CPACK_BUNDLE_NAME "${${PLUGIN_PACKAGE_NAME}_PACKAGE_STRING}") set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") -# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5LZ4.icns") +# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5PL.icns") # set (CPACK_BUNDLE_PLIST "${${PLUGIN_PACKAGE_NAME}_BINARY_DIR}/CMakeFiles/Info.plist") set (CPACK_APPLE_GUI_INFO_STRING "${PLUGIN_PACKAGE_NAME} Plugin Library") set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © ???. All rights reserved.") @@ -527,31 +510,23 @@ macro (INSTALL_SUPPORT varname) set (CPACK_RPM_PACKAGE_RELOCATABLE ON) endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") - else () - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};libraries;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};headers;/") - endif () - + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") set (CPACK_ALL_INSTALL_TYPES Full User) set (CPACK_INSTALL_TYPE_FULL_DISPLAY_NAME "Everything") endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - include (CPack) + include (CPack) - cpack_add_component_group(Runtime) + cpack_add_component_group(Runtime) - cpack_add_component (libraries - DISPLAY_NAME "${PLUGIN_NAME} Libraries" - GROUP Runtime - ) - cpack_add_component_group(hdfdocuments - DISPLAY_NAME "${PLUGIN_NAME} Documents" - GROUP Documents - INSTALL_TYPES Full User - ) - endif () + cpack_add_component (libraries + DISPLAY_NAME "${PLUGIN_NAME} Libraries" + GROUP Runtime + ) + cpack_add_component_group(hdfdocuments + DISPLAY_NAME "${PLUGIN_NAME} Documents" + GROUP Documents + INSTALL_TYPES Full User + ) endif () endmacro () diff --git a/LZ4/config/cmake/binex/config/cmake/HDFMacros.cmake b/LZ4/config/cmake/binex/config/cmake/HDFMacros.cmake index 5e63ec23..ec2113ad 100644 --- a/LZ4/config/cmake/binex/config/cmake/HDFMacros.cmake +++ b/LZ4/config/cmake/binex/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,9 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) + + include (FetchContent) endmacro () macro (ADD_H5_FLAGS h5_flag_var infile) @@ -506,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/LZ4/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/LZ4/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index 46ef02f9..d2fdb5dd 100644 --- a/LZ4/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/LZ4/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- @@ -85,9 +86,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -95,7 +100,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -136,7 +141,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () @@ -164,26 +169,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -218,17 +203,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -246,21 +246,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () diff --git a/LZ4/config/cmake/binex/example/h5ex_d_lz4.c b/LZ4/config/cmake/binex/example/h5ex_d_lz4.c index 2425488b..2bb1a7ee 100644 --- a/LZ4/config/cmake/binex/example/h5ex_d_lz4.c +++ b/LZ4/config/cmake/binex/example/h5ex_d_lz4.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 1; /* number of elements in cd_values */ diff --git a/LZ4/config/cmake/binex/example/testfiles/h5ex_d_lz4.ddl b/LZ4/config/cmake/binex/example/testfiles/h5ex_d_lz4.ddl index f13c950f..ffe02c49 100755 --- a/LZ4/config/cmake/binex/example/testfiles/h5ex_d_lz4.ddl +++ b/LZ4/config/cmake/binex/example/testfiles/h5ex_d_lz4.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } diff --git a/LZ4/config/cmake/binex/example/testfiles/h5ex_d_lz4.tst b/LZ4/config/cmake/binex/example/testfiles/h5ex_d_lz4.tst index 5e5e9d74..619e1de0 100755 --- a/LZ4/config/cmake/binex/example/testfiles/h5ex_d_lz4.tst +++ b/LZ4/config/cmake/binex/example/testfiles/h5ex_d_lz4.tst @@ -5,7 +5,7 @@ lz4 filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 32004 Number of parameters is 1 with the value 3 - To find more about the filter check HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading lz4 compressed data ................ Maximum value in DS1 is 1890 lz4 filter is available now since H5Dread triggered loading of the filter. diff --git a/LZ4/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl b/LZ4/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl index b75d98e7..85a5726b 100644 --- a/LZ4/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl +++ b/LZ4/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } @@ -76,7 +76,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } @@ -98,7 +98,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } @@ -120,7 +120,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } @@ -142,7 +142,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } diff --git a/LZ4/example/h5ex_d_lz4.c b/LZ4/example/h5ex_d_lz4.c index 2425488b..2bb1a7ee 100644 --- a/LZ4/example/h5ex_d_lz4.c +++ b/LZ4/example/h5ex_d_lz4.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 1; /* number of elements in cd_values */ diff --git a/LZ4/example/testfiles/h5ex_d_lz4.ddl b/LZ4/example/testfiles/h5ex_d_lz4.ddl index f13c950f..ffe02c49 100644 --- a/LZ4/example/testfiles/h5ex_d_lz4.ddl +++ b/LZ4/example/testfiles/h5ex_d_lz4.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } diff --git a/LZ4/example/testfiles/h5ex_d_lz4.tst b/LZ4/example/testfiles/h5ex_d_lz4.tst index 5e5e9d74..619e1de0 100644 --- a/LZ4/example/testfiles/h5ex_d_lz4.tst +++ b/LZ4/example/testfiles/h5ex_d_lz4.tst @@ -5,7 +5,7 @@ lz4 filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 32004 Number of parameters is 1 with the value 3 - To find more about the filter check HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading lz4 compressed data ................ Maximum value in DS1 is 1890 lz4 filter is available now since H5Dread triggered loading of the filter. diff --git a/LZ4/example/testfiles/h5repack_layout.h5-ud_convert.ddl b/LZ4/example/testfiles/h5repack_layout.h5-ud_convert.ddl index b75d98e7..85a5726b 100644 --- a/LZ4/example/testfiles/h5repack_layout.h5-ud_convert.ddl +++ b/LZ4/example/testfiles/h5repack_layout.h5-ud_convert.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } @@ -76,7 +76,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } @@ -98,7 +98,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } @@ -120,7 +120,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } @@ -142,7 +142,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } diff --git a/LZ4/src/H5Zlz4.c b/LZ4/src/H5Zlz4.c index 39aec145..c2019e6d 100644 --- a/LZ4/src/H5Zlz4.c +++ b/LZ4/src/H5Zlz4.c @@ -85,7 +85,7 @@ const H5Z_class2_t H5Z_LZ4[1] = {{ 1, /* encoder_present flag (set to true) */ #endif 1, /* decoder_present flag (set to true) */ - "HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html", + "HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html", /* Filter name for debugging */ NULL, /* The "can apply" callback */ NULL, /* The "set local" callback */ diff --git a/LZF/config/cmake/HDFMacros.cmake b/LZF/config/cmake/HDFMacros.cmake index 0cf9f192..ec2113ad 100644 --- a/LZF/config/cmake/HDFMacros.cmake +++ b/LZF/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,7 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) include (FetchContent) endmacro () @@ -508,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/LZF/config/cmake/HDFPluginMacros.cmake b/LZF/config/cmake/HDFPluginMacros.cmake index ac9566f5..b33268e1 100644 --- a/LZF/config/cmake/HDFPluginMacros.cmake +++ b/LZF/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) string (TOUPPER ${varname} PLUGIN_PACKAGE_VARNAME) @@ -105,32 +106,7 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Setup output Directories #----------------------------------------------------------------------------- - if (NOT ${PLUGIN_PACKAGE_NAME}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${PLUGIN_PACKAGE_NAME}) #----------------------------------------------------------------------------- # Targets built within this project are exported at Install time for use @@ -154,6 +130,8 @@ macro (BASIC_SETTINGS varname) set (LIB_TYPE SHARED) add_definitions (-D${PLUGIN_PACKAGE_NAME}_BUILT_AS_DYNAMIC_LIB) + set (CMAKE_POSITION_INDEPENDENT_CODE ON) + if (MSVC) set (CMAKE_MFC_FLAG 0) endif () @@ -161,9 +139,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -171,7 +153,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -182,11 +164,11 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () - option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" OFF) + option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" ${DISABLE_H5PL_ENCODER}) if (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER) set (FILTER_DECODE_ONLY 1) endif () @@ -217,26 +199,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -271,17 +233,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -299,21 +276,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () @@ -432,12 +409,17 @@ macro (INSTALL_SUPPORT varname) set (CPACK_PACKAGE_VERSION_MAJOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MAJOR}") set (CPACK_PACKAGE_VERSION_MINOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MINOR}") set (CPACK_PACKAGE_VERSION_PATCH "") - #set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") - set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") + set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_README "${CMAKE_BINARY_DIR}/README.txt") set (CPACK_PACKAGE_RELOCATABLE TRUE) set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PLUGIN_NAME} Installation") - set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + if (H5PL_OVERRIDE_VERSION) + string(TOUPPER ${HDF5_PACKAGE_NAME} PLUGIN_HDF5_PACKAGE_NAME) + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${PLUGIN_HDF5_PACKAGE_NAME}/${H5PL_OVERRIDE_VERSION}") + else () + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + endif () set (CPACK_GENERATOR "TGZ") if (WIN32) @@ -470,13 +452,14 @@ macro (INSTALL_SUPPORT varname) endif () # WiX variables set (CPACK_WIX_UNINSTALL "1") - set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/COPYING.txt") +# set (CPACK_WIX_PRODUCT_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}\\\\${PLUGIN_PACKAGE_NAME}.ico") elseif (APPLE) list (APPEND CPACK_GENERATOR "STGZ") list (APPEND CPACK_GENERATOR "DragNDrop") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") -# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5lzf.gif") +# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5pl.gif") option (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE "Package the ${PLUGIN_PACKAGE_NAME} Library in a Bundle" OFF) if (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE) @@ -484,7 +467,7 @@ macro (INSTALL_SUPPORT varname) set (CPACK_BUNDLE_NAME "${${PLUGIN_PACKAGE_NAME}_PACKAGE_STRING}") set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") -# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5LZF.icns") +# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5PL.icns") # set (CPACK_BUNDLE_PLIST "${${PLUGIN_PACKAGE_NAME}_BINARY_DIR}/CMakeFiles/Info.plist") set (CPACK_APPLE_GUI_INFO_STRING "${PLUGIN_PACKAGE_NAME} Plugin Library") set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © ???. All rights reserved.") @@ -527,31 +510,23 @@ macro (INSTALL_SUPPORT varname) set (CPACK_RPM_PACKAGE_RELOCATABLE ON) endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") - else () - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};libraries;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};headers;/") - endif () - + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") set (CPACK_ALL_INSTALL_TYPES Full User) set (CPACK_INSTALL_TYPE_FULL_DISPLAY_NAME "Everything") endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - include (CPack) + include (CPack) - cpack_add_component_group(Runtime) + cpack_add_component_group(Runtime) - cpack_add_component (libraries - DISPLAY_NAME "${PLUGIN_NAME} Libraries" - GROUP Runtime - ) - cpack_add_component_group(hdfdocuments - DISPLAY_NAME "${PLUGIN_NAME} Documents" - GROUP Documents - INSTALL_TYPES Full User - ) - endif () + cpack_add_component (libraries + DISPLAY_NAME "${PLUGIN_NAME} Libraries" + GROUP Runtime + ) + cpack_add_component_group(hdfdocuments + DISPLAY_NAME "${PLUGIN_NAME} Documents" + GROUP Documents + INSTALL_TYPES Full User + ) endif () endmacro () diff --git a/LZF/config/cmake/binex/config/cmake/HDFMacros.cmake b/LZF/config/cmake/binex/config/cmake/HDFMacros.cmake index 5e63ec23..ec2113ad 100644 --- a/LZF/config/cmake/binex/config/cmake/HDFMacros.cmake +++ b/LZF/config/cmake/binex/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,9 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) + + include (FetchContent) endmacro () macro (ADD_H5_FLAGS h5_flag_var infile) @@ -506,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/LZF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/LZF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index 46ef02f9..d2fdb5dd 100644 --- a/LZF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/LZF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- @@ -85,9 +86,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -95,7 +100,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -136,7 +141,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () @@ -164,26 +169,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -218,17 +203,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -246,21 +246,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () diff --git a/LZF/config/cmake/binex/example/h5ex_d_lzf.c b/LZF/config/cmake/binex/example/h5ex_d_lzf.c index 348485f1..e4110304 100644 --- a/LZF/config/cmake/binex/example/h5ex_d_lzf.c +++ b/LZF/config/cmake/binex/example/h5ex_d_lzf.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 3; /* number of elements in cd_values */ diff --git a/LZF/config/cmake/binex/example/testfiles/h5ex_d_lzf.ddl b/LZF/config/cmake/binex/example/testfiles/h5ex_d_lzf.ddl index 089a82aa..8ba6d24b 100644 --- a/LZF/config/cmake/binex/example/testfiles/h5ex_d_lzf.ddl +++ b/LZF/config/cmake/binex/example/testfiles/h5ex_d_lzf.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } diff --git a/LZF/config/cmake/binex/example/testfiles/h5ex_d_lzf.tst b/LZF/config/cmake/binex/example/testfiles/h5ex_d_lzf.tst index 96aca413..e070aebc 100755 --- a/LZF/config/cmake/binex/example/testfiles/h5ex_d_lzf.tst +++ b/LZF/config/cmake/binex/example/testfiles/h5ex_d_lzf.tst @@ -5,7 +5,7 @@ lzf filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 32000 Number of parameters is 3 with the value 4 - To find more about the filter check HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading lzf compressed data ................ Maximum value in DS1 is 1890 lzf filter is available now since H5Dread triggered loading of the filter. diff --git a/LZF/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl b/LZF/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl index 32726584..0e8d8cef 100644 --- a/LZF/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl +++ b/LZF/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } @@ -76,7 +76,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } @@ -98,7 +98,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } @@ -120,7 +120,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } @@ -142,7 +142,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } diff --git a/LZF/example/h5ex_d_lzf.c b/LZF/example/h5ex_d_lzf.c index 348485f1..e4110304 100644 --- a/LZF/example/h5ex_d_lzf.c +++ b/LZF/example/h5ex_d_lzf.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 3; /* number of elements in cd_values */ diff --git a/LZF/example/testfiles/h5ex_d_lzf.ddl b/LZF/example/testfiles/h5ex_d_lzf.ddl index 089a82aa..8ba6d24b 100644 --- a/LZF/example/testfiles/h5ex_d_lzf.ddl +++ b/LZF/example/testfiles/h5ex_d_lzf.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } diff --git a/LZF/example/testfiles/h5ex_d_lzf.tst b/LZF/example/testfiles/h5ex_d_lzf.tst index 96aca413..e070aebc 100644 --- a/LZF/example/testfiles/h5ex_d_lzf.tst +++ b/LZF/example/testfiles/h5ex_d_lzf.tst @@ -5,7 +5,7 @@ lzf filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 32000 Number of parameters is 3 with the value 4 - To find more about the filter check HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading lzf compressed data ................ Maximum value in DS1 is 1890 lzf filter is available now since H5Dread triggered loading of the filter. diff --git a/LZF/example/testfiles/h5repack_layout.h5-ud_convert.ddl b/LZF/example/testfiles/h5repack_layout.h5-ud_convert.ddl index 32726584..0e8d8cef 100644 --- a/LZF/example/testfiles/h5repack_layout.h5-ud_convert.ddl +++ b/LZF/example/testfiles/h5repack_layout.h5-ud_convert.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } @@ -76,7 +76,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } @@ -98,7 +98,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } @@ -120,7 +120,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } @@ -142,7 +142,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } diff --git a/LZF/src/H5Zlzf.c b/LZF/src/H5Zlzf.c index 77d82675..3f68565b 100644 --- a/LZF/src/H5Zlzf.c +++ b/LZF/src/H5Zlzf.c @@ -88,7 +88,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* * LZF compression is an external filter registered by PyTables developers * with The HDF Group - * See http://www.hdfgroup.org/services/contributions.html for more information. + * See https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html for more information. */ /* Filter revision number, starting at 1 */ @@ -125,7 +125,7 @@ const H5Z_class2_t H5Z_LZF[1] = {{ 1, /* encoder_present flag (set to true) */ #endif 1, /* decoder_present flag (set to true) */ - "HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html", + "HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html", /* Filter name for debugging */ NULL, /* The "can apply" callback */ (H5Z_set_local_func_t)(H5Z_lzf_set_local), /* The "set local" callback */ diff --git a/MAFISC/config/cmake/HDFMacros.cmake b/MAFISC/config/cmake/HDFMacros.cmake index 0cf9f192..ec2113ad 100644 --- a/MAFISC/config/cmake/HDFMacros.cmake +++ b/MAFISC/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,7 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) include (FetchContent) endmacro () @@ -508,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/MAFISC/config/cmake/HDFPluginMacros.cmake b/MAFISC/config/cmake/HDFPluginMacros.cmake index 528c4d50..b33268e1 100644 --- a/MAFISC/config/cmake/HDFPluginMacros.cmake +++ b/MAFISC/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) string (TOUPPER ${varname} PLUGIN_PACKAGE_VARNAME) @@ -105,32 +106,7 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Setup output Directories #----------------------------------------------------------------------------- - if (NOT ${PLUGIN_PACKAGE_NAME}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${PLUGIN_PACKAGE_NAME}) #----------------------------------------------------------------------------- # Targets built within this project are exported at Install time for use @@ -154,6 +130,8 @@ macro (BASIC_SETTINGS varname) set (LIB_TYPE SHARED) add_definitions (-D${PLUGIN_PACKAGE_NAME}_BUILT_AS_DYNAMIC_LIB) + set (CMAKE_POSITION_INDEPENDENT_CODE ON) + if (MSVC) set (CMAKE_MFC_FLAG 0) endif () @@ -161,9 +139,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -171,7 +153,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -182,11 +164,11 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () - option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" OFF) + option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" ${DISABLE_H5PL_ENCODER}) if (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER) set (FILTER_DECODE_ONLY 1) endif () @@ -217,26 +199,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -271,17 +233,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -299,21 +276,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () @@ -432,12 +409,17 @@ macro (INSTALL_SUPPORT varname) set (CPACK_PACKAGE_VERSION_MAJOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MAJOR}") set (CPACK_PACKAGE_VERSION_MINOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MINOR}") set (CPACK_PACKAGE_VERSION_PATCH "") - #set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") - set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") + set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_README "${CMAKE_BINARY_DIR}/README.txt") set (CPACK_PACKAGE_RELOCATABLE TRUE) set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PLUGIN_NAME} Installation") - set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + if (H5PL_OVERRIDE_VERSION) + string(TOUPPER ${HDF5_PACKAGE_NAME} PLUGIN_HDF5_PACKAGE_NAME) + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${PLUGIN_HDF5_PACKAGE_NAME}/${H5PL_OVERRIDE_VERSION}") + else () + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + endif () set (CPACK_GENERATOR "TGZ") if (WIN32) @@ -470,13 +452,14 @@ macro (INSTALL_SUPPORT varname) endif () # WiX variables set (CPACK_WIX_UNINSTALL "1") - set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/COPYING.txt") +# set (CPACK_WIX_PRODUCT_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}\\\\${PLUGIN_PACKAGE_NAME}.ico") elseif (APPLE) list (APPEND CPACK_GENERATOR "STGZ") list (APPEND CPACK_GENERATOR "DragNDrop") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") -# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5mafisc.gif") +# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5pl.gif") option (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE "Package the ${PLUGIN_PACKAGE_NAME} Library in a Bundle" OFF) if (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE) @@ -484,7 +467,7 @@ macro (INSTALL_SUPPORT varname) set (CPACK_BUNDLE_NAME "${${PLUGIN_PACKAGE_NAME}_PACKAGE_STRING}") set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") -# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5MAFISC.icns") +# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5PL.icns") # set (CPACK_BUNDLE_PLIST "${${PLUGIN_PACKAGE_NAME}_BINARY_DIR}/CMakeFiles/Info.plist") set (CPACK_APPLE_GUI_INFO_STRING "${PLUGIN_PACKAGE_NAME} Plugin Library") set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © ???. All rights reserved.") @@ -527,31 +510,23 @@ macro (INSTALL_SUPPORT varname) set (CPACK_RPM_PACKAGE_RELOCATABLE ON) endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") - else () - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};libraries;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};headers;/") - endif () - + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") set (CPACK_ALL_INSTALL_TYPES Full User) set (CPACK_INSTALL_TYPE_FULL_DISPLAY_NAME "Everything") endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - include (CPack) + include (CPack) - cpack_add_component_group(Runtime) + cpack_add_component_group(Runtime) - cpack_add_component (libraries - DISPLAY_NAME "${PLUGIN_NAME} Libraries" - GROUP Runtime - ) - cpack_add_component_group(hdfdocuments - DISPLAY_NAME "${PLUGIN_NAME} Documents" - GROUP Documents - INSTALL_TYPES Full User - ) - endif () + cpack_add_component (libraries + DISPLAY_NAME "${PLUGIN_NAME} Libraries" + GROUP Runtime + ) + cpack_add_component_group(hdfdocuments + DISPLAY_NAME "${PLUGIN_NAME} Documents" + GROUP Documents + INSTALL_TYPES Full User + ) endif () endmacro () diff --git a/MAFISC/config/cmake/binex/config/cmake/HDFMacros.cmake b/MAFISC/config/cmake/binex/config/cmake/HDFMacros.cmake index 5e63ec23..ec2113ad 100644 --- a/MAFISC/config/cmake/binex/config/cmake/HDFMacros.cmake +++ b/MAFISC/config/cmake/binex/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,9 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) + + include (FetchContent) endmacro () macro (ADD_H5_FLAGS h5_flag_var infile) @@ -506,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/MAFISC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/MAFISC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index 46ef02f9..d2fdb5dd 100644 --- a/MAFISC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/MAFISC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- @@ -85,9 +86,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -95,7 +100,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -136,7 +141,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () @@ -164,26 +169,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -218,17 +203,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -246,21 +246,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () diff --git a/MAFISC/config/cmake/binex/example/h5ex_d_mafisc.c b/MAFISC/config/cmake/binex/example/h5ex_d_mafisc.c index f79586f4..46789644 100644 --- a/MAFISC/config/cmake/binex/example/h5ex_d_mafisc.c +++ b/MAFISC/config/cmake/binex/example/h5ex_d_mafisc.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 8; /* number of elements in cd_values */ diff --git a/MAFISC/example/h5ex_d_mafisc.c b/MAFISC/example/h5ex_d_mafisc.c index f79586f4..46789644 100644 --- a/MAFISC/example/h5ex_d_mafisc.c +++ b/MAFISC/example/h5ex_d_mafisc.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 8; /* number of elements in cd_values */ diff --git a/SZ/config/cmake/HDFMacros.cmake b/SZ/config/cmake/HDFMacros.cmake index 0cf9f192..ec2113ad 100644 --- a/SZ/config/cmake/HDFMacros.cmake +++ b/SZ/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,7 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) include (FetchContent) endmacro () @@ -508,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/SZ/config/cmake/HDFPluginMacros.cmake b/SZ/config/cmake/HDFPluginMacros.cmake index 5f3dbcb4..b33268e1 100644 --- a/SZ/config/cmake/HDFPluginMacros.cmake +++ b/SZ/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) string (TOUPPER ${varname} PLUGIN_PACKAGE_VARNAME) @@ -105,32 +106,7 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Setup output Directories #----------------------------------------------------------------------------- - if (NOT ${PLUGIN_PACKAGE_NAME}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${PLUGIN_PACKAGE_NAME}) #----------------------------------------------------------------------------- # Targets built within this project are exported at Install time for use @@ -154,6 +130,8 @@ macro (BASIC_SETTINGS varname) set (LIB_TYPE SHARED) add_definitions (-D${PLUGIN_PACKAGE_NAME}_BUILT_AS_DYNAMIC_LIB) + set (CMAKE_POSITION_INDEPENDENT_CODE ON) + if (MSVC) set (CMAKE_MFC_FLAG 0) endif () @@ -161,9 +139,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -171,7 +153,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -182,11 +164,11 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () - option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" OFF) + option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" ${DISABLE_H5PL_ENCODER}) if (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER) set (FILTER_DECODE_ONLY 1) endif () @@ -217,26 +199,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -271,17 +233,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -299,21 +276,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () @@ -432,12 +409,17 @@ macro (INSTALL_SUPPORT varname) set (CPACK_PACKAGE_VERSION_MAJOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MAJOR}") set (CPACK_PACKAGE_VERSION_MINOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MINOR}") set (CPACK_PACKAGE_VERSION_PATCH "") - #set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") - set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") + set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_README "${CMAKE_BINARY_DIR}/README.txt") set (CPACK_PACKAGE_RELOCATABLE TRUE) set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PLUGIN_NAME} Installation") - set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + if (H5PL_OVERRIDE_VERSION) + string(TOUPPER ${HDF5_PACKAGE_NAME} PLUGIN_HDF5_PACKAGE_NAME) + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${PLUGIN_HDF5_PACKAGE_NAME}/${H5PL_OVERRIDE_VERSION}") + else () + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + endif () set (CPACK_GENERATOR "TGZ") if (WIN32) @@ -470,13 +452,14 @@ macro (INSTALL_SUPPORT varname) endif () # WiX variables set (CPACK_WIX_UNINSTALL "1") - set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/COPYING.txt") +# set (CPACK_WIX_PRODUCT_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}\\\\${PLUGIN_PACKAGE_NAME}.ico") elseif (APPLE) list (APPEND CPACK_GENERATOR "STGZ") list (APPEND CPACK_GENERATOR "DragNDrop") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") -# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5sz.gif") +# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5pl.gif") option (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE "Package the ${PLUGIN_PACKAGE_NAME} Library in a Bundle" OFF) if (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE) @@ -484,7 +467,7 @@ macro (INSTALL_SUPPORT varname) set (CPACK_BUNDLE_NAME "${${PLUGIN_PACKAGE_NAME}_PACKAGE_STRING}") set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") -# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5SZ.icns") +# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5PL.icns") # set (CPACK_BUNDLE_PLIST "${${PLUGIN_PACKAGE_NAME}_BINARY_DIR}/CMakeFiles/Info.plist") set (CPACK_APPLE_GUI_INFO_STRING "${PLUGIN_PACKAGE_NAME} Plugin Library") set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © ???. All rights reserved.") @@ -527,31 +510,23 @@ macro (INSTALL_SUPPORT varname) set (CPACK_RPM_PACKAGE_RELOCATABLE ON) endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") - else () - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};libraries;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};headers;/") - endif () - + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") set (CPACK_ALL_INSTALL_TYPES Full User) set (CPACK_INSTALL_TYPE_FULL_DISPLAY_NAME "Everything") endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - include (CPack) + include (CPack) - cpack_add_component_group(Runtime) + cpack_add_component_group(Runtime) - cpack_add_component (libraries - DISPLAY_NAME "${PLUGIN_NAME} Libraries" - GROUP Runtime - ) - cpack_add_component_group(hdfdocuments - DISPLAY_NAME "${PLUGIN_NAME} Documents" - GROUP Documents - INSTALL_TYPES Full User - ) - endif () + cpack_add_component (libraries + DISPLAY_NAME "${PLUGIN_NAME} Libraries" + GROUP Runtime + ) + cpack_add_component_group(hdfdocuments + DISPLAY_NAME "${PLUGIN_NAME} Documents" + GROUP Documents + INSTALL_TYPES Full User + ) endif () endmacro () diff --git a/SZ/config/cmake/binex/config/cmake/HDFMacros.cmake b/SZ/config/cmake/binex/config/cmake/HDFMacros.cmake index 5e63ec23..ec2113ad 100644 --- a/SZ/config/cmake/binex/config/cmake/HDFMacros.cmake +++ b/SZ/config/cmake/binex/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,9 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) + + include (FetchContent) endmacro () macro (ADD_H5_FLAGS h5_flag_var infile) @@ -506,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/SZ/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/SZ/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index 46ef02f9..d2fdb5dd 100644 --- a/SZ/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/SZ/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- @@ -85,9 +86,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -95,7 +100,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -136,7 +141,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () @@ -164,26 +169,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -218,17 +203,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -246,21 +246,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () diff --git a/SZ/config/cmake/binex/example/h5ex_d_sz.c b/SZ/config/cmake/binex/example/h5ex_d_sz.c index 89fb0a29..c3ca76bc 100644 --- a/SZ/config/cmake/binex/example/h5ex_d_sz.c +++ b/SZ/config/cmake/binex/example/h5ex_d_sz.c @@ -52,7 +52,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[DIM_SIZE] = {DIM0, DIM1, DIM2}, chunk[DIM_SIZE] = {CHUNK0, CHUNK1, CHUNK2}; size_t nelmts = 9; /* number of elements in cd_values */ diff --git a/SZ/example/h5ex_d_sz.c b/SZ/example/h5ex_d_sz.c index 89fb0a29..c3ca76bc 100644 --- a/SZ/example/h5ex_d_sz.c +++ b/SZ/example/h5ex_d_sz.c @@ -52,7 +52,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[DIM_SIZE] = {DIM0, DIM1, DIM2}, chunk[DIM_SIZE] = {CHUNK0, CHUNK1, CHUNK2}; size_t nelmts = 9; /* number of elements in cd_values */ diff --git a/SZ/src/H5Zszf.c b/SZ/src/H5Zszf.c index 07bf035d..5ad511d8 100644 --- a/SZ/src/H5Zszf.c +++ b/SZ/src/H5Zszf.c @@ -18,7 +18,7 @@ /* * SZ compression is an external filter registered with The HDF Group - * See http://www.hdfgroup.org/services/contributions.html for more information. + * See https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html for more information. */ /* Filter revision number, starting at 1 */ diff --git a/ZFP/config/cmake/HDFMacros.cmake b/ZFP/config/cmake/HDFMacros.cmake index 0cf9f192..ec2113ad 100644 --- a/ZFP/config/cmake/HDFMacros.cmake +++ b/ZFP/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,7 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) include (FetchContent) endmacro () @@ -508,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/ZFP/config/cmake/HDFPluginMacros.cmake b/ZFP/config/cmake/HDFPluginMacros.cmake index 9aed6ebd..b33268e1 100644 --- a/ZFP/config/cmake/HDFPluginMacros.cmake +++ b/ZFP/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) string (TOUPPER ${varname} PLUGIN_PACKAGE_VARNAME) @@ -105,32 +106,7 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Setup output Directories #----------------------------------------------------------------------------- - if (NOT ${PLUGIN_PACKAGE_NAME}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${PLUGIN_PACKAGE_NAME}) #----------------------------------------------------------------------------- # Targets built within this project are exported at Install time for use @@ -154,6 +130,8 @@ macro (BASIC_SETTINGS varname) set (LIB_TYPE SHARED) add_definitions (-D${PLUGIN_PACKAGE_NAME}_BUILT_AS_DYNAMIC_LIB) + set (CMAKE_POSITION_INDEPENDENT_CODE ON) + if (MSVC) set (CMAKE_MFC_FLAG 0) endif () @@ -161,9 +139,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -171,7 +153,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -182,11 +164,11 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () - option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" OFF) + option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" ${DISABLE_H5PL_ENCODER}) if (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER) set (FILTER_DECODE_ONLY 1) endif () @@ -217,26 +199,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -271,17 +233,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -299,21 +276,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () @@ -432,12 +409,17 @@ macro (INSTALL_SUPPORT varname) set (CPACK_PACKAGE_VERSION_MAJOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MAJOR}") set (CPACK_PACKAGE_VERSION_MINOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MINOR}") set (CPACK_PACKAGE_VERSION_PATCH "") - #set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") - set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") + set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_README "${CMAKE_BINARY_DIR}/README.txt") set (CPACK_PACKAGE_RELOCATABLE TRUE) set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PLUGIN_NAME} Installation") - set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + if (H5PL_OVERRIDE_VERSION) + string(TOUPPER ${HDF5_PACKAGE_NAME} PLUGIN_HDF5_PACKAGE_NAME) + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${PLUGIN_HDF5_PACKAGE_NAME}/${H5PL_OVERRIDE_VERSION}") + else () + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + endif () set (CPACK_GENERATOR "TGZ") if (WIN32) @@ -470,13 +452,14 @@ macro (INSTALL_SUPPORT varname) endif () # WiX variables set (CPACK_WIX_UNINSTALL "1") - set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/COPYING.txt") +# set (CPACK_WIX_PRODUCT_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}\\\\${PLUGIN_PACKAGE_NAME}.ico") elseif (APPLE) list (APPEND CPACK_GENERATOR "STGZ") list (APPEND CPACK_GENERATOR "DragNDrop") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") -# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5zfp.gif") +# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5pl.gif") option (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE "Package the ${PLUGIN_PACKAGE_NAME} Library in a Bundle" OFF) if (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE) @@ -484,7 +467,7 @@ macro (INSTALL_SUPPORT varname) set (CPACK_BUNDLE_NAME "${${PLUGIN_PACKAGE_NAME}_PACKAGE_STRING}") set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") -# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5ZFP.icns") +# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5PL.icns") # set (CPACK_BUNDLE_PLIST "${${PLUGIN_PACKAGE_NAME}_BINARY_DIR}/CMakeFiles/Info.plist") set (CPACK_APPLE_GUI_INFO_STRING "${PLUGIN_PACKAGE_NAME} Plugin Library") set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © ???. All rights reserved.") @@ -527,31 +510,23 @@ macro (INSTALL_SUPPORT varname) set (CPACK_RPM_PACKAGE_RELOCATABLE ON) endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") - else () - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};libraries;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};headers;/") - endif () - + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") set (CPACK_ALL_INSTALL_TYPES Full User) set (CPACK_INSTALL_TYPE_FULL_DISPLAY_NAME "Everything") endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - include (CPack) + include (CPack) - cpack_add_component_group(Runtime) + cpack_add_component_group(Runtime) - cpack_add_component (libraries - DISPLAY_NAME "${PLUGIN_NAME} Libraries" - GROUP Runtime - ) - cpack_add_component_group(hdfdocuments - DISPLAY_NAME "${PLUGIN_NAME} Documents" - GROUP Documents - INSTALL_TYPES Full User - ) - endif () + cpack_add_component (libraries + DISPLAY_NAME "${PLUGIN_NAME} Libraries" + GROUP Runtime + ) + cpack_add_component_group(hdfdocuments + DISPLAY_NAME "${PLUGIN_NAME} Documents" + GROUP Documents + INSTALL_TYPES Full User + ) endif () endmacro () diff --git a/ZFP/config/cmake/binex/config/cmake/HDFMacros.cmake b/ZFP/config/cmake/binex/config/cmake/HDFMacros.cmake index 5e63ec23..ec2113ad 100644 --- a/ZFP/config/cmake/binex/config/cmake/HDFMacros.cmake +++ b/ZFP/config/cmake/binex/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,9 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) + + include (FetchContent) endmacro () macro (ADD_H5_FLAGS h5_flag_var infile) @@ -506,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/ZFP/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/ZFP/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index 46ef02f9..d2fdb5dd 100644 --- a/ZFP/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/ZFP/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- @@ -85,9 +86,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -95,7 +100,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -136,7 +141,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () @@ -164,26 +169,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -218,17 +203,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -246,21 +246,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () diff --git a/ZFP/config/cmake/binex/example/h5ex_d_zfp.c b/ZFP/config/cmake/binex/example/h5ex_d_zfp.c index 511d6744..3c909724 100644 --- a/ZFP/config/cmake/binex/example/h5ex_d_zfp.c +++ b/ZFP/config/cmake/binex/example/h5ex_d_zfp.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 3; /* number of elements in cd_values */ diff --git a/ZFP/example/h5ex_d_zfp.c b/ZFP/example/h5ex_d_zfp.c index 511d6744..3c909724 100644 --- a/ZFP/example/h5ex_d_zfp.c +++ b/ZFP/example/h5ex_d_zfp.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 3; /* number of elements in cd_values */ diff --git a/ZSTD/config/cmake/HDFMacros.cmake b/ZSTD/config/cmake/HDFMacros.cmake index 0cf9f192..ec2113ad 100644 --- a/ZSTD/config/cmake/HDFMacros.cmake +++ b/ZSTD/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,7 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) include (FetchContent) endmacro () @@ -508,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/ZSTD/config/cmake/HDFPluginMacros.cmake b/ZSTD/config/cmake/HDFPluginMacros.cmake index 0a16a398..b33268e1 100644 --- a/ZSTD/config/cmake/HDFPluginMacros.cmake +++ b/ZSTD/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) string (TOUPPER ${varname} PLUGIN_PACKAGE_VARNAME) @@ -105,32 +106,7 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Setup output Directories #----------------------------------------------------------------------------- - if (NOT ${PLUGIN_PACKAGE_NAME}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${PLUGIN_PACKAGE_NAME}) #----------------------------------------------------------------------------- # Targets built within this project are exported at Install time for use @@ -154,6 +130,8 @@ macro (BASIC_SETTINGS varname) set (LIB_TYPE SHARED) add_definitions (-D${PLUGIN_PACKAGE_NAME}_BUILT_AS_DYNAMIC_LIB) + set (CMAKE_POSITION_INDEPENDENT_CODE ON) + if (MSVC) set (CMAKE_MFC_FLAG 0) endif () @@ -161,9 +139,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -171,7 +153,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -182,11 +164,11 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () - option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" OFF) + option (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER "build the ${PLUGIN_NAME} library without encoding" ${DISABLE_H5PL_ENCODER}) if (DISABLE_${PLUGIN_PACKAGE_NAME}_ENCODER) set (FILTER_DECODE_ONLY 1) endif () @@ -217,26 +199,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -271,17 +233,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -299,21 +276,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () @@ -432,12 +409,17 @@ macro (INSTALL_SUPPORT varname) set (CPACK_PACKAGE_VERSION_MAJOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MAJOR}") set (CPACK_PACKAGE_VERSION_MINOR "${${PLUGIN_PACKAGE_NAME}_PACKAGE_VERSION_MINOR}") set (CPACK_PACKAGE_VERSION_PATCH "") - #set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") - set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") - set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") + set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_README "${CMAKE_BINARY_DIR}/README.txt") set (CPACK_PACKAGE_RELOCATABLE TRUE) set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PLUGIN_NAME} Installation") - set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + if (H5PL_OVERRIDE_VERSION) + string(TOUPPER ${HDF5_PACKAGE_NAME} PLUGIN_HDF5_PACKAGE_NAME) + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${PLUGIN_HDF5_PACKAGE_NAME}/${H5PL_OVERRIDE_VERSION}") + else () + set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + endif () set (CPACK_GENERATOR "TGZ") if (WIN32) @@ -470,13 +452,14 @@ macro (INSTALL_SUPPORT varname) endif () # WiX variables set (CPACK_WIX_UNINSTALL "1") - set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/README.txt") + set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/COPYING.txt") +# set (CPACK_WIX_PRODUCT_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}\\\\${PLUGIN_PACKAGE_NAME}.ico") elseif (APPLE) list (APPEND CPACK_GENERATOR "STGZ") list (APPEND CPACK_GENERATOR "DragNDrop") set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") -# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5zstd.gif") +# set (CPACK_PACKAGE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/h5pl.gif") option (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE "Package the ${PLUGIN_PACKAGE_NAME} Library in a Bundle" OFF) if (${PLUGIN_PACKAGE_NAME}_PACK_MACOSX_BUNDLE) @@ -484,7 +467,7 @@ macro (INSTALL_SUPPORT varname) set (CPACK_BUNDLE_NAME "${${PLUGIN_PACKAGE_NAME}_PACKAGE_STRING}") set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") -# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5ZSTD.icns") +# set (CPACK_BUNDLE_ICON "${${PLUGIN_PACKAGE_NAME}_RESOURCES_DIR}/H5PL.icns") # set (CPACK_BUNDLE_PLIST "${${PLUGIN_PACKAGE_NAME}_BINARY_DIR}/CMakeFiles/Info.plist") set (CPACK_APPLE_GUI_INFO_STRING "${PLUGIN_PACKAGE_NAME} Plugin Library") set (CPACK_APPLE_GUI_COPYRIGHT "Copyright © ???. All rights reserved.") @@ -527,31 +510,23 @@ macro (INSTALL_SUPPORT varname) set (CPACK_RPM_PACKAGE_RELOCATABLE ON) endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") - else () - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};libraries;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};headers;/") - endif () - + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${${PLUGIN_PACKAGE_NAME}_BINARY_DIR};${PLUGIN_NAME};ALL;/") set (CPACK_ALL_INSTALL_TYPES Full User) set (CPACK_INSTALL_TYPE_FULL_DISPLAY_NAME "Everything") endif () - if (${PLUGIN_PACKAGE_NAME}_CPACK_ENABLE) - include (CPack) + include (CPack) - cpack_add_component_group(Runtime) + cpack_add_component_group(Runtime) - cpack_add_component (libraries - DISPLAY_NAME "${PLUGIN_NAME} Libraries" - GROUP Runtime - ) - cpack_add_component_group(hdfdocuments - DISPLAY_NAME "${PLUGIN_NAME} Documents" - GROUP Documents - INSTALL_TYPES Full User - ) - endif () + cpack_add_component (libraries + DISPLAY_NAME "${PLUGIN_NAME} Libraries" + GROUP Runtime + ) + cpack_add_component_group(hdfdocuments + DISPLAY_NAME "${PLUGIN_NAME} Documents" + GROUP Documents + INSTALL_TYPES Full User + ) endif () endmacro () diff --git a/ZSTD/config/cmake/binex/config/cmake/HDFMacros.cmake b/ZSTD/config/cmake/binex/config/cmake/HDFMacros.cmake index 5e63ec23..ec2113ad 100644 --- a/ZSTD/config/cmake/binex/config/cmake/HDFMacros.cmake +++ b/ZSTD/config/cmake/binex/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,9 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) + + include (FetchContent) endmacro () macro (ADD_H5_FLAGS h5_flag_var infile) @@ -506,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/ZSTD/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/ZSTD/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index 46ef02f9..d2fdb5dd 100644 --- a/ZSTD/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/ZSTD/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- @@ -85,9 +86,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -95,7 +100,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -136,7 +141,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () @@ -164,26 +169,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -218,17 +203,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -246,21 +246,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () diff --git a/ZSTD/config/cmake/binex/example/h5ex_d_zstd.c b/ZSTD/config/cmake/binex/example/h5ex_d_zstd.c index 9fa945c5..29064884 100644 --- a/ZSTD/config/cmake/binex/example/h5ex_d_zstd.c +++ b/ZSTD/config/cmake/binex/example/h5ex_d_zstd.c @@ -44,7 +44,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[3] = {NUM_IMAGES, DIM0, DIM1}, chunk[3] = {CHUNK0, CHUNK1, CHUNK2}; size_t nelmts = 1; /* number of elements in cd_values */ diff --git a/ZSTD/config/cmake/binex/example/testfiles/h5ex_d_zstd.ddl b/ZSTD/config/cmake/binex/example/testfiles/h5ex_d_zstd.ddl index c9513569..c40864ad 100644 --- a/ZSTD/config/cmake/binex/example/testfiles/h5ex_d_zstd.ddl +++ b/ZSTD/config/cmake/binex/example/testfiles/h5ex_d_zstd.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32015 - COMMENT HDF5 zstd filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 zstd filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 0 } } } diff --git a/ZSTD/config/cmake/binex/example/testfiles/h5ex_d_zstd.tst b/ZSTD/config/cmake/binex/example/testfiles/h5ex_d_zstd.tst index 3789a3eb..07c1a5c5 100644 --- a/ZSTD/config/cmake/binex/example/testfiles/h5ex_d_zstd.tst +++ b/ZSTD/config/cmake/binex/example/testfiles/h5ex_d_zstd.tst @@ -5,7 +5,7 @@ zstd filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 32015 Number of parameters is 1 with the value 0 - To find more about the filter check HDF5 zstd filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 zstd filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading zstd compressed data ................ ZSTD number of differing array elements=0 zstd filter is available now since H5Dread triggered loading of the filter. diff --git a/ZSTD/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl b/ZSTD/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl index f21ecc2b..068607d7 100644 --- a/ZSTD/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl +++ b/ZSTD/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 zstd filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 zstd filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 zstd filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 zstd filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 zstd filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 zstd filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -76,7 +76,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 zstd filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 zstd filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -98,7 +98,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 zstd filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 zstd filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -120,7 +120,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 zstd filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 zstd filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -142,7 +142,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 zstd filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 zstd filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } diff --git a/ZSTD/example/h5ex_d_zstd.c b/ZSTD/example/h5ex_d_zstd.c index ffe2c95c..f0d0f50f 100644 --- a/ZSTD/example/h5ex_d_zstd.c +++ b/ZSTD/example/h5ex_d_zstd.c @@ -44,7 +44,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[3] = {NUM_IMAGES, DIM0, DIM1}, chunk[3] = {CHUNK0, CHUNK1, CHUNK2}; size_t nelmts = 1; /* number of elements in cd_values */ diff --git a/ZSTD/example/testfiles/h5ex_d_zstd.ddl b/ZSTD/example/testfiles/h5ex_d_zstd.ddl index c9513569..c40864ad 100644 --- a/ZSTD/example/testfiles/h5ex_d_zstd.ddl +++ b/ZSTD/example/testfiles/h5ex_d_zstd.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32015 - COMMENT HDF5 zstd filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 zstd filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 0 } } } diff --git a/ZSTD/example/testfiles/h5ex_d_zstd.tst b/ZSTD/example/testfiles/h5ex_d_zstd.tst index 3789a3eb..07c1a5c5 100644 --- a/ZSTD/example/testfiles/h5ex_d_zstd.tst +++ b/ZSTD/example/testfiles/h5ex_d_zstd.tst @@ -5,7 +5,7 @@ zstd filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 32015 Number of parameters is 1 with the value 0 - To find more about the filter check HDF5 zstd filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 zstd filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading zstd compressed data ................ ZSTD number of differing array elements=0 zstd filter is available now since H5Dread triggered loading of the filter. diff --git a/ZSTD/src/H5Zzstd.c b/ZSTD/src/H5Zzstd.c index 2cccc653..8de061dc 100644 --- a/ZSTD/src/H5Zzstd.c +++ b/ZSTD/src/H5Zzstd.c @@ -34,7 +34,7 @@ const H5Z_class2_t H5Z_ZSTD[1] = {{ 1, /* encoder_present flag (set to true) */ #endif 1, /* decoder_present flag (set to true) */ - "HDF5 zstd filter; see http://www.hdfgroup.org/services/contributions.html", + "HDF5 zstd filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html", /* Filter name for debugging */ NULL, /* The "can apply" callback */ NULL, /* The "set local" callback */ diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake index 0cf9f192..ec2113ad 100644 --- a/config/cmake/HDFMacros.cmake +++ b/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,7 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) include (FetchContent) endmacro () @@ -508,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/config/cmake/HDFPluginMacros.cmake b/config/cmake/HDFPluginMacros.cmake index 0d58a7ee..b33268e1 100644 --- a/config/cmake/HDFPluginMacros.cmake +++ b/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) string (TOUPPER ${varname} PLUGIN_PACKAGE_VARNAME) @@ -105,32 +106,7 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Setup output Directories #----------------------------------------------------------------------------- - if (NOT ${PLUGIN_PACKAGE_NAME}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${PLUGIN_PACKAGE_NAME}) #----------------------------------------------------------------------------- # Targets built within this project are exported at Install time for use @@ -154,6 +130,8 @@ macro (BASIC_SETTINGS varname) set (LIB_TYPE SHARED) add_definitions (-D${PLUGIN_PACKAGE_NAME}_BUILT_AS_DYNAMIC_LIB) + set (CMAKE_POSITION_INDEPENDENT_CODE ON) + if (MSVC) set (CMAKE_MFC_FLAG 0) endif () @@ -161,9 +139,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -171,7 +153,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -182,7 +164,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () @@ -217,26 +199,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -271,17 +233,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -299,21 +276,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () diff --git a/config/cmake/binex/config/cmake/HDFMacros.cmake b/config/cmake/binex/config/cmake/HDFMacros.cmake index 5e63ec23..ec2113ad 100644 --- a/config/cmake/binex/config/cmake/HDFMacros.cmake +++ b/config/cmake/binex/config/cmake/HDFMacros.cmake @@ -10,6 +10,41 @@ # help@hdfgroup.org. # +#------------------------------------------------------------------------------- +# Setup output Directories +#----------------------------------------------------------------------------- +macro (SET_HDF_OUTPUT_DIRS package_prefix) + if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." + ) + set (CMAKE_LIBRARY_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" + ) + set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." + ) + set (CMAKE_Fortran_MODULE_DIRECTORY + ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." + ) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) + set (CMAKE_PDB_OUTPUT_DIRECTORY + ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." + ) + else () + set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif () + else () + # if we are externally configured, but the project uses old cmake scripts + # this may not be set and utilities like H5detect will fail + if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) + endif () + endif () +endmacro () + #------------------------------------------------------------------------------- macro (SET_HDF_BUILD_TYPE) get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) @@ -344,7 +379,7 @@ macro (HDFTEST_COPY_FILE src dest target) endmacro () macro (HDF_DIR_PATHS package_prefix) - option (H5PL_USE_GNU_DIRS "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings" FALSE) + option (H5PL_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF) if (H5PL_USE_GNU_DIRS) include(GNUInstallDirs) if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -375,7 +410,7 @@ macro (HDF_DIR_PATHS package_prefix) endif () if (APPLE) - option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE) + option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF) endif () if (NOT ${package_prefix}_INSTALL_BIN_DIR) @@ -424,10 +459,10 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Always use full RPATH, i.e. don't skip the full RPATH for the build tree - set (CMAKE_SKIP_BUILD_RPATH FALSE) + set (CMAKE_SKIP_BUILD_RPATH OFF) # when building, don't use the install RPATH already # (but later on when installing) - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) + set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF) # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH set (CMAKE_BUILD_WITH_INSTALL_RPATH ON) @@ -458,38 +493,9 @@ macro (HDF_DIR_PATHS package_prefix) SET_HDF_BUILD_TYPE() -#----------------------------------------------------------------------------- -# Setup output Directories -#----------------------------------------------------------------------------- - if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables." - ) - set (CMAKE_LIBRARY_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries" - ) - set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries." - ) - set (CMAKE_Fortran_MODULE_DIRECTORY - ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules." - ) - get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) - if(_isMultiConfig) - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}) - set (CMAKE_PDB_OUTPUT_DIRECTORY - ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files." - ) - else () - set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) - endif () - else () - # if we are externally configured, but the project uses old cmake scripts - # this may not be set and utilities like H5detect will fail - if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) - endif () - endif () + SET_HDF_OUTPUT_DIRS(${package_prefix}) + + include (FetchContent) endmacro () macro (ADD_H5_FLAGS h5_flag_var infile) @@ -506,4 +512,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile) endforeach () endif () endmacro () - diff --git a/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index 46ef02f9..d2fdb5dd 100644 --- a/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -9,6 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # + #------------------------------------------------------------------------------- macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- @@ -85,9 +86,13 @@ macro (BASIC_SETTINGS varname) set (CMAKE_C_STANDARD 99) set (CMAKE_C_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_STANDARD 98) - set (CMAKE_CXX_STANDARD_REQUIRED TRUE) - set (CMAKE_CXX_EXTENSIONS OFF) + if (HDF_BUILD_CPP_LIB) + ENABLE_LANGUAGE (CXX) + + set (CMAKE_CXX_STANDARD 98) + set (CMAKE_CXX_STANDARD_REQUIRED TRUE) + set (CMAKE_CXX_EXTENSIONS OFF) + endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these @@ -95,7 +100,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -136,7 +141,7 @@ macro (BASIC_SETTINGS varname) if (CMAKE_COMPILER_IS_GNUCC) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () @@ -164,26 +169,6 @@ macro (HDF5_SUPPORT link_hdf) find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") if (HDF5_FOUND) - if (USE_SHARED_LIBS) - if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) - add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) - endif () - if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) - add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) - endif () - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - else () - if (NOT TARGET ${HDF5_NAMESPACE}h5dump) - add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - endif() - if (NOT TARGET ${HDF5_NAMESPACE}h5repack) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) - endif() - set (H5PL_HDF5_DUMP_EXECUTABLE $) - set (H5PL_HDF5_REPACK_EXECUTABLE $) - endif() - if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) #find library from non-dual-binary package set (FIND_HDF_COMPONENTS C) @@ -218,17 +203,32 @@ macro (HDF5_SUPPORT link_hdf) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump-shared") - set_property (TARGET ${HDF5_NAMESPACE}h5repack-shared PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack-shared") else () set (H5PL_HDF5_LINK_LIBS ${H5PL_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) if (${link_hdf}) #plugin source needs to be linked with HDF5 set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) endif () - set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") endif () + if (HDF5_VERSION VERSION_LESS "1.14.4" AND NOT HDF5_shared_C_FOUND) + if (NOT TARGET ${HDF5_NAMESPACE}h5dump-shared) + add_executable (${HDF5_NAMESPACE}h5dump-shared IMPORTED) + endif () + if (NOT TARGET ${HDF5_NAMESPACE}h5repack-shared) + add_executable (${HDF5_NAMESPACE}h5repack-shared IMPORTED) + endif () + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + else () + if (NOT TARGET ${HDF5_NAMESPACE}h5dump) + add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) + endif() + if (NOT TARGET ${HDF5_NAMESPACE}h5repack) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + endif() + set (H5PL_HDF5_DUMP_EXECUTABLE $) + set (H5PL_HDF5_REPACK_EXECUTABLE $) + endif() endif () else () find_package (HDF5) # Legacy find @@ -246,21 +246,21 @@ macro (HDF5_SUPPORT link_hdf) set (H5PL_LINK_LIBS ${H5PL_LINK_LIBS} ${HDF5_LIBRARIES}) endif () add_executable (${HDF5_NAMESPACE}h5dump IMPORTED) - add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") - set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_DUMP_EXECUTABLE $) + add_executable (${HDF5_NAMESPACE}h5repack IMPORTED) + set_property (TARGET ${HDF5_NAMESPACE}h5repack PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5repack") set (H5PL_HDF5_REPACK_EXECUTABLE $) endif () set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) if (HDF5_FOUND) - set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) + set (H5PL_HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set (H5PL_HDF5_HAVE_H5PUBCONF_H 1) set (H5PL_HDF5_HAVE_HDF5 1) set (H5PL_HDF5_HEADER "h5pubconf.h") - message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIRS} TOOLS=${HDF5_TOOLS_DIR}") + message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") else () message (FATAL_ERROR " HDF5 is Required for plugin library") endif () diff --git a/config/cmake/binex/example/h5ex_d_blosc.c b/config/cmake/binex/example/h5ex_d_blosc.c index 4eb637ba..b9823c92 100644 --- a/config/cmake/binex/example/h5ex_d_blosc.c +++ b/config/cmake/binex/example/h5ex_d_blosc.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 7; /* number of elements in cd_values */ diff --git a/config/cmake/binex/example/h5ex_d_bshuf.c b/config/cmake/binex/example/h5ex_d_bshuf.c index 3827c258..99c04a80 100644 --- a/config/cmake/binex/example/h5ex_d_bshuf.c +++ b/config/cmake/binex/example/h5ex_d_bshuf.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 3; /* number of elements in cd_values */ diff --git a/config/cmake/binex/example/h5ex_d_bzip2.c b/config/cmake/binex/example/h5ex_d_bzip2.c index b149721e..d539c30a 100644 --- a/config/cmake/binex/example/h5ex_d_bzip2.c +++ b/config/cmake/binex/example/h5ex_d_bzip2.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 1; /* number of elements in cd_values */ diff --git a/config/cmake/binex/example/h5ex_d_jpeg.c b/config/cmake/binex/example/h5ex_d_jpeg.c index deec03bd..2e5d230f 100644 --- a/config/cmake/binex/example/h5ex_d_jpeg.c +++ b/config/cmake/binex/example/h5ex_d_jpeg.c @@ -45,7 +45,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[3] = {NUM_IMAGES, DIM0, DIM1}, chunk[3] = {CHUNK0, CHUNK1, CHUNK2}; size_t nelmts = 4; /* number of elements in cd_values */ diff --git a/config/cmake/binex/example/h5ex_d_lz4.c b/config/cmake/binex/example/h5ex_d_lz4.c index 2425488b..2bb1a7ee 100644 --- a/config/cmake/binex/example/h5ex_d_lz4.c +++ b/config/cmake/binex/example/h5ex_d_lz4.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 1; /* number of elements in cd_values */ diff --git a/config/cmake/binex/example/h5ex_d_lzf.c b/config/cmake/binex/example/h5ex_d_lzf.c index 348485f1..e4110304 100644 --- a/config/cmake/binex/example/h5ex_d_lzf.c +++ b/config/cmake/binex/example/h5ex_d_lzf.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 3; /* number of elements in cd_values */ diff --git a/config/cmake/binex/example/h5ex_d_mafisc.c b/config/cmake/binex/example/h5ex_d_mafisc.c index f79586f4..46789644 100644 --- a/config/cmake/binex/example/h5ex_d_mafisc.c +++ b/config/cmake/binex/example/h5ex_d_mafisc.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 8; /* number of elements in cd_values */ diff --git a/config/cmake/binex/example/h5ex_d_pl.c b/config/cmake/binex/example/h5ex_d_pl.c index 620df66e..60af265d 100644 --- a/config/cmake/binex/example/h5ex_d_pl.c +++ b/config/cmake/binex/example/h5ex_d_pl.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 1; /* number of elements in cd_values */ diff --git a/config/cmake/binex/example/h5ex_d_sz.c b/config/cmake/binex/example/h5ex_d_sz.c index 89fb0a29..c3ca76bc 100644 --- a/config/cmake/binex/example/h5ex_d_sz.c +++ b/config/cmake/binex/example/h5ex_d_sz.c @@ -52,7 +52,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[DIM_SIZE] = {DIM0, DIM1, DIM2}, chunk[DIM_SIZE] = {CHUNK0, CHUNK1, CHUNK2}; size_t nelmts = 9; /* number of elements in cd_values */ diff --git a/config/cmake/binex/example/h5ex_d_zfp.c b/config/cmake/binex/example/h5ex_d_zfp.c index 511d6744..3c909724 100644 --- a/config/cmake/binex/example/h5ex_d_zfp.c +++ b/config/cmake/binex/example/h5ex_d_zfp.c @@ -42,7 +42,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}; size_t nelmts = 3; /* number of elements in cd_values */ diff --git a/config/cmake/binex/example/h5ex_d_zstd.c b/config/cmake/binex/example/h5ex_d_zstd.c index 9fa945c5..29064884 100644 --- a/config/cmake/binex/example/h5ex_d_zstd.c +++ b/config/cmake/binex/example/h5ex_d_zstd.c @@ -44,7 +44,7 @@ main (void) herr_t status; htri_t avail; H5Z_filter_t filter_id = 0; - char filter_name[80]; + char filter_name[128]; hsize_t dims[3] = {NUM_IMAGES, DIM0, DIM1}, chunk[3] = {CHUNK0, CHUNK1, CHUNK2}; size_t nelmts = 1; /* number of elements in cd_values */ diff --git a/config/cmake/binex/example/testfiles/h5ex_d_blosc.ddl b/config/cmake/binex/example/testfiles/h5ex_d_blosc.ddl index 324fa1df..df1a8760 100644 --- a/config/cmake/binex/example/testfiles/h5ex_d_blosc.ddl +++ b/config/cmake/binex/example/testfiles/h5ex_d_blosc.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 128 4 1 2 } } } diff --git a/config/cmake/binex/example/testfiles/h5ex_d_blosc.tst b/config/cmake/binex/example/testfiles/h5ex_d_blosc.tst index ace1975e..ba671c62 100644 --- a/config/cmake/binex/example/testfiles/h5ex_d_blosc.tst +++ b/config/cmake/binex/example/testfiles/h5ex_d_blosc.tst @@ -5,7 +5,7 @@ blosc filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 32001 Number of parameters is 7 with the value 4 1 2 - To find more about the filter check HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading blosc compressed data ................ Maximum value in DS1 is 1890 blosc filter is available now since H5Dread triggered loading of the filter. diff --git a/config/cmake/binex/example/testfiles/h5ex_d_bzip2.ddl b/config/cmake/binex/example/testfiles/h5ex_d_bzip2.ddl index 5cf63389..1ee6d311 100644 --- a/config/cmake/binex/example/testfiles/h5ex_d_bzip2.ddl +++ b/config/cmake/binex/example/testfiles/h5ex_d_bzip2.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 } } } diff --git a/config/cmake/binex/example/testfiles/h5ex_d_bzip2.tst b/config/cmake/binex/example/testfiles/h5ex_d_bzip2.tst index a628ae1d..88eee9f4 100644 --- a/config/cmake/binex/example/testfiles/h5ex_d_bzip2.tst +++ b/config/cmake/binex/example/testfiles/h5ex_d_bzip2.tst @@ -5,7 +5,7 @@ bzip2 filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 307 Number of parameters is 1 with the value 2 - To find more about the filter check HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading bzip2 compressed data ................ Maximum value in DS1 is 1890 bzip2 filter is available now since H5Dread triggered loading of the filter. diff --git a/config/cmake/binex/example/testfiles/h5ex_d_jpeg.ddl b/config/cmake/binex/example/testfiles/h5ex_d_jpeg.ddl index 1dc8928d..233aee3d 100644 --- a/config/cmake/binex/example/testfiles/h5ex_d_jpeg.ddl +++ b/config/cmake/binex/example/testfiles/h5ex_d_jpeg.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32019 - COMMENT HDF5 jpeg filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 jpeg filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 100 1024 512 0 } } } diff --git a/config/cmake/binex/example/testfiles/h5ex_d_jpeg.tst b/config/cmake/binex/example/testfiles/h5ex_d_jpeg.tst index d3f3bf87..979b01c7 100644 --- a/config/cmake/binex/example/testfiles/h5ex_d_jpeg.tst +++ b/config/cmake/binex/example/testfiles/h5ex_d_jpeg.tst @@ -5,7 +5,7 @@ jpeg filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 32019 Number of parameters is 4 with the value 100 - To find more about the filter check HDF5 jpeg filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 jpeg filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading jpeg compressed data ................ JPEG quality=100, percent of differing array elements=0.000000 jpeg filter is available now since H5Dread triggered loading of the filter. diff --git a/config/cmake/binex/example/testfiles/h5ex_d_lz4.ddl b/config/cmake/binex/example/testfiles/h5ex_d_lz4.ddl index f13c950f..ffe02c49 100755 --- a/config/cmake/binex/example/testfiles/h5ex_d_lz4.ddl +++ b/config/cmake/binex/example/testfiles/h5ex_d_lz4.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } diff --git a/config/cmake/binex/example/testfiles/h5ex_d_lz4.tst b/config/cmake/binex/example/testfiles/h5ex_d_lz4.tst index 5e5e9d74..619e1de0 100755 --- a/config/cmake/binex/example/testfiles/h5ex_d_lz4.tst +++ b/config/cmake/binex/example/testfiles/h5ex_d_lz4.tst @@ -5,7 +5,7 @@ lz4 filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 32004 Number of parameters is 1 with the value 3 - To find more about the filter check HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading lz4 compressed data ................ Maximum value in DS1 is 1890 lz4 filter is available now since H5Dread triggered loading of the filter. diff --git a/config/cmake/binex/example/testfiles/h5ex_d_lzf.ddl b/config/cmake/binex/example/testfiles/h5ex_d_lzf.ddl index 089a82aa..8ba6d24b 100644 --- a/config/cmake/binex/example/testfiles/h5ex_d_lzf.ddl +++ b/config/cmake/binex/example/testfiles/h5ex_d_lzf.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32000 - COMMENT HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 4 261 128 } } } diff --git a/config/cmake/binex/example/testfiles/h5ex_d_lzf.tst b/config/cmake/binex/example/testfiles/h5ex_d_lzf.tst index 96aca413..e070aebc 100755 --- a/config/cmake/binex/example/testfiles/h5ex_d_lzf.tst +++ b/config/cmake/binex/example/testfiles/h5ex_d_lzf.tst @@ -5,7 +5,7 @@ lzf filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 32000 Number of parameters is 3 with the value 4 - To find more about the filter check HDF5 lzf filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 lzf filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading lzf compressed data ................ Maximum value in DS1 is 1890 lzf filter is available now since H5Dread triggered loading of the filter. diff --git a/config/cmake/binex/example/testfiles/h5ex_d_pl.ddl b/config/cmake/binex/example/testfiles/h5ex_d_pl.ddl index 179ca4d4..3b92ed62 100644 --- a/config/cmake/binex/example/testfiles/h5ex_d_pl.ddl +++ b/config/cmake/binex/example/testfiles/h5ex_d_pl.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 } } } diff --git a/config/cmake/binex/example/testfiles/h5ex_d_pl.tst b/config/cmake/binex/example/testfiles/h5ex_d_pl.tst index a628ae1d..88eee9f4 100644 --- a/config/cmake/binex/example/testfiles/h5ex_d_pl.tst +++ b/config/cmake/binex/example/testfiles/h5ex_d_pl.tst @@ -5,7 +5,7 @@ bzip2 filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 307 Number of parameters is 1 with the value 2 - To find more about the filter check HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading bzip2 compressed data ................ Maximum value in DS1 is 1890 bzip2 filter is available now since H5Dread triggered loading of the filter. diff --git a/config/cmake/binex/example/testfiles/h5ex_d_zstd.ddl b/config/cmake/binex/example/testfiles/h5ex_d_zstd.ddl index c9513569..c40864ad 100644 --- a/config/cmake/binex/example/testfiles/h5ex_d_zstd.ddl +++ b/config/cmake/binex/example/testfiles/h5ex_d_zstd.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32015 - COMMENT HDF5 zstd filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 zstd filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 0 } } } diff --git a/config/cmake/binex/example/testfiles/h5ex_d_zstd.tst b/config/cmake/binex/example/testfiles/h5ex_d_zstd.tst index 3789a3eb..07c1a5c5 100644 --- a/config/cmake/binex/example/testfiles/h5ex_d_zstd.tst +++ b/config/cmake/binex/example/testfiles/h5ex_d_zstd.tst @@ -5,7 +5,7 @@ zstd filter is available for encoding and decoding. Filter info is available from the dataset creation property Filter identifier is 32015 Number of parameters is 1 with the value 0 - To find more about the filter check HDF5 zstd filter; see http://www.hdfgroup.org/services/contributions.html + To find more about the filter check HDF5 zstd filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html ....Reading zstd compressed data ................ ZSTD number of differing array elements=0 zstd filter is available now since H5Dread triggered loading of the filter. diff --git a/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl b/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl index a1425c71..87115328 100644 --- a/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl +++ b/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_convert.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } diff --git a/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_blosc_convert.ddl b/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_blosc_convert.ddl index 71eef2a2..15b86b40 100644 --- a/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_blosc_convert.ddl +++ b/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_blosc_convert.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 0 } } } diff --git a/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_bz2_convert.ddl b/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_bz2_convert.ddl index c49234c4..da5da027 100644 --- a/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_bz2_convert.ddl +++ b/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_bz2_convert.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } diff --git a/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_convert.ddl b/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_convert.ddl index c7c20df1..22437755 100644 --- a/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_convert.ddl +++ b/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_convert.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { XXXX } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { XXXX } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { XXXX } } } diff --git a/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_lz4_convert.ddl b/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_lz4_convert.ddl index d94586e1..42a416d1 100644 --- a/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_lz4_convert.ddl +++ b/config/cmake/binex/example/testfiles/h5repack_layout.h5-ud_pl_lz4_convert.ddl @@ -10,7 +10,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 307 - COMMENT HDF5 bzip2 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 bzip2 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 9 } } } @@ -32,7 +32,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32001 - COMMENT HDF5 blosc filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 blosc filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 2 2 4 3200 5 1 0 } } } @@ -54,7 +54,7 @@ GROUP "/" { FILTERS { USER_DEFINED_FILTER { FILTER_ID 32004 - COMMENT HDF5 lz4 filter; see http://www.hdfgroup.org/services/contributions.html + COMMENT HDF5 lz4 filter; see https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html PARAMS { 3 } } } diff --git a/docs/PluginLibraries.txt b/docs/PluginLibraries.txt index 038ab698..ad946d92 100644 --- a/docs/PluginLibraries.txt +++ b/docs/PluginLibraries.txt @@ -2,7 +2,7 @@ The Compression Plugin Project ============================== The HDF Group Registered Third-Party Filters (Compression) webpage: - https://support.hdfgroup.org/services/contributions.html + https://portal.hdfgroup.org/documentation/hdf5-docs/registered_filter_plugins.html This is a list of filters included into the Compression Plugin Library and some parameter settings pulled from the corresponding filter