diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 15:39:03 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 15:39:03 (GMT) |
commit | 753adc730358861c489c1da7e4ccd018af6b351c (patch) | |
tree | a3545e5f0dfa63f636f171f30f116eb532272cb1 /tools/h5copy | |
parent | 06e367c49b1d0e0875a3aae69817fbceb4020aa9 (diff) | |
download | hdf5-753adc730358861c489c1da7e4ccd018af6b351c.zip hdf5-753adc730358861c489c1da7e4ccd018af6b351c.tar.gz hdf5-753adc730358861c489c1da7e4ccd018af6b351c.tar.bz2 |
Merge clang-format changes from develop
Diffstat (limited to 'tools/h5copy')
-rw-r--r-- | tools/h5copy/CMakeLists.txt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index 1044f6c..fe0b6a7 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -28,6 +28,17 @@ if (BUILD_SHARED_LIBS) set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5copy-shared) endif () +#----------------------------------------------------------------------------- +# Add Target to clang-format +#----------------------------------------------------------------------------- +if (HDF5_ENABLE_FORMATTERS) + if (NOT ONLY_SHARED_LIBS) + clang_format (HDF5_H5COPY_SRC_FORMAT h5copy) + else () + clang_format (HDF5_H5COPY_SRC_FORMAT h5copy-shared) + endif () +endif () + if (BUILD_TESTING) if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS) add_executable (h5copygentest ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copygentest.c) @@ -36,6 +47,13 @@ if (BUILD_TESTING) target_link_libraries (h5copygentest PRIVATE ${HDF5_LIB_TARGET}) set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools) + #----------------------------------------------------------------------------- + # Add Target to clang-format + #----------------------------------------------------------------------------- + if (HDF5_ENABLE_FORMATTERS) + clang_format (HDF5_TOOLS_TEST_H5COPY_FORMAT h5copygentest) + endif () + #add_test (NAME h5copygentest COMMAND $<TARGET_FILE:h5copygentest>) endif () @@ -53,6 +71,13 @@ if (BUILD_TESTING) target_link_libraries (${H5COPY_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET}) H5_SET_LIB_OPTIONS (${H5COPY_TOOL_PLUGIN_LIB_TARGET} ${H5COPY_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") + #----------------------------------------------------------------------------- + # Add Target to clang-format + #----------------------------------------------------------------------------- + if (HDF5_ENABLE_FORMATTERS) + clang_format (HDF5_TOOLS_TEST_H5COPY_PLUGIN_FORMAT ${H5COPY_TOOL_PLUGIN_LIB_TARGET}) + endif () + # make plugins dir file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") #----------------------------------------------------------------------------- |