summaryrefslogtreecommitdiffstats
path: root/examples/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/CMakeLists.txt')
-rw-r--r--examples/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index bc9a445..5cc3244 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -51,6 +51,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)
@@ -64,6 +71,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)