diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2024-02-09 17:03:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-09 17:03:33 (GMT) |
commit | 0a931525416447621c72043b213422ff1f10abff (patch) | |
tree | ac8d8f0c19e89373070ae5b1247123b7be6666be /HDF5Examples/config/cmake/HDFExampleMacros.cmake | |
parent | 868f23f94effea398e145fb92c647193eb65dbd7 (diff) | |
download | hdf5-0a931525416447621c72043b213422ff1f10abff.zip hdf5-0a931525416447621c72043b213422ff1f10abff.tar.gz hdf5-0a931525416447621c72043b213422ff1f10abff.tar.bz2 |
Fix overwritten preset names (#4000)
Diffstat (limited to 'HDF5Examples/config/cmake/HDFExampleMacros.cmake')
-rw-r--r-- | HDF5Examples/config/cmake/HDFExampleMacros.cmake | 26 |
1 files changed, 14 insertions, 12 deletions
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}) |