diff options
Diffstat (limited to 'tools/h5dump/CMakeLists.txt')
-rw-r--r-- | tools/h5dump/CMakeLists.txt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 2ffa4a8..fd9aa76 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -9,6 +9,11 @@ if (NOT ONLY_SHARED_LIBS) ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump.c ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_ddl.c ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_xml.c + ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump.h + ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_defines.h + ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_extern.h + ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_ddl.h + ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_xml.h ) target_include_directories (h5dump PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") target_compile_options(h5dump PRIVATE "${HDF5_CMAKE_C_FLAGS}") @@ -26,6 +31,11 @@ if (BUILD_SHARED_LIBS) ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump.c ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_ddl.c ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_xml.c + ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump.h + ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_defines.h + ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_extern.h + ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_ddl.h + ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_xml.h ) target_include_directories (h5dump-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") target_compile_options(h5dump-shared PRIVATE "${HDF5_CMAKE_C_FLAGS}") @@ -38,6 +48,17 @@ if (BUILD_SHARED_LIBS) set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5dump-shared) endif () +#----------------------------------------------------------------------------- +# Add Target to clang-format +#----------------------------------------------------------------------------- +if (HDF5_ENABLE_FORMATTERS) + if (NOT ONLY_SHARED_LIBS) + clang_format (HDF5_H5DUMP_SRC_FORMAT h5dump) + else () + clang_format (HDF5_H5DUMP_SRC_FORMAT h5dump-shared) + endif () +endif () + if (BUILD_TESTING) if (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- @@ -53,6 +74,13 @@ if (BUILD_TESTING) target_link_libraries (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET}) H5_SET_LIB_OPTIONS (${H5DUMP_TOOL_PLUGIN_LIB_TARGET} ${H5DUMP_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") + #----------------------------------------------------------------------------- + # Add Target to clang-format + #----------------------------------------------------------------------------- + if (HDF5_ENABLE_FORMATTERS) + clang_format (HDF5_TOOLS_TEST_H5DUMP_PLUGIN_FORMAT ${H5DUMP_TOOL_PLUGIN_LIB_TARGET}) + endif () + # make plugins dir file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") #----------------------------------------------------------------------------- @@ -78,6 +106,13 @@ if (BUILD_TESTING) target_link_libraries (h5dumpgentest PRIVATE ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools) + #----------------------------------------------------------------------------- + # Add Target to clang-format + #----------------------------------------------------------------------------- + if (HDF5_ENABLE_FORMATTERS) + clang_format (HDF5_TOOLS_TEST_H5DUMP_FORMAT h5dumpgentest) + endif () + #add_test (NAME h5dumpgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dumpgentest>) endif () |