summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-04 21:36:52 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-04 21:36:52 (GMT)
commit30c7264c2ca0f169b099b6ebbf13c5bd71652ebc (patch)
tree1a92edfa20e5e6dfe467b002227220c7f9d61cfd /fortran/test
parent6b71d6dc9453e8f94ac82732496ee59ca6495587 (diff)
downloadhdf5-30c7264c2ca0f169b099b6ebbf13c5bd71652ebc.zip
hdf5-30c7264c2ca0f169b099b6ebbf13c5bd71652ebc.tar.gz
hdf5-30c7264c2ca0f169b099b6ebbf13c5bd71652ebc.tar.bz2
CMake and script changes for clang-format
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/CMakeLists.txt15
1 files changed, 13 insertions, 2 deletions
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