summaryrefslogtreecommitdiffstats
path: root/tools/h5repack
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-08-14 19:58:54 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-08-14 19:58:54 (GMT)
commitc27d1808480a4ffae4af5ff5384993f63ea6b5d4 (patch)
tree251081393f02ad4fb6767af9d23be50971761d79 /tools/h5repack
parent37b14fd3ed8aae8f3b83df03ca29f82178c25f8f (diff)
parentd3e931c772a1fea1d8d0676dd6dd3fe95b000d9e (diff)
downloadhdf5-c27d1808480a4ffae4af5ff5384993f63ea6b5d4.zip
hdf5-c27d1808480a4ffae4af5ff5384993f63ea6b5d4.tar.gz
hdf5-c27d1808480a4ffae4af5ff5384993f63ea6b5d4.tar.bz2
[svn-r27507] Merge of r27237-27500 from the trunk.
Tested w/ h5committest NOTES: - The manifest may still be messed up. - Cmake fails since the dual binary work needs to be merged with this repo's CMake externals.
Diffstat (limited to 'tools/h5repack')
-rw-r--r--tools/h5repack/CMakeLists.txt69
-rw-r--r--tools/h5repack/CMakeTests.cmake8
2 files changed, 32 insertions, 45 deletions
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index 42d9f3d..7631ae8 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -21,8 +21,8 @@ set (REPACK_COMMON_SRCS
)
add_executable (h5repack ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c)
-TARGET_NAMING (h5repack ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5repack ${LIB_TYPE} " " " ")
+TARGET_NAMING (h5repack STATIC)
+TARGET_C_PROPERTIES (h5repack STATIC " " " ")
target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5repack PROPERTIES FOLDER tools)
@@ -33,51 +33,49 @@ if (BUILD_TESTING)
# Add h5Repack test executables
# --------------------------------------------------------------------
add_executable (testh5repack_detect_szip ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c)
- TARGET_NAMING (testh5repack_detect_szip ${LIB_TYPE})
- TARGET_C_PROPERTIES (testh5repack_detect_szip ${LIB_TYPE} " " " ")
+ TARGET_NAMING (testh5repack_detect_szip STATIC)
+ TARGET_C_PROPERTIES (testh5repack_detect_szip STATIC " " " ")
target_link_libraries (testh5repack_detect_szip ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (testh5repack_detect_szip PROPERTIES FOLDER tools)
add_executable (h5repacktest ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repacktst.c)
- TARGET_NAMING (h5repacktest ${LIB_TYPE})
- TARGET_C_PROPERTIES (h5repacktest ${LIB_TYPE} " " " ")
+ TARGET_NAMING (h5repacktest STATIC)
+ TARGET_C_PROPERTIES (h5repacktest STATIC " " " ")
target_link_libraries (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
set_target_properties (h5repacktest PROPERTIES FOLDER tools)
#-----------------------------------------------------------------------------
# If plugin library tests can be tested
#-----------------------------------------------------------------------------
- if (BUILD_SHARED_LIBS)
- set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd")
- set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
- set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
- add_definitions (${HDF_EXTRA_C_FLAGS})
- INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
+ set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd")
+ set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
+ set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
+ add_definitions (${HDF_EXTRA_C_FLAGS})
+ INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
- add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c)
- TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ")
- target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
- H5_SET_LIB_OPTIONS (
- ${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME}
- SHARED
- HDF5_TOOL_PLUGIN_LIB_NAME_RELEASE
- HDF5_TOOL_PLUGIN_LIB_NAME_DEBUG
- )
+ add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c)
+ TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ")
+ target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ H5_SET_LIB_OPTIONS (
+ ${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME}
+ SHARED
+ HDF5_TOOL_PLUGIN_LIB_NAME_RELEASE
+ HDF5_TOOL_PLUGIN_LIB_NAME_DEBUG
+ )
- # make plugins dir
- file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
- #-----------------------------------------------------------------------------
- # Copy plugin library to a plugins folder
- #-----------------------------------------------------------------------------
- add_custom_command (
- TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different
+ # make plugins dir
+ file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
+ #-----------------------------------------------------------------------------
+ # Copy plugin library to a plugins folder
+ #-----------------------------------------------------------------------------
+ add_custom_command (
+ TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different
"$<TARGET_FILE:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
"${CMAKE_BINARY_DIR}/plugins/$<TARGET_FILE_NAME:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
- )
- endif (BUILD_SHARED_LIBS)
+ )
include (CMakeTests.cmake)
@@ -98,8 +96,5 @@ endif (BUILD_TESTING)
install (
TARGETS
h5repack
- RUNTIME DESTINATION
- ${HDF5_INSTALL_BIN_DIR}
- COMPONENT
- toolsapplications
+ RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
)
diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake
index efaa6e5..dee97ed 100644
--- a/tools/h5repack/CMakeTests.cmake
+++ b/tools/h5repack/CMakeTests.cmake
@@ -992,16 +992,8 @@
##############################################################################
### P L U G I N T E S T S
##############################################################################
-if (BUILD_SHARED_LIBS)
ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,1,9)
ADD_H5_UD_TEST (plugin_none 0 h5repack_layout.UD.h5 -v -f NONE)
-else (BUILD_SHARED_LIBS)
- message (STATUS " **** Plugins libraries must be built as shared libraries **** ")
- add_test (
- NAME H5REPACK-plugin
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING"
- )
-endif (BUILD_SHARED_LIBS)
if (HDF5_TEST_VFD)
# Run test with different Virtual File Driver