summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2018-05-14 16:20:03 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2018-05-14 16:20:03 (GMT)
commitea66ac1e67bf2e5ccc59f30e6b648bb39c8f5e42 (patch)
treee71e1c6ffd6b6b4126ed232402beb5a80e5335d9 /fortran/src
parente6bc326ec0c417ef7b003da535b2e071442d2067 (diff)
parentdcc66a4f157ace0858b788228550f3e104df3242 (diff)
downloadhdf5-ea66ac1e67bf2e5ccc59f30e6b648bb39c8f5e42.zip
hdf5-ea66ac1e67bf2e5ccc59f30e6b648bb39c8f5e42.tar.gz
hdf5-ea66ac1e67bf2e5ccc59f30e6b648bb39c8f5e42.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit 'dcc66a4f157ace0858b788228550f3e104df3242': (35 commits) GGC requires attribute before function Correct COMPILE defs usage Add missing module_dir property Text cleanup Correct sentence punctuation. Add release note. Use set_property for MT flag Correct command usage Remove APPEND Fix typo Add missing test lib add missing folder to path Fix another command revert Missed a command revert Revert to old style for LINK_FLAGS gen expr not working LINK_FLAGS must be separate property sets Fix link flags syntax Revert refactor link flags refactor link flags to interface Refactor link flags ...
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/CMakeLists.txt163
-rw-r--r--fortran/src/H5config_f.inc.cmake68
-rw-r--r--fortran/src/H5fort_type_defines.h.cmake28
3 files changed, 149 insertions, 110 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 71b7d41..a29fb86 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -33,7 +33,7 @@ if (HAVE_FLOAT128)
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.in ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h @ONLY)
+configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.cmake ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h @ONLY)
set (Fortran_COMPILER_ID CMAKE_Fortran_COMPILER_ID)
@@ -43,22 +43,27 @@ set (Fortran_COMPILER_ID CMAKE_Fortran_COMPILER_ID)
# H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90
#-----------------------------------------------------------------------------
-add_executable (H5_buildiface
- ${HDF5_F90_SRC_SOURCE_DIR}/H5_buildiface.F90
- )
-target_include_directories(H5_buildiface PRIVATE "${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}")
-if (WIN32 AND MSVC)
- if (BUILD_SHARED_LIBS)
- set_target_properties (H5_buildiface
- PROPERTIES
- COMPILE_FLAGS "/MT"
- )
- endif ()
- set_target_properties (H5_buildiface
- PROPERTIES
- LINK_FLAGS "/SUBSYSTEM:CONSOLE"
- )
-endif ()
+add_executable (H5_buildiface ${HDF5_F90_SRC_SOURCE_DIR}/H5_buildiface.F90)
+target_include_directories(H5_buildiface
+ PRIVATE
+ "${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}"
+)
+#if (BUILD_SHARED_LIBS)
+# target_compile_definitions(H5_buildiface
+# PRIVATE
+# $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:/MT>
+# )
+#endif ()
+if(MSVC)
+ set_property(TARGET H5_buildiface PROPERTY COMPILE_FLAGS "/MT")
+endif()
+#set_property(TARGET H5_buildiface APPEND PROPERTY
+# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+#)
+if(MSVC)
+ set_property(TARGET H5_buildiface PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE")
+endif()
+
set_target_properties (H5_buildiface PROPERTIES
LINKER_LANGUAGE Fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
@@ -131,31 +136,36 @@ set (f90CStub_C_SHHDRS
)
add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS})
-set_property(TARGET ${HDF5_F90_C_LIB_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
-TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC " " " ")
+target_include_directories(${HDF5_F90_C_LIB_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
+TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} STATIC 0)
set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES
FOLDER libraries/fortran
LINKER_LANGUAGE C
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
set (install_targets ${HDF5_F90_C_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_SHHDRS})
- set_property(TARGET ${HDF5_F90_C_LIBSH_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
- TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ")
+ target_include_directories(${HDF5_F90_C_LIBSH_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_definitions(${HDF5_F90_C_LIBSH_TARGET}
+ PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
+ )
+ TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_F90_C_LIB_NAME} SHARED "F")
set_target_properties (${HDF5_F90_C_LIBSH_TARGET} PROPERTIES
FOLDER libraries/fortran
LINKER_LANGUAGE C
- COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
)
set (install_targets ${install_targets} ${HDF5_F90_C_LIBSH_TARGET})
endif ()
@@ -245,58 +255,87 @@ endif ()
# Add Main fortran library
#-----------------------------------------------------------------------------
add_library (${HDF5_F90_LIB_TARGET} STATIC ${f90_F_SOURCES})
-set (SHARED_LINK_FLAGS " ")
-TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_F90_LIB_TARGET} PUBLIC ${HDF5_F90_C_LIB_TARGET})
-target_link_libraries (${HDF5_F90_LIB_TARGET} PRIVATE ${LINK_Fortran_LIBS})
-target_include_directories (${HDF5_F90_LIB_TARGET} PUBLIC "${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR}")
-if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- target_include_directories (${HDF5_F90_LIB_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
-endif ()
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}")
-H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC 0)
+target_include_directories (${HDF5_F90_LIB_TARGET}
+ PRIVATE
+ "${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
+ INTERFACE
+ "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
+target_compile_definitions(${HDF5_F90_LIB_TARGET}
+ PRIVATE
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:HDF5F90_WINDOWS>
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
+)
+target_link_libraries (${HDF5_F90_LIB_TARGET}
+ PUBLIC
+ ${HDF5_F90_C_LIB_TARGET}
+ PRIVATE
+ ${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()
set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES
FOLDER libraries/fortran
LINKER_LANGUAGE Fortran
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (WIN32)
- set_property (TARGET ${HDF5_F90_LIB_TARGET}
- APPEND PROPERTY COMPILE_DEFINITIONS "HDF5F90_WINDOWS"
- )
-endif ()
+H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC 0)
+set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}")
set (install_targets ${install_targets} ${HDF5_F90_LIB_TARGET})
add_dependencies(${HDF5_F90_LIB_TARGET} H5gen)
if (BUILD_SHARED_LIBS)
add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${f90_F_SOURCES_SHARED})
- set (SHARED_LINK_FLAGS " ")
- if (WIN32 AND MSVC)
- set (SHARED_LINK_FLAGS "/DLL /DEF:${HDF5_F90_SRC_BINARY_DIR}/hdf5_fortrandll.def")
- endif ()
- TARGET_FORTRAN_PROPERTIES (${HDF5_F90_LIBSH_TARGET} SHARED " " ${SHARED_LINK_FLAGS})
- target_link_libraries (${HDF5_F90_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_LIBSH_TARGET})
- target_link_libraries (${HDF5_F90_LIBSH_TARGET} PRIVATE ${LINK_Fortran_LIBS})
- target_include_directories (${HDF5_F90_LIBSH_TARGET} PUBLIC "${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR}")
- if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
- target_include_directories (${HDF5_F90_LIBSH_TARGET} PUBLIC ${MPI_Fortran_INCLUDE_DIRS})
- endif ()
- set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIBSH_TARGET}")
- H5_SET_LIB_OPTIONS (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_LIB_NAME} SHARED "F")
+ 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>/include>"
+ )
+ target_compile_definitions(${HDF5_F90_LIBSH_TARGET}
+ PUBLIC
+ "H5_BUILT_AS_DYNAMIC_LIB"
+ PRIVATE
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:BUILD_HDF5_DLL;HDF5F90_WINDOWS>
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:/dll>
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
+ )
+ target_link_libraries (${HDF5_F90_LIBSH_TARGET}
+ 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")
+ endif()
set_target_properties (${HDF5_F90_LIBSH_TARGET} PROPERTIES
FOLDER libraries/fortran
LINKER_LANGUAGE Fortran
- COMPILE_DEFINITIONS "H5_BUILT_AS_DYNAMIC_LIB"
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
- INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
- if (WIN32)
- set_property (TARGET ${HDF5_F90_LIBSH_TARGET}
- APPEND PROPERTY COMPILE_DEFINITIONS "BUILD_HDF5_DLL;HDF5F90_WINDOWS"
- )
- endif ()
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIBSH_TARGET}")
+ H5_SET_LIB_OPTIONS (${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_LIB_NAME} SHARED "F")
set (install_targets ${install_targets} ${HDF5_F90_LIBSH_TARGET})
add_dependencies(${HDF5_F90_LIBSH_TARGET} H5genSH)
endif ()
diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake
index f85db6c..b8d5355 100644
--- a/fortran/src/H5config_f.inc.cmake
+++ b/fortran/src/H5config_f.inc.cmake
@@ -12,87 +12,59 @@
! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure
! Define if we have parallel support
-#define H5_HAVE_PARALLEL @CMAKE_H5_HAVE_PARALLEL@
-
-#if H5_HAVE_PARALLEL==0
-#undef H5_HAVE_PARALLEL
-#endif
+#cmakedefine H5_HAVE_PARALLEL @H5_HAVE_PARALLEL@
! Define if the intrinsic function STORAGE_SIZE exists
-#define H5_FORTRAN_HAVE_STORAGE_SIZE @FORTRAN_HAVE_STORAGE_SIZE@
-
-#if H5_FORTRAN_HAVE_STORAGE_SIZE==0
-#undef H5_FORTRAN_HAVE_STORAGE_SIZE
-#endif
+#cmakedefine H5_FORTRAN_HAVE_STORAGE_SIZE @H5_FORTRAN_HAVE_STORAGE_SIZE@
! Define if the intrinsic function SIZEOF exists
-#define H5_FORTRAN_HAVE_SIZEOF @FORTRAN_HAVE_SIZEOF@
-
-#if H5_FORTRAN_HAVE_SIZEOF==0
-#undef H5_FORTRAN_HAVE_SIZEOF
-#endif
+#cmakedefine H5_FORTRAN_HAVE_SIZEOF @H5_FORTRAN_HAVE_SIZEOF@
! Define if the intrinsic function C_SIZEOF exists
-#define H5_FORTRAN_HAVE_C_SIZEOF @FORTRAN_HAVE_C_SIZEOF@
-
-#if H5_FORTRAN_HAVE_C_SIZEOF==0
-#undef H5_FORTRAN_HAVE_C_SIZEOF
-#endif
+#cmakedefine H5_FORTRAN_HAVE_C_SIZEOF @H5_FORTRAN_HAVE_C_SIZEOF@
! Define if the intrinsic C_LONG_DOUBLE exists
-#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@
-
-#if H5_FORTRAN_HAVE_C_LONG_DOUBLE==0
-#undef H5_FORTRAN_HAVE_C_LONG_DOUBLE
-#endif
+#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @H5_FORTRAN_HAVE_C_LONG_DOUBLE@
! Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE
-#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
+#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
! Define if the intrinsic module ISO_FORTRAN_ENV exists
-#define H5_HAVE_ISO_FORTRAN_ENV @HAVE_ISO_FORTRAN_ENV@
+#cmakedefine H5_HAVE_ISO_FORTRAN_ENV @H5_HAVE_ISO_FORTRAN_ENV@
! should this be ${HDF_PREFIX} instead of H5 MSB
-#define H5_SIZEOF_DOUBLE @H5_SIZEOF_DOUBLE@
-
-#if H5_SIZEOF_DOUBLE==0
-#undef H5_SIZEOF_DOUBLE
-#endif
+#cmakedefine H5_SIZEOF_DOUBLE @H5_SIZEOF_DOUBLE@
! should this be ${HDF_PREFIX} instead of H5 MSB
-#define H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@
-
-#if H5_SIZEOF_LONG_DOUBLE==0
-#undef H5_SIZEOF_LONG_DOUBLE
-#endif
+#cmakedefine 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@
+#cmakedefine H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@
! If C has quad precision
-#define H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@
+#cmakedefine H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@
-! Define if INTEGER*16 is available
-#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@
+! Define if INTEGER*16 is available
+#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @H5_HAVE_Fortran_INTEGER_SIZEOF_16@
! Maximum decimal precision for C
-#define H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@
+#cmakedefine H5_PAC_C_MAX_REAL_PRECISION @H5_PAC_C_MAX_REAL_PRECISION@
! number of valid REAL KINDs
-#define H5_H5CONFIG_F_NUM_RKIND @H5CONFIG_F_NUM_RKIND@
+#cmakedefine H5_H5CONFIG_F_NUM_RKIND @H5_H5CONFIG_F_NUM_RKIND@
! valid REAL KINDs (need to have a matching C counter-part)
-#define H5_H5CONFIG_F_RKIND @H5CONFIG_F_RKIND@
+#cmakedefine H5_H5CONFIG_F_RKIND @H5_H5CONFIG_F_RKIND@
! valid REAL KINDs (need to have a matching C counter-part)
-#define H5_H5CONFIG_F_RKIND_SIZEOF @H5CONFIG_F_RKIND_SIZEOF@
+#cmakedefine H5_H5CONFIG_F_RKIND_SIZEOF @H5_H5CONFIG_F_RKIND_SIZEOF@
! number of valid INTEGER KINDs
-#define H5_H5CONFIG_F_NUM_IKIND @H5CONFIG_F_NUM_IKIND@
+#cmakedefine H5_H5CONFIG_F_NUM_IKIND @H5_H5CONFIG_F_NUM_IKIND@
! valid INTEGER KINDs (need to have a matching C counter-part)
-#define H5_H5CONFIG_F_IKIND @H5CONFIG_F_IKIND@
+#cmakedefine H5_H5CONFIG_F_IKIND @H5_H5CONFIG_F_IKIND@
! Fortran compiler id
-#define H5_Fortran_COMPILER_ID @Fortran_COMPILER_ID@
+#cmakedefine H5_Fortran_COMPILER_ID @Fortran_COMPILER_ID@
diff --git a/fortran/src/H5fort_type_defines.h.cmake b/fortran/src/H5fort_type_defines.h.cmake
new file mode 100644
index 0000000..1aa3181
--- /dev/null
+++ b/fortran/src/H5fort_type_defines.h.cmake
@@ -0,0 +1,28 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/* If you are reading this file and it has a '.h' suffix, it was automatically
+ * generated from the '.in' version. Make changes there.
+ */
+#define H5_FORTRAN_NATIVE_INTEGER_KIND @PAC_FORTRAN_NATIVE_INTEGER_KIND@
+#define H5_FORTRAN_NATIVE_INTEGER_SIZEOF @PAC_FORTRAN_NATIVE_INTEGER_SIZEOF@
+#define H5_FORTRAN_NATIVE_REAL_KIND @PAC_FORTRAN_NATIVE_REAL_KIND@
+#define H5_FORTRAN_NATIVE_REAL_SIZEOF @PAC_FORTRAN_NATIVE_REAL_SIZEOF@
+#define H5_FORTRAN_NATIVE_DOUBLE_KIND @PAC_FORTRAN_NATIVE_DOUBLE_KIND@
+#define H5_FORTRAN_NATIVE_DOUBLE_SIZEOF @PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF@
+#define H5_FORTRAN_NUM_INTEGER_KINDS @PAC_FORTRAN_NUM_INTEGER_KINDS@
+#define H5_FORTRAN_INTEGER_KINDS @PAC_FC_ALL_INTEGER_KINDS@
+#define H5_FORTRAN_INTEGER_KINDS_SIZEOF @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@
+#define H5_FORTRAN_REAL_KINDS @PAC_FC_ALL_REAL_KINDS@
+#define H5_FORTRAN_REAL_KINDS_SIZEOF @PAC_FC_ALL_REAL_KINDS_SIZEOF@
+#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @H5_HAVE_Fortran_INTEGER_SIZEOF_16@
+#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @H5_FORTRAN_HAVE_C_LONG_DOUBLE@
+#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@