diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-11-15 23:32:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-15 23:32:49 (GMT) |
commit | af8c1d1d872112ad741bbf05dda792c1626b93fd (patch) | |
tree | 3d2a1bc73ffc10fea7a5eaae2d746afb50597ce5 /fortran/src | |
parent | 07f7ae4991e138b1ba27b84df790a7ad56222921 (diff) | |
download | hdf5-af8c1d1d872112ad741bbf05dda792c1626b93fd.zip hdf5-af8c1d1d872112ad741bbf05dda792c1626b93fd.tar.gz hdf5-af8c1d1d872112ad741bbf05dda792c1626b93fd.tar.bz2 |
Sync fixes for CI and presets (#3855)
* Sync fixes for CI and presets
* Sync the Fortran build changes
* Update fortran test file
* Sync hl/fortran files
* Merge the nvidia compiler flag changes
* Update link
* Update links to doxygen refs for 1.14
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/CMakeLists.txt | 41 | ||||
-rw-r--r-- | fortran/src/H5_ff.F90 | 2 | ||||
-rw-r--r-- | fortran/src/H5config_f.inc.cmake | 54 | ||||
-rw-r--r-- | fortran/src/H5config_f.inc.in | 2 | ||||
-rw-r--r-- | fortran/src/hdf5_fortrandll.def.in | 10 |
5 files changed, 79 insertions, 30 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 57e17e5..87557db 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -9,12 +9,15 @@ if (WIN32) if (NOT H5_HAVE_PARALLEL) set (H5_NOPAREXP ";") endif () + set (H5_NOSUBFILING ";") # Subfiling is not supported on Windows set (H5_F03EXP ";") if (NOT H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE) set (H5_DBL_NOT_UNIQUE_EXP ";") endif () + set (CMAKE_NO_DEPRECATED_SYMBOLS 0) if (NOT H5_NO_DEPRECATED_SYMBOLS) - set (H5_NO_DEPRECATED_SYMBOLS ";") + set (CMAKE_NO_DEPRECATED_SYMBOLS 1) + set (DLL_NO_DEPRECATED_SYMBOLS ";") endif () configure_file (${HDF5_F90_SRC_SOURCE_DIR}/hdf5_fortrandll.def.in ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def @ONLY) endif () @@ -25,15 +28,34 @@ endif () # Define Parallel variable for passing to H5config_f.inc.cmake set (CMAKE_H5_HAVE_PARALLEL 0) +set (CMAKE_H5_HAVE_SUBFILING_VFD 0) if (H5_HAVE_PARALLEL) set (CMAKE_H5_HAVE_PARALLEL 1) + if (H5_HAVE_SUBFILING_VFD) + set (CMAKE_H5_HAVE_SUBFILING_VFD 1) + endif () endif () set (CMAKE_H5_HAVE_FLOAT128 0) -if (HAVE_FLOAT128) +if (H5_HAVE_FLOAT128) set (CMAKE_H5_HAVE_FLOAT128 1) endif () +set (CMAKE_H5_FORTRAN_HAVE_STORAGE_SIZE 0) +if (H5_FORTRAN_HAVE_STORAGE_SIZE) + set (CMAKE_H5_FORTRAN_HAVE_STORAGE_SIZE 1) +endif () + +set (CMAKE_H5_FORTRAN_HAVE_SIZEOF 0) +if (H5_FORTRAN_HAVE_SIZEOF) + set (CMAKE_H5_FORTRAN_HAVE_SIZEOF 1) +endif () + +set (CMAKE_H5_FORTRAN_HAVE_C_SIZEOF 0) +if (H5_FORTRAN_HAVE_C_SIZEOF) + set (CMAKE_H5_FORTRAN_HAVE_C_SIZEOF 1) +endif () + configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${HDF5_F90_BINARY_DIR}/H5config_f.inc @ONLY) configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.cmake ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h @ONLY) @@ -341,8 +363,6 @@ if (BUILD_STATIC_LIBS) ${LINK_Fortran_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>" ) -# set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:-SUBSYSTEM:CONSOLE>") -# set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_LINK_FLAGS}>") if(MSVC) set_property(TARGET ${HDF5_F90_LIB_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() @@ -358,7 +378,12 @@ if (BUILD_STATIC_LIBS) endif () if (BUILD_SHARED_LIBS) - add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${f90_F_SOURCES_SHARED}) + if(WIN32) + set(DLLDEF ${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def) + else() + set(DLLDEF "") + endif() + add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${DLLDEF} ${f90_F_SOURCES_SHARED}) target_include_directories (${HDF5_F90_LIBSH_TARGET} PRIVATE "${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>" INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${HDF5_INSTALL_MODULE_DIR}/shared>" @@ -374,12 +399,8 @@ if (BUILD_SHARED_LIBS) PUBLIC ${HDF5_F90_C_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>" ) -# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:-SUBSYSTEM:CONSOLE>") -# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:${WIN_LINK_FLAGS}>") -# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:-DLL>") -# set_property(TARGET ${HDF5_F90_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS "$<$<STREQUAL:x${CMAKE_Fortran_SIMULATE_ID},xMSVC>:-DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def>") if(MSVC) - set_property(TARGET ${HDF5_F90_LIBSH_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS} /DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def") + set_property(TARGET ${HDF5_F90_LIBSH_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() set_target_properties (${HDF5_F90_LIBSH_TARGET} PROPERTIES FOLDER libraries/fortran diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 5315673..05a48ac 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -996,7 +996,7 @@ CONTAINS h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE #endif #if H5_PAC_FC_MAX_REAL_PRECISION > 28 -#if H5_HAVE_FLOAT128 == 1 +#ifdef H5_HAVE_FLOAT128 ELSE h5_type = H5T_NATIVE_FLOAT_128 #endif diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake index 71bce0e..6652076 100644 --- a/fortran/src/H5config_f.inc.cmake +++ b/fortran/src/H5config_f.inc.cmake @@ -12,33 +12,54 @@ ! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure ! Define if there is parallel support -#cmakedefine01 H5_HAVE_PARALLEL -#if H5_HAVE_PARALLEL == 0 +#cmakedefine01 CMAKE_H5_HAVE_PARALLEL +#if CMAKE_H5_HAVE_PARALLEL == 0 #undef H5_HAVE_PARALLEL +#else +#define H5_HAVE_PARALLEL #endif ! Define if there is subfiling support -#cmakedefine01 H5_HAVE_SUBFILING_VFD -#if H5_HAVE_SUBFILING_VFD == 0 +#cmakedefine01 CMAKE_H5_HAVE_SUBFILING_VFD +#if CMAKE_H5_HAVE_SUBFILING_VFD == 0 #undef H5_HAVE_SUBFILING_VFD +#else +#define H5_HAVE_SUBFILING_VFD #endif ! Define if on APPLE #cmakedefine01 H5_HAVE_DARWIN #if H5_HAVE_DARWIN == 0 #undef H5_HAVE_DARWIN +#else +#define H5_HAVE_DARWIN #endif ! Define if the intrinsic function STORAGE_SIZE exists -#define H5_FORTRAN_HAVE_STORAGE_SIZE @H5_FORTRAN_HAVE_STORAGE_SIZE@ +#cmakedefine01 CMAKE_H5_FORTRAN_HAVE_STORAGE_SIZE +#if CMAKE_H5_FORTRAN_HAVE_STORAGE_SIZE == 0 +#undef H5_FORTRAN_HAVE_STORAGE_SIZE +#else +#define H5_FORTRAN_HAVE_STORAGE_SIZE +#endif ! Define if the intrinsic function SIZEOF exists -#define H5_FORTRAN_HAVE_SIZEOF @H5_FORTRAN_HAVE_SIZEOF@ +#cmakedefine01 CMAKE_H5_FORTRAN_HAVE_SIZEOF +#if CMAKE_H5_FORTRAN_HAVE_SIZEOF == 0 +#undef H5_FORTRAN_HAVE_SIZEOF +#else +#define H5_FORTRAN_HAVE_SIZEOF +#endif ! Define if the intrinsic function C_SIZEOF exists -#define H5_FORTRAN_HAVE_C_SIZEOF @H5_FORTRAN_HAVE_C_SIZEOF@ +#cmakedefine01 CMAKE_H5_FORTRAN_HAVE_C_SIZEOF +#if CMAKE_H5_FORTRAN_HAVE_C_SIZEOF == 0 +#undef H5_FORTRAN_HAVE_C_SIZEOF +#else +#define H5_FORTRAN_HAVE_C_SIZEOF +#endif -! Define if the intrinsic C_LONG_DOUBLE exists +! Define if the intrinsic function C_LONG_DOUBLE exists #define H5_FORTRAN_HAVE_C_LONG_DOUBLE @H5_FORTRAN_HAVE_C_LONG_DOUBLE@ ! Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE @@ -47,17 +68,22 @@ ! Define if the intrinsic module ISO_FORTRAN_ENV exists #define H5_HAVE_ISO_FORTRAN_ENV @H5_HAVE_ISO_FORTRAN_ENV@ -! should this be ${HDF_PREFIX} instead of H5 MSB +! Define the size of C's double #define H5_SIZEOF_DOUBLE @H5_SIZEOF_DOUBLE@ -! should this be ${HDF_PREFIX} instead of H5 MSB +! Define the size of C's long double #define H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ ! Define the maximum decimal precision for reals #define H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@ ! If C has quad precision -#define H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@ +#cmakedefine01 CMAKE_H5_HAVE_FLOAT128 +#if CMAKE_H5_HAVE_FLOAT128 == 0 +#undef H5_HAVE_FLOAT128 +#else +#define H5_HAVE_FLOAT128 +#endif ! Define if INTEGER*16 is available #define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @H5_HAVE_Fortran_INTEGER_SIZEOF_16@ @@ -84,7 +110,9 @@ #define H5_Fortran_COMPILER_ID @CMAKE_Fortran_COMPILER_ID@ ! Define if deprecated public API symbols are disabled -#cmakedefine01 H5_NO_DEPRECATED_SYMBOLS -#if H5_NO_DEPRECATED_SYMBOLS == 0 +#cmakedefine01 CMAKE_NO_DEPRECATED_SYMBOLS +#if CMAKE_NO_DEPRECATED_SYMBOLS == 0 #undef H5_NO_DEPRECATED_SYMBOLS +#else +#define H5_NO_DEPRECATED_SYMBOLS #endif diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index 991e4b0..3aeded9 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -41,7 +41,7 @@ ! Define if the intrinsic module ISO_FORTRAN_ENV exists #undef HAVE_ISO_FORTRAN_ENV -! Define the size of C's long double +! Define the size of C's double #undef SIZEOF_DOUBLE ! Define the size of C's long double diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index 2ded002..8d8b2b0 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -16,7 +16,7 @@ H5A_mp_H5AREAD_CHAR_SCALAR H5A_mp_H5ACREATE_F H5A_mp_H5ACREATE_ASYNC_F H5A_mp_H5AOPEN_NAME_F -@H5_NO_DEPRECATED_SYMBOLS@H5A_mp_H5AOPEN_IDX_F +@DLL_NO_DEPRECATED_SYMBOLS@H5A_mp_H5AOPEN_IDX_F H5A_mp_H5AGET_SPACE_F H5A_mp_H5AGET_TYPE_F H5A_mp_H5AGET_NAME_F @@ -421,10 +421,10 @@ H5P_mp_H5PGET_ACTUAL_SELECTION_IO_MODE_F ; Parallel @H5_NOPAREXP@H5P_mp_H5PSET_FAPL_MPIO_F @H5_NOPAREXP@H5P_mp_H5PGET_FAPL_MPIO_F -@H5_NOPAREXP@H5P_mp_H5PSET_FAPL_SUBFILING_F -@H5_NOPAREXP@H5P_mp_H5PGET_FAPL_SUBFILING_F -@H5_NOPAREXP@H5P_mp_H5PSET_FAPL_IOC_F -@H5_NOPAREXP@H5P_mp_H5PGET_FAPL_IOC_F +@H5_NOPAREXP@@H5_NOSUBFILING@H5P_mp_H5PSET_FAPL_SUBFILING_F +@H5_NOPAREXP@@H5_NOSUBFILING@H5P_mp_H5PGET_FAPL_SUBFILING_F +@H5_NOPAREXP@@H5_NOSUBFILING@H5P_mp_H5PSET_FAPL_IOC_F +@H5_NOPAREXP@@H5_NOSUBFILING@H5P_mp_H5PGET_FAPL_IOC_F @H5_NOPAREXP@H5P_mp_H5PSET_MPI_PARAMS_F @H5_NOPAREXP@H5P_mp_H5PGET_MPI_PARAMS_F @H5_NOPAREXP@H5P_mp_H5PSET_DXPL_MPIO_F |