diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-08-07 17:54:54 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-08-07 17:54:54 (GMT) |
commit | 509eb3b292237448bdd1d4b2e2222c07a57f65e0 (patch) | |
tree | cd15f754095f50a82f60194359684c67ea48bd5e /CMakeLists.txt | |
parent | 7a7f89d5250f8a5bca572fdd21ae01b44db1f8d6 (diff) | |
download | hdf5-509eb3b292237448bdd1d4b2e2222c07a57f65e0.zip hdf5-509eb3b292237448bdd1d4b2e2222c07a57f65e0.tar.gz hdf5-509eb3b292237448bdd1d4b2e2222c07a57f65e0.tar.bz2 |
Fix fortran SHARED issues from merge
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7cf3f54..85b657d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -715,32 +715,36 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for message (STATUS " **** Allowing unsupported Fortran shared libraries **** ") endif () endif () - option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON) - - include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake) - - set (LINK_Fortran_LIBS ${LINK_LIBS}) - - if (HDF5_ENABLE_F2003) - if (NOT H5_FORTRAN_HAVE_ISO_C_BINDING) - set (HDF5_ENABLE_F2003 OFF) - endif () - endif () - - # Parallel IO usage requires MPI to be Linked and Included - if (H5_HAVE_PARALLEL) - set (LINK_Fortran_LIBS ${LINK_Fortran_LIBS} ${MPI_Fortran_LIBRARIES}) - if (MPI_Fortran_LINK_FLAGS) - set (CMAKE_Fortran_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") - endif () - endif () - - add_subdirectory (fortran) - if (HDF5_BUILD_HL_LIB) - if (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran") - #-- Build the High Level Fortran source codes - add_subdirectory (hl/fortran) - endif () + if (ONLY_SHARED_LIBS AND SKIP_HDF5_FORTRAN_SHARED) + set (HDF5_BUILD_FORTRAN OFF FORCE) + else () + option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON) + + include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake) + + set (LINK_Fortran_LIBS ${LINK_LIBS}) + + if (HDF5_ENABLE_F2003) + if (NOT H5_FORTRAN_HAVE_ISO_C_BINDING) + set (HDF5_ENABLE_F2003 OFF) + endif () + endif () + + # Parallel IO usage requires MPI to be Linked and Included + if (H5_HAVE_PARALLEL) + set (LINK_Fortran_LIBS ${LINK_Fortran_LIBS} ${MPI_Fortran_LIBRARIES}) + if (MPI_Fortran_LINK_FLAGS) + set (CMAKE_Fortran_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") + endif () + endif () + + add_subdirectory (fortran) + if (HDF5_BUILD_HL_LIB) + if (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran") + #-- Build the High Level Fortran source codes + add_subdirectory (hl/fortran) + endif () + endif () endif () endif () endif () |