summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2024-02-09 17:03:33 (GMT)
committerGitHub <noreply@github.com>2024-02-09 17:03:33 (GMT)
commit0a931525416447621c72043b213422ff1f10abff (patch)
treeac8d8f0c19e89373070ae5b1247123b7be6666be
parent868f23f94effea398e145fb92c647193eb65dbd7 (diff)
downloadhdf5-0a931525416447621c72043b213422ff1f10abff.zip
hdf5-0a931525416447621c72043b213422ff1f10abff.tar.gz
hdf5-0a931525416447621c72043b213422ff1f10abff.tar.bz2
Fix overwritten preset names (#4000)
-rw-r--r--.github/workflows/cmake-ctest.yml4
-rw-r--r--HDF5Examples/config/cmake/HDFExampleMacros.cmake26
2 files changed, 16 insertions, 14 deletions
diff --git a/.github/workflows/cmake-ctest.yml b/.github/workflows/cmake-ctest.yml
index 8c4d0bd..a9328fd 100644
--- a/.github/workflows/cmake-ctest.yml
+++ b/.github/workflows/cmake-ctest.yml
@@ -231,7 +231,7 @@ jobs:
cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING ${{ runner.workspace }}/build/hdf5
cp ${{ runner.workspace }}/hdf5/hdfsrc/COPYING_LBNL_HDF5 ${{ runner.workspace }}/build/hdf5
cp ${{ runner.workspace }}/hdf5/hdfsrc/README.md ${{ runner.workspace }}/build/hdf5
- cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-OSX-Clang/*.tar.gz ${{ runner.workspace }}/build/hdf5
+ cp ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Clang/*.tar.gz ${{ runner.workspace }}/build/hdf5
cd "${{ runner.workspace }}/build"
tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-osx12.tar.gz hdf5
shell: bash
@@ -380,7 +380,7 @@ jobs:
Copy-Item -Path ${{ runner.workspace }}/hdf5/hdfsrc/COPYING -Destination ${{ runner.workspace }}/build/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/hdfsrc/COPYING_LBNL_HDF5 -Destination ${{ runner.workspace }}/build/hdf5/
Copy-Item -Path ${{ runner.workspace }}/hdf5/hdfsrc/README.md -Destination ${{ runner.workspace }}/build/hdf5/
- Copy-Item -Path ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-win-Intel/* -Destination ${{ runner.workspace }}/build/hdf5/ -Include *.zip
+ Copy-Item -Path ${{ runner.workspace }}/hdf5/build/${{ inputs.preset_name }}-Intel/* -Destination ${{ runner.workspace }}/build/hdf5/ -Include *.zip
cd "${{ runner.workspace }}/build"
7z a -tzip ${{ steps.set-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip hdf5
shell: pwsh
diff --git a/HDF5Examples/config/cmake/HDFExampleMacros.cmake b/HDF5Examples/config/cmake/HDFExampleMacros.cmake
index 3bb1d48..245003c 100644
--- a/HDF5Examples/config/cmake/HDFExampleMacros.cmake
+++ b/HDF5Examples/config/cmake/HDFExampleMacros.cmake
@@ -182,21 +182,23 @@ macro (HDF5_SUPPORT)
set (H5EX_HDF5_LINK_LIBS ${H5EX_HDF5_LINK_LIBS} ${HDF5_C_STATIC_LIBRARY})
set_property (TARGET ${HDF5_NAMESPACE}h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump")
endif ()
- if (HDF_BUILD_FORTRAN AND ${HDF5_BUILD_FORTRAN})
- if (BUILD_SHARED_LIBS AND HDF5_shared_Fortran_FOUND)
- set (H5EX_HDF5_LINK_LIBS ${H5EX_HDF5_LINK_LIBS} ${HDF5_FORTRAN_SHARED_LIBRARY})
- elseif (HDF5_static_Fortran_FOUND)
- set (H5EX_HDF5_LINK_LIBS ${H5EX_HDF5_LINK_LIBS} ${HDF5_FORTRAN_STATIC_LIBRARY})
- else ()
- set (HDF_BUILD_FORTRAN OFF CACHE BOOL "Build FORTRAN support" FORCE)
- message (STATUS "HDF5 Fortran libs not found - disable build of Fortran examples")
- endif ()
- else ()
+ if (NOT HDF5_static_Fortran_FOUND AND NOT HDF5_shared_Fortran_FOUND)
set (HDF_BUILD_FORTRAN OFF CACHE BOOL "Build FORTRAN support" FORCE)
message (STATUS "HDF5 Fortran libs not found - disable build of Fortran examples")
+ else ()
+ if (HDF_BUILD_FORTRAN AND ${HDF5_BUILD_FORTRAN})
+ if (BUILD_SHARED_LIBS AND HDF5_shared_Fortran_FOUND)
+ set (H5EX_HDF5_LINK_LIBS ${H5EX_HDF5_LINK_LIBS} ${HDF5_FORTRAN_SHARED_LIBRARY})
+ elseif (HDF5_static_Fortran_FOUND)
+ set (H5EX_HDF5_LINK_LIBS ${H5EX_HDF5_LINK_LIBS} ${HDF5_FORTRAN_STATIC_LIBRARY})
+ else ()
+ set (HDF_BUILD_FORTRAN OFF CACHE BOOL "Build FORTRAN support" FORCE)
+ message (STATUS "HDF5 Fortran libs not found - disable build of Fortran examples")
+ endif ()
+ endif ()
endif ()
- if (HDF_BUILD_JAVA)
- if (${HDF5_BUILD_JAVA} AND HDF5_Java_FOUND)
+ if (HDF_BUILD_JAVA AND HDF5_Java_FOUND)
+ if (${HDF5_BUILD_JAVA})
set (CMAKE_JAVA_INCLUDE_PATH "${CMAKE_JAVA_INCLUDE_PATH};${HDF5_JAVA_INCLUDE_DIRS}")
set (H5EX_JAVA_LIBRARY ${HDF5_JAVA_LIBRARY})
set (H5EX_JAVA_LIBRARIES ${HDF5_JAVA_LIBRARY})