diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-09-04 21:36:52 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-09-04 21:36:52 (GMT) |
commit | 30c7264c2ca0f169b099b6ebbf13c5bd71652ebc (patch) | |
tree | 1a92edfa20e5e6dfe467b002227220c7f9d61cfd /hl/tools | |
parent | 6b71d6dc9453e8f94ac82732496ee59ca6495587 (diff) | |
download | hdf5-30c7264c2ca0f169b099b6ebbf13c5bd71652ebc.zip hdf5-30c7264c2ca0f169b099b6ebbf13c5bd71652ebc.tar.gz hdf5-30c7264c2ca0f169b099b6ebbf13c5bd71652ebc.tar.bz2 |
CMake and script changes for clang-format
Diffstat (limited to 'hl/tools')
-rw-r--r-- | hl/tools/gif2h5/CMakeLists.txt | 29 | ||||
-rw-r--r-- | hl/tools/h5watch/CMakeLists.txt | 32 |
2 files changed, 61 insertions, 0 deletions
diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt index 0b895a3..e165b54 100644 --- a/hl/tools/gif2h5/CMakeLists.txt +++ b/hl/tools/gif2h5/CMakeLists.txt @@ -40,6 +40,17 @@ if (BUILD_SHARED_LIBS) ) endif () +#----------------------------------------------------------------------------- +# Add Target to clang-format +#----------------------------------------------------------------------------- +if (HDF5_ENABLE_FORMATTERS) + if (NOT ONLY_SHARED_LIBS) + clang_format (HDF5_HL_TOOLS_GIF2H5_FORMAT gif2h5) + else () + clang_format (HDF5_HL_TOOLS_GIF2H5_FORMAT gif2h5-shared) + endif () +endif () + #-- Add h52gif program set (hdf2gif_SOURCES ${HDF5_HL_TOOLS_GIF2H5_SOURCE_DIR}/hdf2gif.c @@ -71,6 +82,17 @@ if (BUILD_SHARED_LIBS) ) endif () +#----------------------------------------------------------------------------- +# Add Target to clang-format +#----------------------------------------------------------------------------- +if (HDF5_ENABLE_FORMATTERS) + if (NOT ONLY_SHARED_LIBS) + clang_format (HDF5_HL_TOOLS_H52GIF_FORMAT h52gif) + else () + clang_format (HDF5_HL_TOOLS_H52GIF_FORMAT h52gif-shared) + endif () +endif () + if (BUILD_TESTING AND HDF5_TEST_SERIAL) # -------------------------------------------------------------------- # This executable can generate the actual test files - Currently not @@ -84,6 +106,13 @@ if (BUILD_TESTING AND HDF5_TEST_SERIAL) target_link_libraries (hl_h52gifgentest PRIVATE ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl) + #----------------------------------------------------------------------------- + # Add Target to clang-format + #----------------------------------------------------------------------------- + if (HDF5_ENABLE_FORMATTERS) + clang_format (HDF5_HL_TOOLS_hl_h52gifgentest_FORMAT hl_h52gifgentest) + endif () + # add_test (NAME hl_h52gifgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:hl_h52gifgentest>) endif () diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt index c5ad976..7e04329 100644 --- a/hl/tools/h5watch/CMakeLists.txt +++ b/hl/tools/h5watch/CMakeLists.txt @@ -28,6 +28,17 @@ if (BUILD_SHARED_LIBS) set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5watch-shared) endif () +#----------------------------------------------------------------------------- +# Add Target to clang-format +#----------------------------------------------------------------------------- +if (HDF5_ENABLE_FORMATTERS) + if (NOT ONLY_SHARED_LIBS) + clang_format (HDF5_HL_TOOLS_H5WATCH_FORMAT h5watch) + else () + clang_format (HDF5_HL_TOOLS_H5WATCH_FORMAT h5watch-shared) + endif () +endif () + if (BUILD_TESTING AND HDF5_TEST_SWMR AND HDF5_TEST_SERIAL) #-- Add swmr_check_compat_vfd program set (hl_swmr_check_compat_vfd_SOURCES @@ -45,6 +56,13 @@ if (BUILD_TESTING AND HDF5_TEST_SWMR AND HDF5_TEST_SERIAL) endif () set_target_properties (hl_swmr_check_compat_vfd PROPERTIES FOLDER tools/hl) + #----------------------------------------------------------------------------- + # Add Target to clang-format + #----------------------------------------------------------------------------- + if (HDF5_ENABLE_FORMATTERS) + clang_format (HDF5_HL_TOOLS_H5WATCH_hl_swmr_check_compat_vfd_FORMAT hl_swmr_check_compat_vfd) + endif () + #-- Add extend_dset program set (extend_dset_SOURCES ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/extend_dset.c @@ -61,6 +79,13 @@ if (BUILD_TESTING AND HDF5_TEST_SWMR AND HDF5_TEST_SERIAL) endif () set_target_properties (extend_dset PROPERTIES FOLDER tools/hl) + #----------------------------------------------------------------------------- + # Add Target to clang-format + #----------------------------------------------------------------------------- + if (HDF5_ENABLE_FORMATTERS) + clang_format (HDF5_HL_TOOLS_H5WATCH_extend_dset_FORMAT extend_dset) + endif () + add_executable (h5watchgentest ${HDF5_HL_TOOLS_H5WATCH_SOURCE_DIR}/h5watchgentest.c) target_compile_options(h5watchgentest PRIVATE "${HDF5_CMAKE_C_FLAGS}") target_include_directories (h5watchgentest PRIVATE "${HDF5_HL_SRC_DIR}/src;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") @@ -73,6 +98,13 @@ if (BUILD_TESTING AND HDF5_TEST_SWMR AND HDF5_TEST_SERIAL) endif () set_target_properties (h5watchgentest PROPERTIES FOLDER generator/tools/hl) + #----------------------------------------------------------------------------- + # Add Target to clang-format + #----------------------------------------------------------------------------- + if (HDF5_ENABLE_FORMATTERS) + clang_format (HDF5_HL_TOOLS_H5WATCH_h5watchgentest_FORMAT h5watchgentest) + endif () + if (HDF5_TEST_TOOLS) include (CMakeTests.cmake) endif () |