summaryrefslogtreecommitdiffstats
path: root/tools/h5import/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-01 15:39:03 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-01 15:39:03 (GMT)
commit753adc730358861c489c1da7e4ccd018af6b351c (patch)
treea3545e5f0dfa63f636f171f30f116eb532272cb1 /tools/h5import/CMakeLists.txt
parent06e367c49b1d0e0875a3aae69817fbceb4020aa9 (diff)
downloadhdf5-753adc730358861c489c1da7e4ccd018af6b351c.zip
hdf5-753adc730358861c489c1da7e4ccd018af6b351c.tar.gz
hdf5-753adc730358861c489c1da7e4ccd018af6b351c.tar.bz2
Merge clang-format changes from develop
Diffstat (limited to 'tools/h5import/CMakeLists.txt')
-rw-r--r--tools/h5import/CMakeLists.txt22
1 files changed, 20 insertions, 2 deletions
diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt
index 8fe7c2d..460b58c 100644
--- a/tools/h5import/CMakeLists.txt
+++ b/tools/h5import/CMakeLists.txt
@@ -5,7 +5,7 @@ project (HDF5_TOOLS_H5IMPORT C)
# Add the h5import executables
# --------------------------------------------------------------------
if (NOT ONLY_SHARED_LIBS)
- add_executable (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c)
+ add_executable (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.h)
target_include_directories (h5import PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (h5import STATIC)
target_link_libraries (h5import PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
@@ -17,7 +17,7 @@ if (NOT ONLY_SHARED_LIBS)
endif ()
if (BUILD_SHARED_LIBS)
- add_executable (h5import-shared ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c)
+ add_executable (h5import-shared ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.h)
target_include_directories (h5import-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (h5import-shared SHARED)
target_link_libraries (h5import-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
@@ -28,6 +28,17 @@ if (BUILD_SHARED_LIBS)
set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5import-shared)
endif ()
+#-----------------------------------------------------------------------------
+# Add Target to clang-format
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_FORMATTERS)
+ if (NOT ONLY_SHARED_LIBS)
+ clang_format (HDF5_H5IMPORT_SRC_FORMAT h5import)
+ else ()
+ clang_format (HDF5_H5IMPORT_SRC_FORMAT h5import-shared)
+ endif ()
+endif ()
+
if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5import executables
@@ -43,6 +54,13 @@ if (BUILD_TESTING)
endif ()
set_target_properties (h5importtest PROPERTIES FOLDER tools)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TOOLS_TEST_H5IMPORT_FORMAT h5importtest)
+ endif ()
+
if (HDF5_TEST_TOOLS AND HDF5_TEST_SERIAL)
include (CMakeTests.cmake)
endif ()