summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/examples/CMakeLists.txt103
-rw-r--r--fortran/src/CMakeLists.txt70
-rw-r--r--fortran/src/H5Aff.F902
-rw-r--r--fortran/src/H5Dff.F9028
-rw-r--r--fortran/src/H5Eff.F902
-rw-r--r--fortran/src/H5Lff.F904
-rw-r--r--fortran/src/H5Off.F904
-rw-r--r--fortran/src/H5Pff.F902
-rw-r--r--fortran/src/H5Rff.F9018
-rw-r--r--fortran/src/H5_buildiface.F9010
-rw-r--r--fortran/src/H5f90global.F904
-rw-r--r--fortran/test/CMakeLists.txt230
-rw-r--r--fortran/testpar/CMakeLists.txt12
13 files changed, 169 insertions, 320 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index aa702ff..02a71c3 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -35,28 +35,22 @@ set (F2003_examples
foreach (example ${examples})
add_executable (f90_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- target_compile_options(f90_ex_${example}
- PRIVATE
- $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
- )
-# set_property(TARGET f90_ex_${example} APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
-# )
-# set_property(TARGET f90_ex_${example} APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
-# )
+ target_compile_options(f90_ex_${example} PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>)
+# set_property(TARGET f90_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET f90_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
if(MSVC)
set_property(TARGET f90_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()
if (NOT BUILD_SHARED_LIBS)
target_include_directories (f90_ex_${example}
PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
- )
- target_link_libraries (f90_ex_${example}
- PRIVATE
- ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET}
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/static"
+ "${HDF5_SRC_DIR}"
+ "${HDF5_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}/static"
)
+ target_link_libraries (f90_ex_${example} PRIVATE ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (f90_ex_${example} PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/fortran
@@ -65,12 +59,13 @@ foreach (example ${examples})
else ()
target_include_directories (f90_ex_${example}
PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
- )
- target_link_libraries (f90_ex_${example}
- PRIVATE
- ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/shared"
+ "${HDF5_SRC_DIR}"
+ "${HDF5_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}/shared"
)
+ target_link_libraries (f90_ex_${example} PRIVATE ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (f90_ex_${example} PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/fortran
@@ -81,28 +76,22 @@ endforeach ()
foreach (example ${F2003_examples})
add_executable (f03_ex_${example} ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
- target_compile_options(f03_ex_${example}
- PRIVATE
- $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
- )
-# set_property(TARGET f03_ex_${example} APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
-# )
-# set_property(TARGET f03_ex_${example} APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
-# )
+ target_compile_options(f03_ex_${example} PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>)
+# set_property(TARGET f03_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET f03_ex_${example} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
if(MSVC)
set_property(TARGET f03_ex_${example} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()
if (NOT ONLY_SHARED_LIBS)
target_include_directories (f03_ex_${example}
PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
- )
- target_link_libraries (f03_ex_${example}
- PRIVATE
- ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET}
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/static"
+ "${HDF5_SRC_DIR}"
+ "${HDF5_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}/static"
)
+ target_link_libraries (f03_ex_${example} PRIVATE ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (f03_ex_${example} PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/fortran03
@@ -111,12 +100,13 @@ foreach (example ${F2003_examples})
else ()
target_include_directories (f03_ex_${example}
PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
- )
- target_link_libraries (f03_ex_${example}
- PRIVATE
- ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/shared"
+ "${HDF5_SRC_DIR}"
+ "${HDF5_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}/shared"
)
+ target_link_libraries (f03_ex_${example} PRIVATE ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (f03_ex_${example} PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER examples/fortran03
@@ -127,27 +117,26 @@ endforeach ()
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_executable (f90_ex_ph5example ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
- target_compile_options(f90_ex_ph5example
- PRIVATE
- $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
- )
-# set_property(TARGET f90_ex_ph5example APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
-# )
-# set_property(TARGET f90_ex_ph5example APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
-# )
+ target_compile_options(f90_ex_ph5example PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>)
+# set_property(TARGET f90_ex_ph5example APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET f90_ex_ph5example APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
if(MSVC)
set_property(TARGET f90_ex_ph5example PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()
if (NOT ONLY_SHARED_LIBS)
target_include_directories (f90_ex_ph5example
PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/static"
+ "${HDF5_SRC_DIR}"
+ "${HDF5_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}/static"
+ "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
)
target_link_libraries (f90_ex_ph5example
PRIVATE
- ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET}
+ ${HDF5_F90_LIB_TARGET}
+ ${HDF5_LIB_TARGET}
$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
)
set_target_properties (f90_ex_ph5example PROPERTIES
@@ -158,11 +147,17 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
else ()
target_include_directories (f90_ex_ph5example
PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
+ "${CMAKE_Fortran_MODULE_DIRECTORY}/shared"
+ "${HDF5_SRC_DIR}"
+ "${HDF5_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}"
+ "${HDF5_F90_BINARY_DIR}/shared"
+ "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
)
target_link_libraries (f90_ex_ph5example
PRIVATE
- ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}
+ ${HDF5_F90_LIBSH_TARGET}
+ ${HDF5_LIBSH_TARGET}
$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
)
set_target_properties (f90_ex_ph5example PROPERTIES
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index b5d1a60..bf2fd84 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -40,22 +40,14 @@ set (Fortran_COMPILER_ID CMAKE_Fortran_COMPILER_ID)
#-----------------------------------------------------------------------------
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}"
-)
+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>
-# )
+# 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">
-#)
+#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()
@@ -156,6 +148,7 @@ if (NOT ONLY_SHARED_LIBS)
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
+ target_compile_options(${HDF5_F90_C_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
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}")
@@ -173,9 +166,8 @@ if (BUILD_SHARED_LIBS)
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
- target_compile_definitions(${HDF5_F90_C_LIBSH_TARGET}
- PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
- )
+ target_compile_options(${HDF5_F90_C_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ 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}")
@@ -288,29 +280,23 @@ endif ()
if (NOT ONLY_SHARED_LIBS)
add_library (${HDF5_F90_LIB_TARGET} STATIC ${f90_F_SOURCES})
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/static>"
+ 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/static>"
)
+ target_compile_options(${HDF5_F90_LIB_TARGET} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}")
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}
+ 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}>
-# )
+# 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()
@@ -328,36 +314,24 @@ endif ()
if (BUILD_SHARED_LIBS)
add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${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>/include/shared>"
+ 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/shared>"
)
+ target_compile_options(${HDF5_F90_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}")
target_compile_definitions(${HDF5_F90_LIBSH_TARGET}
- PUBLIC
- "H5_BUILT_AS_DYNAMIC_LIB"
+ 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">:${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}>
+ 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">
-# )
+# 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()
diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90
index a728f2d..abfaae9 100644
--- a/fortran/src/H5Aff.F90
+++ b/fortran/src/H5Aff.F90
@@ -72,7 +72,7 @@
MODULE H5A
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_NULL_CHAR, C_LOC, C_INT
USE H5GLOBAL
diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90
index 77f0a15..ec73f60 100644
--- a/fortran/src/H5Dff.F90
+++ b/fortran/src/H5Dff.F90
@@ -87,7 +87,7 @@
MODULE H5D
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR
USE H5GLOBAL
PRIVATE h5dread_vl_integer, h5dread_vl_real, h5dread_vl_string
@@ -959,7 +959,7 @@ CONTAINS
SUBROUTINE h5dwrite_vl_string(dset_id, mem_type_id, buf, dims, str_len, &
hdferr, &
mem_space_id, file_space_id, xfer_prp)
- USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_char
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_CHAR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier
@@ -1191,7 +1191,7 @@ CONTAINS
SUBROUTINE h5dwrite_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, &
mem_space_id, file_space_id, xfer_prp)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier
@@ -1223,7 +1223,7 @@ CONTAINS
SUBROUTINE h5dwrite_reference_dsetreg(dset_id, mem_type_id, buf, dims, hdferr, &
mem_space_id, file_space_id, xfer_prp)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier
@@ -1285,7 +1285,7 @@ CONTAINS
SUBROUTINE h5dwrite_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, &
mem_space_id, file_space_id, xfer_prp)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier
@@ -1303,7 +1303,7 @@ CONTAINS
SUBROUTINE h5dwrite_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, dims, hdferr, &
mem_space_id, file_space_id, xfer_prp)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier
@@ -1336,7 +1336,7 @@ CONTAINS
SUBROUTINE h5dread_reference_obj(dset_id, mem_type_id, buf, dims, hdferr, &
mem_space_id, file_space_id, xfer_prp)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier
@@ -1431,7 +1431,7 @@ CONTAINS
SUBROUTINE h5dread_char_scalar(dset_id, mem_type_id, buf, dims, hdferr, &
mem_space_id, file_space_id, xfer_prp)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier
@@ -1461,7 +1461,7 @@ CONTAINS
SUBROUTINE h5dread_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, hdferr, &
mem_space_id, file_space_id, xfer_prp)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier
@@ -1519,7 +1519,7 @@ CONTAINS
!*****
SUBROUTINE h5dwrite_ptr(dset_id, mem_type_id, buf, hdferr, &
mem_space_id, file_space_id, xfer_prp)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier
@@ -1584,7 +1584,7 @@ CONTAINS
!*****
SUBROUTINE h5dread_ptr(dset_id, mem_type_id, buf, hdferr, &
mem_space_id, file_space_id, xfer_prp)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier
@@ -1638,7 +1638,7 @@ CONTAINS
!
SUBROUTINE h5dfill_integer(fill_value, space_id, buf, hdferr)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER, INTENT(IN), TARGET :: fill_value ! Fill value
INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier
@@ -1688,7 +1688,7 @@ CONTAINS
! March 12, 2003
!
SUBROUTINE h5dfill_c_float(fill_valuer, space_id, buf, hdferr)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
REAL(KIND=C_FLOAT), INTENT(IN), TARGET :: fill_valuer ! Fill value
INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier
@@ -1810,7 +1810,7 @@ CONTAINS
! March 12, 2003
!
SUBROUTINE h5dfill_char(fill_value, space_id, buf, hdferr)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
CHARACTER, INTENT(IN), TARGET :: fill_value ! Fill value
INTEGER(HID_T), INTENT(IN) :: space_id ! Memory dataspace selection identifier
diff --git a/fortran/src/H5Eff.F90 b/fortran/src/H5Eff.F90
index fcd08ff..435d967 100644
--- a/fortran/src/H5Eff.F90
+++ b/fortran/src/H5Eff.F90
@@ -264,7 +264,7 @@ CONTAINS
!
! Fortran2003 Interface:
SUBROUTINE h5eset_auto_f(printflag, hdferr, estack_id, func, client_data)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR
INTEGER , INTENT(IN) :: printflag
INTEGER , INTENT(OUT) :: hdferr
INTEGER(HID_T), INTENT(IN) , OPTIONAL :: estack_id
diff --git a/fortran/src/H5Lff.F90 b/fortran/src/H5Lff.F90
index f672547..66f5b5c 100644
--- a/fortran/src/H5Lff.F90
+++ b/fortran/src/H5Lff.F90
@@ -1343,7 +1343,7 @@ CONTAINS
!
! Fortran2003 Interface:
SUBROUTINE h5literate_f(group_id, index_type, order, idx, op, op_data, return_value, hdferr)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: group_id
INTEGER , INTENT(IN) :: index_type
@@ -1423,7 +1423,7 @@ CONTAINS
! Fortran2003 Interface:
SUBROUTINE h5literate_by_name_f(loc_id, group_name, index_type, order, &
idx, op, op_data, return_value, hdferr, lapl_id)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: loc_id
CHARACTER(LEN=*), INTENT(IN) :: group_name
diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90
index 2b025a7..fb17942 100644
--- a/fortran/src/H5Off.F90
+++ b/fortran/src/H5Off.F90
@@ -1017,7 +1017,7 @@ CONTAINS
! Fortran2003 Interface:
SUBROUTINE h5oget_info_f(object_id, object_info, hdferr, fields)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: object_id
TYPE(h5o_info_t), INTENT(OUT), TARGET :: object_info
@@ -1079,7 +1079,7 @@ CONTAINS
SUBROUTINE h5oget_info_by_idx_f(loc_id, group_name, index_field, order, n, &
object_info, hdferr, lapl_id, fields)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN) :: loc_id
CHARACTER(LEN=*), INTENT(IN) :: group_name
diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90
index 61d30b8..883e49a 100644
--- a/fortran/src/H5Pff.F90
+++ b/fortran/src/H5Pff.F90
@@ -38,7 +38,7 @@
MODULE H5P
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR
USE H5GLOBAL
USE H5fortkit
diff --git a/fortran/src/H5Rff.F90 b/fortran/src/H5Rff.F90
index 6c2ba28..c911b1a 100644
--- a/fortran/src/H5Rff.F90
+++ b/fortran/src/H5Rff.F90
@@ -341,7 +341,7 @@ CONTAINS
!
! Signature:
SUBROUTINE h5rcreate_object_f(loc_id, name, ref, hdferr)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier
CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the object at location specified
@@ -450,7 +450,7 @@ CONTAINS
!
! Signature:
SUBROUTINE h5rcreate_ptr_f(loc_id, name, ref_type, ref, hdferr, space_id)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id ! Location identifier
CHARACTER(LEN=*), INTENT(IN) :: name ! Name of the dataset at location specified
@@ -498,7 +498,7 @@ CONTAINS
!
! Signature:
SUBROUTINE h5rdereference_object_f(obj_id, ref, ref_obj_id, hdferr)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier
TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference
@@ -541,7 +541,7 @@ CONTAINS
!
! Signature:
SUBROUTINE h5rdereference_region_f(obj_id, ref, ref_obj_id, hdferr)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id ! Dataset identifier
TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref ! Object reference
@@ -582,7 +582,7 @@ CONTAINS
!
! Signature:
SUBROUTINE h5rdereference_ptr_f(obj_id, ref_type, ref, ref_obj_id, hdferr)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id ! Valid identifier for the file containing the
! referenced object or any object in that file.
@@ -622,7 +622,7 @@ CONTAINS
!
! Signature:
SUBROUTINE h5rget_name_object_f(loc_id, ref, name, hdferr, size)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id
TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref
@@ -669,7 +669,7 @@ CONTAINS
!
! Signature:
SUBROUTINE h5rget_name_region_f(loc_id, ref, name, hdferr, size)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id
TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref
@@ -718,7 +718,7 @@ CONTAINS
!
! Signature:
SUBROUTINE h5rget_name_ptr_f(loc_id, ref_type, ref, name, hdferr, size)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id
INTEGER, INTENT(IN) :: ref_type
@@ -767,7 +767,7 @@ CONTAINS
!
! Signature:
SUBROUTINE h5rget_obj_type_f(loc_id, ref_type, ref, obj_type, hdferr)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: loc_id
INTEGER, INTENT(IN) :: ref_type
diff --git a/fortran/src/H5_buildiface.F90 b/fortran/src/H5_buildiface.F90
index f793b7f..be53806 100644
--- a/fortran/src/H5_buildiface.F90
+++ b/fortran/src/H5_buildiface.F90
@@ -47,7 +47,7 @@
#include <H5config_f.inc>
PROGRAM H5_buildiface
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_LOC
IMPLICIT NONE
! These values are valid REAL KINDs (with corresponding C float) found during configure
@@ -135,7 +135,7 @@ PROGRAM H5_buildiface
WRITE(11,'(A)') "MODULE H5_GEN"
- WRITE(11,'(2X,A)') 'USE, INTRINSIC :: ISO_C_BINDING'
+ WRITE(11,'(2X,A)') 'USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_LOC'
WRITE(11,'(2X,A)') 'USE H5GLOBAL'
WRITE(11,'(2X,A)') 'USE H5A'
@@ -712,7 +712,6 @@ PROGRAM H5_buildiface
WRITE(11,'(A)') ' SUBROUTINE h5dread_rkind_'//TRIM(ADJUSTL(chr2))&
&//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &'
WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)'
- WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING'
WRITE(11,'(A)') ' IMPLICIT NONE'
WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id'
WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id'
@@ -752,7 +751,6 @@ PROGRAM H5_buildiface
WRITE(11,'(A)') ' SUBROUTINE h5dread_ikind_'//TRIM(ADJUSTL(chr2))&
&//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &'
WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)'
- WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING'
WRITE(11,'(A)') ' IMPLICIT NONE'
WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id'
WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id'
@@ -787,7 +785,6 @@ PROGRAM H5_buildiface
! Subroutine API
WRITE(11,'(A)') ' SUBROUTINE h5dread_ckind_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &'
WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)'
- WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING'
WRITE(11,'(A)') ' IMPLICIT NONE'
WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id'
WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id'
@@ -827,7 +824,6 @@ PROGRAM H5_buildiface
WRITE(11,'(A)') ' SUBROUTINE h5dwrite_rkind_'//TRIM(ADJUSTL(chr2))&
&//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &'
WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)'
- WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING'
WRITE(11,'(A)') ' IMPLICIT NONE'
WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id'
WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id'
@@ -866,7 +862,6 @@ PROGRAM H5_buildiface
WRITE(11,'(A)') ' SUBROUTINE h5dwrite_ikind_'//TRIM(ADJUSTL(chr2))&
&//'_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &'
WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)'
- WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING'
WRITE(11,'(A)') ' IMPLICIT NONE'
WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id'
WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id'
@@ -900,7 +895,6 @@ PROGRAM H5_buildiface
! Subroutine API
WRITE(11,'(A)') ' SUBROUTINE h5dwrite_ckind_rank'//chr_rank(j)//'(dset_id, mem_type_id, buf, dims, hdferr, &'
WRITE(11,'(A)') ' mem_space_id, file_space_id, xfer_prp)'
- WRITE(11,'(A)') ' USE, INTRINSIC :: ISO_C_BINDING'
WRITE(11,'(A)') ' IMPLICIT NONE'
WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: dset_id'
WRITE(11,'(A)') ' INTEGER(HID_T), INTENT(IN) :: mem_type_id'
diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90
index 6b601e9..46759cf 100644
--- a/fortran/src/H5f90global.F90
+++ b/fortran/src/H5f90global.F90
@@ -819,7 +819,7 @@ CONTAINS
SUBROUTINE H5_Fortran_string_c2f(c_string, f_string)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_CHAR, C_NULL_CHAR
IMPLICIT NONE
CHARACTER(KIND=C_CHAR, LEN=*), INTENT(IN) :: c_string
CHARACTER(LEN=*), INTENT(OUT) :: f_string
@@ -845,7 +845,7 @@ CONTAINS
SUBROUTINE H5_Fortran_string_f2c(f_string, c_string)
- USE, INTRINSIC :: ISO_C_BINDING
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_CHAR, C_NULL_CHAR
IMPLICIT NONE
CHARACTER(LEN=*), INTENT(IN) :: f_string
CHARACTER(KIND=C_CHAR, LEN=*), INTENT(OUT) :: c_string
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 5657323..ff7001b 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -13,8 +13,7 @@ target_include_directories (H5_test_buildiface
)
#if (BUILD_SHARED_LIBS)
# target_compile_definitions(H5_test_buildiface
-# PRIVATE
-# $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:/MT>
+# PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:/MT>
# )
#endif ()
if(MSVC)
@@ -49,6 +48,7 @@ if (NOT BUILD_SHARED_LIBS)
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
+ target_compile_options(${HDF5_F90_C_TEST_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_F90_C_TEST_LIB_TARGET}
PRIVATE ${HDF5_F90_C_LIB_TARGET}
@@ -65,9 +65,8 @@ else ()
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
- target_compile_definitions(${HDF5_F90_C_TEST_LIBSH_TARGET}
- PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
- )
+ target_compile_options(${HDF5_F90_C_TEST_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_compile_definitions(${HDF5_F90_C_TEST_LIBSH_TARGET} PUBLIC "H5_BUILT_AS_DYNAMIC_LIB")
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET}
PRIVATE ${HDF5_F90_C_LIBSH_TARGET}
@@ -129,26 +128,18 @@ endif ()
if (NOT BUILD_SHARED_LIBS)
add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC ${HDF5_F90_TF_SOURCES})
target_include_directories (${HDF5_F90_TEST_LIB_TARGET}
- PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
- INTERFACE
- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/static>"
+ PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/static>"
)
+ target_compile_options(${HDF5_F90_TEST_LIB_TARGET} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}")
target_compile_definitions(${HDF5_F90_TEST_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_TEST_LIB_TARGET}
- PUBLIC
- ${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET}
- )
-# set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
-# )
-# set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
-# )
+ target_link_libraries (${HDF5_F90_TEST_LIB_TARGET} PUBLIC ${HDF5_F90_C_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET})
+# set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
if(MSVC)
set_property(TARGET ${HDF5_F90_TEST_LIB_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()
@@ -162,31 +153,20 @@ if (NOT BUILD_SHARED_LIBS)
else ()
add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED ${HDF5_F90_TF_SOURCES_SHARED})
target_include_directories (${HDF5_F90_TEST_LIBSH_TARGET}
- PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
- INTERFACE
- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/shared>"
+ PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/shared>"
)
+ target_compile_options(${HDF5_F90_TEST_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_Fortran_FLAGS}")
target_compile_definitions(${HDF5_F90_TEST_LIBSH_TARGET}
- PUBLIC
- "H5_BUILT_AS_DYNAMIC_LIB"
+ PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
PRIVATE
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:BUILD_HDF5_TEST_DLL;HDF5F90_WINDOWS>
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
- target_link_libraries (${HDF5_F90_TEST_LIBSH_TARGET}
- PUBLIC
- ${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}
- )
-# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
-# )
-# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
-# )
-# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DLL">
-# )
+ target_link_libraries (${HDF5_F90_TEST_LIBSH_TARGET} PUBLIC ${HDF5_F90_C_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
+# set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-DLL">)
if(MSVC)
set_property(TARGET ${HDF5_F90_TEST_LIBSH_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS} -DLL")
endif()
@@ -223,26 +203,17 @@ add_executable (testhdf5_fortran
)
target_compile_options(testhdf5_fortran
PRIVATE
+ "${HDF5_CMAKE_Fortran_FLAGS}"
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
-#set_property(TARGET testhdf5_fortran APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
-#)
-#set_property(TARGET testhdf5_fortran APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
-#)
+#set_property(TARGET testhdf5_fortran APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+#set_property(TARGET testhdf5_fortran APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
if(MSVC)
set_property(TARGET testhdf5_fortran PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()
if (NOT BUILD_SHARED_LIBS)
- target_include_directories (testhdf5_fortran
- PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
- )
- target_link_libraries (testhdf5_fortran
- PRIVATE
- ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
- )
+ target_include_directories (testhdf5_fortran PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
+ target_link_libraries (testhdf5_fortran PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
set_target_properties (testhdf5_fortran PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -250,14 +221,8 @@ if (NOT BUILD_SHARED_LIBS)
)
add_dependencies (testhdf5_fortran ${HDF5_F90_TEST_LIB_TARGET})
else ()
- target_include_directories (testhdf5_fortran
- PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
- )
- target_link_libraries (testhdf5_fortran
- PRIVATE
- ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
- )
+ target_include_directories (testhdf5_fortran PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
+ target_link_libraries (testhdf5_fortran PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
set_target_properties (testhdf5_fortran PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -277,26 +242,17 @@ add_executable (testhdf5_fortran_1_8
)
target_compile_options(testhdf5_fortran_1_8
PRIVATE
+ "${HDF5_CMAKE_Fortran_FLAGS}"
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
-#set_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
-#)
-#set_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
-#)
+#set_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+#set_property(TARGET testhdf5_fortran_1_8 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
if(MSVC)
set_property(TARGET testhdf5_fortran_1_8 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()
if (NOT BUILD_SHARED_LIBS)
- target_include_directories (testhdf5_fortran_1_8
- PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
- )
- target_link_libraries (testhdf5_fortran_1_8
- PRIVATE
- ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
- )
+ target_include_directories (testhdf5_fortran_1_8 PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
+ target_link_libraries (testhdf5_fortran_1_8 PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
set_target_properties (testhdf5_fortran_1_8 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -304,14 +260,8 @@ if (NOT BUILD_SHARED_LIBS)
)
add_dependencies (testhdf5_fortran_1_8 ${HDF5_F90_TEST_LIB_TARGET})
else ()
- target_include_directories (testhdf5_fortran_1_8
- PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
- )
- target_link_libraries (testhdf5_fortran_1_8
- PRIVATE
- ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
- )
+ target_include_directories (testhdf5_fortran_1_8 PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
+ target_link_libraries (testhdf5_fortran_1_8 PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
set_target_properties (testhdf5_fortran_1_8 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -333,26 +283,17 @@ add_executable (fortranlib_test_F03
)
target_compile_options(fortranlib_test_F03
PRIVATE
+ "${HDF5_CMAKE_Fortran_FLAGS}"
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
-#set_property(TARGET fortranlib_test_F03 APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
-#)
-#set_property(TARGET fortranlib_test_F03 APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
-#)
+#set_property(TARGET fortranlib_test_F03 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+#set_property(TARGET fortranlib_test_F03 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
if(MSVC)
set_property(TARGET fortranlib_test_F03 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()
if (NOT BUILD_SHARED_LIBS)
- target_include_directories (fortranlib_test_F03
- PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static"
- )
- target_link_libraries (fortranlib_test_F03
- PRIVATE
- ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
- )
+ target_include_directories (fortranlib_test_F03 PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static")
+ target_link_libraries (fortranlib_test_F03 PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
set_target_properties (fortranlib_test_F03 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -360,14 +301,8 @@ if (NOT BUILD_SHARED_LIBS)
)
add_dependencies (fortranlib_test_F03 ${HDF5_F90_TEST_LIB_TARGET})
else ()
- target_include_directories (fortranlib_test_F03
- PRIVATE
- "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
- )
- target_link_libraries (fortranlib_test_F03
- PRIVATE
- ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
- )
+ target_include_directories (fortranlib_test_F03 PRIVATE "${CMAKE_Fortran_MODULE_DIRECTORY}/shared;${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared")
+ target_link_libraries (fortranlib_test_F03 PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
set_target_properties (fortranlib_test_F03 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -380,26 +315,17 @@ endif ()
add_executable (fflush1 fflush1.F90)
target_compile_options(fflush1
PRIVATE
+ "${HDF5_CMAKE_Fortran_FLAGS}"
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
-#set_property(TARGET fflush1 APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
-#)
-#set_property(TARGET fflush1 APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
-#)
+#set_property(TARGET fflush1 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+#set_property(TARGET fflush1 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
if(MSVC)
set_property(TARGET fflush1 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()
if (NOT BUILD_SHARED_LIBS)
- target_include_directories (fflush1
- PRIVATE
- ${CMAKE_Fortran_MODULE_DIRECTORY}/static
- )
- target_link_libraries (fflush1
- PRIVATE
- ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
- )
+ target_include_directories (fflush1 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ target_link_libraries (fflush1 PRIVATE ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
set_target_properties (fflush1 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -407,14 +333,8 @@ if (NOT BUILD_SHARED_LIBS)
)
add_dependencies (fflush1 ${HDF5_F90_TEST_LIB_TARGET})
else ()
- target_include_directories (fflush1
- PRIVATE
- ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
- )
- target_link_libraries (fflush1
- PRIVATE
- ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
- )
+ target_include_directories (fflush1 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
+ target_link_libraries (fflush1 PRIVATE ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
set_target_properties (fflush1 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -427,26 +347,17 @@ endif ()
add_executable (fflush2 fflush2.F90)
target_compile_options (fflush2
PRIVATE
+ "${HDF5_CMAKE_Fortran_FLAGS}"
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
-#set_property(TARGET fflush2 APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
-#)
-#set_property(TARGET fflush2 APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
-#)
+#set_property(TARGET fflush2 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+#set_property(TARGET fflush2 APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
if(MSVC)
set_property(TARGET fflush2 PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()
if (NOT BUILD_SHARED_LIBS)
- target_include_directories (fflush2
- PRIVATE
- ${CMAKE_Fortran_MODULE_DIRECTORY}/static
- )
- target_link_libraries (fflush2
- PRIVATE
- ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
- )
+ target_include_directories (fflush2 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ target_link_libraries (fflush2 PRIVATE ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
set_target_properties (fflush2 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -454,14 +365,8 @@ if (NOT BUILD_SHARED_LIBS)
)
add_dependencies (fflush2 ${HDF5_F90_TEST_LIB_TARGET})
else ()
- target_include_directories (fflush2
- PRIVATE
- ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
- )
- target_link_libraries (fflush2
- PRIVATE
- ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
- )
+ target_include_directories (fflush2 PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
+ target_link_libraries (fflush2 PRIVATE ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
set_target_properties (fflush2 PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -474,26 +379,17 @@ endif ()
add_executable (vol_connector vol_connector.F90)
target_compile_options(vol_connector
PRIVATE
+ "${HDF5_CMAKE_Fortran_FLAGS}"
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
-#set_property(TARGET vol_connector APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
-#)
-#set_property(TARGET vol_connector APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
-#)
+#set_property(TARGET vol_connector APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+#set_property(TARGET vol_connector APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
if(MSVC)
set_property(TARGET vol_connector PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()
if (NOT BUILD_SHARED_LIBS)
- target_include_directories (vol_connector
- PRIVATE
- ${CMAKE_Fortran_MODULE_DIRECTORY}/static
- )
- target_link_libraries (vol_connector
- PRIVATE
- ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
- )
+ target_include_directories (vol_connector PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
+ target_link_libraries (vol_connector PRIVATE ${HDF5_F90_LIB_TARGET} ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
set_target_properties (vol_connector PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
@@ -501,14 +397,8 @@ if (NOT BUILD_SHARED_LIBS)
)
add_dependencies (vol_connector ${HDF5_F90_TEST_LIB_TARGET})
else ()
- target_include_directories (vol_connector
- PRIVATE
- ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
- )
- target_link_libraries (vol_connector
- PRIVATE
- ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>
- )
+ target_include_directories (vol_connector PRIVATE ${CMAKE_Fortran_MODULE_DIRECTORY}/shared)
+ target_link_libraries (vol_connector PRIVATE ${HDF5_F90_LIBSH_TARGET} ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} $<$<PLATFORM_ID:Windows>:ws2_32.lib>)
set_target_properties (vol_connector PROPERTIES
LINKER_LANGUAGE Fortran
FOLDER test/fortran
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index 5c80fd6..12489528 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -22,11 +22,11 @@ add_executable (parallel_test
mdset.f90
)
target_include_directories (parallel_test
- PRIVATE
- ${TESTPAR_INCLUDES}
+ PRIVATE ${TESTPAR_INCLUDES}
)
target_compile_options(parallel_test
PRIVATE
+ "${HDF5_CMAKE_Fortran_FLAGS}"
$<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
)
if (NOT BUILD_SHARED_LIBS)
@@ -53,12 +53,8 @@ else ()
)
endif ()
-#set_property(TARGET parallel_test APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
-#)
-#set_property(TARGET parallel_test APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
-#)
+#set_property(TARGET parallel_test APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
+#set_property(TARGET parallel_test APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
if(MSVC)
set_property(TARGET parallel_test PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()