summaryrefslogtreecommitdiffstats
path: root/examples
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 /examples
parent6b71d6dc9453e8f94ac82732496ee59ca6495587 (diff)
downloadhdf5-30c7264c2ca0f169b099b6ebbf13c5bd71652ebc.zip
hdf5-30c7264c2ca0f169b099b6ebbf13c5bd71652ebc.tar.gz
hdf5-30c7264c2ca0f169b099b6ebbf13c5bd71652ebc.tar.bz2
CMake and script changes for clang-format
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 527b11f..b7e7cf0 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -53,6 +53,13 @@ foreach (example ${examples})
target_link_libraries (${example} PRIVATE ${HDF5_LIBSH_TARGET})
endif ()
set_target_properties (${example} PROPERTIES FOLDER examples)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_EXAMPLES_${example}_FORMAT ${example})
+ endif ()
endforeach ()
if (H5_HAVE_PARALLEL)
@@ -66,6 +73,13 @@ if (H5_HAVE_PARALLEL)
target_link_libraries (ph5example PRIVATE ${HDF5_LIBSH_TARGET} ${MPI_C_LIBRARIES})
endif ()
set_target_properties (ph5example PROPERTIES FOLDER examples)
+
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_EXAMPLES_ph5example_FORMAT ph5example)
+ endif ()
endif ()
if (BUILD_TESTING AND HDF5_TEST_EXAMPLES)