summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-28 18:57:41 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-28 18:57:41 (GMT)
commit7c742a851847997f5e931f3d448b368c3179de32 (patch)
tree8908e35a0110298e3fc3e29120481e05798d5500 /fortran
parent43ce4b5e6e5eb4e848bf1726252f1ca17212e545 (diff)
downloadhdf5-7c742a851847997f5e931f3d448b368c3179de32.zip
hdf5-7c742a851847997f5e931f3d448b368c3179de32.tar.gz
hdf5-7c742a851847997f5e931f3d448b368c3179de32.tar.bz2
Add clang-format changes from develop.
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/CMakeLists.txt23
-rw-r--r--fortran/src/H5Pf.c92
-rw-r--r--fortran/test/CMakeLists.txt15
3 files changed, 86 insertions, 44 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index b1add54..481a4d2 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -180,6 +180,29 @@ if (BUILD_SHARED_LIBS)
endif ()
#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_F90_C_SRC_FORMAT
+ ${HDF5_F90_C_LIB_TARGET}
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h
+ )
+ else ()
+ clang_format (HDF5_F90_C_SRC_FORMAT
+ ${HDF5_F90_C_LIBSH_TARGET}
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90.h
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90i.h
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5f90proto.h
+ )
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
# Fortran Modules
#-----------------------------------------------------------------------------
set (f90_F_GEN_SOURCES
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 7cb3db8..e65e60f 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -2067,10 +2067,10 @@ h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* rig
* OUTPUTS
*
* degree - possible values are:
- * H5F_CLOSE_DEFAULT
- * H5F_CLOSE_WEAK
- * H5F_CLOSE_SEMI
- * H5F_CLOSE_STRONG
+ * H5F_CLOSE_DEFAULT
+ * H5F_CLOSE_WEAK
+ * H5F_CLOSE_SEMI
+ * H5F_CLOSE_STRONG
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
@@ -2105,10 +2105,10 @@ h5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree)
* INPUTS
* fapl_id - file access identifier
* degree - possible values are:
- * H5F_CLOSE_DEFAULT
- * H5F_CLOSE_WEAK
- * H5F_CLOSE_SEMI
- * H5F_CLOSE_STRONG
+ * H5F_CLOSE_DEFAULT
+ * H5F_CLOSE_WEAK
+ * H5F_CLOSE_SEMI
+ * H5F_CLOSE_STRONG
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
@@ -2659,9 +2659,9 @@ h5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size)
*/
int_f
h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls,
- H5P_cls_create_func_t create, void *create_data,
- H5P_cls_copy_func_t copy, void *copy_data,
- H5P_cls_close_func_t close, void *close_data)
+ H5P_cls_create_func_t create, void *create_data,
+ H5P_cls_copy_func_t copy, void *copy_data,
+ H5P_cls_close_func_t close, void *close_data)
/******/
{
int ret_value = -1;
@@ -3434,7 +3434,10 @@ h5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset)
*/
int_f
-/*h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag) */
+/*
+ * h5pset_fapl_multi_c(hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name,
+ * int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag)
+ */
h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag)
/******/
{
@@ -3865,9 +3868,10 @@ DONE:
* Calls H5Pget_attr_phase_change
*
* INPUTS
- * ocpl_id - Object (dataset or group) creation property list identifier
- * Outputs max_compact - Maximum number of attributes to be stored in compact storage
- * min_dense - Minimum number of attributes to be stored in dense storage
+ * ocpl_id - Object (dataset or group) creation property list identifier
+ * OUTPUTS
+ * max_compact - Maximum number of attributes to be stored in compact storage
+ * min_dense - Minimum number of attributes to be stored in dense storage
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
@@ -3906,8 +3910,9 @@ h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dens
* Calls H5Ppset_attr_creation_order
*
* INPUTS
- * ocpl_id - Object (dataset or group) creation property list identifier
- * Outputs crt_order_flags - Flags specifying whether to track and index attribute creation order
+ * ocpl_id - Object (dataset or group) creation property list identifier
+ * OUTPUTS
+ * crt_order_flags - Flags specifying whether to track and index attribute creation order
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
@@ -4068,7 +4073,7 @@ h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags)
* Calls H5Pset_link_creation_order
*
* INPUTS
- * gcpl_id - Group creation property list identifier
+ * gcpl_id - Group creation property list identifier
* crt_order_flags - Creation order flag(s)
* OUTPUTS
*
@@ -4104,9 +4109,10 @@ h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags )
* Calls H5Pget_link_phase_change
*
* INPUTS
- * gcpl_id - Group creation property list identifier
- * Outputs max_compact - Maximum number of attributes to be stored in compact storage
- * min_dense - Minimum number of attributes to be stored in dense storage
+ * gcpl_id - Group creation property list identifier
+ * OUTPUTS
+ * max_compact - Maximum number of attributes to be stored in compact storage
+ * min_dense - Minimum number of attributes to be stored in dense storage
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
@@ -4227,10 +4233,10 @@ h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag)
*
* INPUTS
*
- * lcpl_id - Link creation property list identifier
+ * lcpl_id - Link creation property list identifier
* crt_intermed_group - crt_intermed_group specifying whether
- * to create intermediate groups upon the
- * creation of an object
+ * to create intermediate groups upon the
+ * creation of an object
* RETURNS
* 0 on success, -1 on failure
* AUTHOR
@@ -4311,8 +4317,8 @@ h5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags)
*
* plist_id - Property list identifier
* encoding - String encoding character set:
- * H5T_CSET_ASCII_F -> US ASCII
- * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
+ * H5T_CSET_ASCII_F -> US ASCII
+ * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
* OUTPUTS
* NONE
*
@@ -4355,8 +4361,8 @@ h5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding)
* OUTPUTS
*
* encoding - Encoding character set:
- * H5T_CSET_ASCII_F -> US ASCII
- * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
+ * H5T_CSET_ASCII_F -> US ASCII
+ * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
*
* RETURNS
* 0 on success, -1 on failure
@@ -4484,7 +4490,7 @@ h5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options)
* RETURNS
*
* Success: 0
- * Failure: -1
+ * Failure: -1
*
* AUTHOR
* M. Scot Breitenfeld
@@ -4546,7 +4552,7 @@ done:
* RETURNS
*
* Success: 0
- * Failure: -1
+ * Failure: -1
*
* AUTHOR
* M. Scot Breitenfeld
@@ -4595,7 +4601,7 @@ done:
* RETURNS
*
* Success: 0
- * Failure: -1
+ * Failure: -1
*
* AUTHOR
* M. Scot Breitenfeld
@@ -4637,7 +4643,7 @@ h5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
* RETURNS
*
* Success: 0
- * Failure: -1
+ * Failure: -1
*
* AUTHOR
* M. Scot Breitenfeld
@@ -4682,7 +4688,7 @@ h5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name
* RETURNS
*
* Success: 0
- * Failure: -1
+ * Failure: -1
*
* AUTHOR
* M. Scot Breitenfeld
@@ -4722,7 +4728,7 @@ h5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
* RETURNS
*
* Success: 0
- * Failure: -1
+ * Failure: -1
*
* AUTHOR
* M. Scot Breitenfeld
@@ -4792,7 +4798,7 @@ h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dens
*
* INPUTS
*
- * fapl_id - File access property list identifier
+ * fapl_id - File access property list identifier
* alignment - Required memory alignment boundary
* block_size - File system block size
* cbuf_size - Copy buffer size
@@ -4838,7 +4844,7 @@ h5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *a
*
* INPUTS
*
- * fapl_id - File access property list identifier
+ * fapl_id - File access property list identifier
* OUTPUTS
*
* alignment - Required memory alignment boundary
@@ -4890,9 +4896,9 @@ h5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *a
* Calls H5Pset_attr_phase_change
*
* INPUTS
- * ocpl_id - Object (dataset or group) creation property list identifier
- * max_compact - Maximum number of attributes to be stored in compact storage
- * min_dense - Minimum number of attributes to be stored in dense storage
+ * ocpl_id - Object (dataset or group) creation property list identifier
+ * max_compact - Maximum number of attributes to be stored in compact storage
+ * min_dense - Minimum number of attributes to be stored in dense storage
* OUTPUTS
*
* RETURNS
@@ -5072,7 +5078,7 @@ h5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks)
*
* INPUTS
*
- * lcpl_id - Link creation property list identifier
+ * lcpl_id - Link creation property list identifier
* crt_intermed_group - Specifying whether to create intermediate groups upon
* the creation of an object
* RETURNS
@@ -5108,7 +5114,8 @@ h5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group)
* Name: h5pset_chunk_cache_c
* Purpose: Calls H5Pset_chunk_cache
*
- * Inputs: dapl_id - Link creation property list identifier
+ * Inputs:
+ * dapl_id - Link creation property list identifier
* rdcc_nslots -
* rdcc_nbytes -
* rdcc_w0 -
@@ -5138,7 +5145,8 @@ h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nby
* Name: h5pget_chunk_cache_c
* Purpose: Calls H5Pget_chunk_cache
*
- * Inputs: dapl_id - Link creation property list identifier
+ * Inputs:
+ * dapl_id - Link creation property list identifier
* Outputs:
* rdcc_nslots -
* rdcc_nbytes -
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index ff7001b..dadf644 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -42,7 +42,7 @@ endif ()
# Add Test Lib
#-----------------------------------------------------------------------------
if (NOT BUILD_SHARED_LIBS)
- add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c)
+ add_library (${HDF5_F90_C_TEST_LIB_TARGET} STATIC t.c t.h)
set_source_files_properties (t.c PROPERTIES LANGUAGE C)
target_include_directories (${HDF5_F90_C_TEST_LIB_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
@@ -60,7 +60,7 @@ if (NOT BUILD_SHARED_LIBS)
LINKER_LANGUAGE C
)
else ()
- add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c)
+ add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c t.h)
target_include_directories (${HDF5_F90_C_TEST_LIBSH_TARGET}
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>"
@@ -79,6 +79,17 @@ else ()
)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT BUILD_SHARED_LIBS)
+ clang_format (HDF5_FORTRAN_TESTS_FORMAT ${HDF5_F90_C_TEST_LIB_TARGET})
+ else ()
+ clang_format (HDF5_FORTRAN_TESTS_FORMAT ${HDF5_F90_C_TEST_LIBSH_TARGET})
+ endif ()
+endif ()
+
if (NOT BUILD_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_FORTRAN_TESTS_BINARY_DIR}/static/tf_gen.F90