diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-08-09 19:12:15 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-08-09 19:12:15 (GMT) |
commit | 6eb23dfcd8edffea4fee087ea2ec0b96d8449f2f (patch) | |
tree | 578aa007bbc16f9c31c4e3a21c88482f3b27f6ed /tools/h5diff/CMakeLists.txt | |
parent | fb4765997768385fb4ad680652c283418c309eb0 (diff) | |
download | hdf5-6eb23dfcd8edffea4fee087ea2ec0b96d8449f2f.zip hdf5-6eb23dfcd8edffea4fee087ea2ec0b96d8449f2f.tar.gz hdf5-6eb23dfcd8edffea4fee087ea2ec0b96d8449f2f.tar.bz2 |
Fix parallel process
Diffstat (limited to 'tools/h5diff/CMakeLists.txt')
-rw-r--r-- | tools/h5diff/CMakeLists.txt | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt index ce0278f..584dd92 100644 --- a/tools/h5diff/CMakeLists.txt +++ b/tools/h5diff/CMakeLists.txt @@ -42,7 +42,21 @@ if (H5_HAVE_PARALLEL) target_link_libraries (ph5diff PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>") set_target_properties (ph5diff PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};ph5diff") + set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} ph5diff) endif () + if (BUILD_SHARED_LIBS) + add_executable (ph5diff-shared + ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_common.c + ${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/ph5diff_main.c + ) + target_include_directories (ph5diff-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (ph5diff-shared SHARED) + target_link_libraries (ph5diff-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>") + set_target_properties (ph5diff-shared PROPERTIES FOLDER tools) + set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};ph5diff-shared") + set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} ph5diff-shared) + endif () +endif () if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS) add_executable (h5diffgentest ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diffgentest.c) @@ -54,39 +68,37 @@ if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS) #add_test (NAME h5diffgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diffgentest>) endif () +#----------------------------------------------------------------------------- +# If plugin library tests can be tested +#----------------------------------------------------------------------------- +if (BUILD_SHARED_LIBS) + set (H5DIFF_TOOL_PLUGIN_LIB_CORENAME "dynlibdiff") + set (H5DIFF_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${H5DIFF_TOOL_PLUGIN_LIB_CORENAME}") + set (H5DIFF_TOOL_PLUGIN_LIB_TARGET ${H5DIFF_TOOL_PLUGIN_LIB_CORENAME}) + + add_library (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_diff.c) + target_include_directories (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") + TARGET_C_PROPERTIES (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} SHARED) + target_link_libraries (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET}) + H5_SET_LIB_OPTIONS (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} ${H5DIFF_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") + + # make plugins dir + file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") #----------------------------------------------------------------------------- - # If plugin library tests can be tested + # Copy plugin library to a plugins folder #----------------------------------------------------------------------------- - if (BUILD_SHARED_LIBS) - set (H5DIFF_TOOL_PLUGIN_LIB_CORENAME "dynlibdiff") - set (H5DIFF_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${H5DIFF_TOOL_PLUGIN_LIB_CORENAME}") - set (H5DIFF_TOOL_PLUGIN_LIB_TARGET ${H5DIFF_TOOL_PLUGIN_LIB_CORENAME}) - - add_library (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_diff.c) - target_include_directories (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>") - TARGET_C_PROPERTIES (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} SHARED) - target_link_libraries (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} PRIVATE ${HDF5_TEST_LIBSH_TARGET}) - H5_SET_LIB_OPTIONS (${H5DIFF_TOOL_PLUGIN_LIB_TARGET} ${H5DIFF_TOOL_PLUGIN_LIB_NAME} SHARED "LIB") - - # make plugins dir - file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") - #----------------------------------------------------------------------------- - # Copy plugin library to a plugins folder - #----------------------------------------------------------------------------- - add_custom_command ( - TARGET ${H5DIFF_TOOL_PLUGIN_LIB_TARGET} - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different - "$<TARGET_FILE:${H5DIFF_TOOL_PLUGIN_LIB_TARGET}>" - "${CMAKE_BINARY_DIR}/plugins/$<TARGET_FILE_NAME:${H5DIFF_TOOL_PLUGIN_LIB_TARGET}>" - ) - endif () - - include (CMakeTests.cmake) - + add_custom_command ( + TARGET ${H5DIFF_TOOL_PLUGIN_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different + "$<TARGET_FILE:${H5DIFF_TOOL_PLUGIN_LIB_TARGET}>" + "${CMAKE_BINARY_DIR}/plugins/$<TARGET_FILE_NAME:${H5DIFF_TOOL_PLUGIN_LIB_TARGET}>" + ) endif () +include (CMakeTests.cmake) + ############################################################################## ############################################################################## ### I N S T A L L A T I O N ### @@ -108,16 +120,4 @@ if (HDF5_EXPORTED_TARGETS) ${HDF5_EXPORTED_TARGETS} RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications ) - - if (H5_HAVE_PARALLEL) - #INSTALL_PROGRAM_PDB (ph5diff ${HDF5_INSTALL_BIN_DIR} toolsapplications) - - install ( - TARGETS - ph5diff - EXPORT - ${HDF5_EXPORTED_TARGETS} - RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications - ) - endif () endif () |