summaryrefslogtreecommitdiffstats
path: root/tools/test/h5copy/CMakeLists.txt
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2017-11-25 08:12:26 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2017-11-25 08:22:24 (GMT)
commit96784c9873433b57de813c5afadd5d9771103686 (patch)
treec180d5c2a0163c2c273cb72b7b7df006e7be7a3f /tools/test/h5copy/CMakeLists.txt
parenta7ba8af0d145fee16a758ae4150316c7f2a38263 (diff)
parentf3fd3f293f2734fea98f508f190bf531edc72f7a (diff)
downloadhdf5-96784c9873433b57de813c5afadd5d9771103686.zip
hdf5-96784c9873433b57de813c5afadd5d9771103686.tar.gz
hdf5-96784c9873433b57de813c5afadd5d9771103686.tar.bz2
(1) Merge branch 'develop' into bugfix/version_bounds
(2) Add two new options to h5repack for low and high bounds as in H5Pset_libver_bounds. (3) Modify message pre_copy callbacks so that H5Ocopy can handle version bounds check. (4) Add version bounds check for cache image feature.
Diffstat (limited to 'tools/test/h5copy/CMakeLists.txt')
-rw-r--r--tools/test/h5copy/CMakeLists.txt48
1 files changed, 39 insertions, 9 deletions
diff --git a/tools/test/h5copy/CMakeLists.txt b/tools/test/h5copy/CMakeLists.txt
index 4a519ab..c57cd5e 100644
--- a/tools/test/h5copy/CMakeLists.txt
+++ b/tools/test/h5copy/CMakeLists.txt
@@ -10,14 +10,44 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
# Add the h5copy test executables
# --------------------------------------------------------------------
- if (HDF5_BUILD_GENERATORS)
- add_executable (h5copygentest ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/h5copygentest.c)
- TARGET_NAMING (h5copygentest STATIC)
- TARGET_C_PROPERTIES (h5copygentest STATIC " " " ")
- target_link_libraries (h5copygentest ${HDF5_LIB_TARGET})
- set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools)
+if (HDF5_BUILD_GENERATORS)
+ add_executable (h5copygentest ${HDF5_TOOLS_TEST_H5COPY_SOURCE_DIR}/h5copygentest.c)
+ TARGET_NAMING (h5copygentest STATIC)
+ TARGET_C_PROPERTIES (h5copygentest STATIC " " " ")
+ target_link_libraries (h5copygentest ${HDF5_LIB_TARGET})
+ set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools)
- #add_test (NAME h5copygentest COMMAND $<TARGET_FILE:h5copygentest>)
- endif ()
+ #add_test (NAME h5copygentest COMMAND $<TARGET_FILE:h5copygentest>)
+endif ()
- include (CMakeTests.cmake)
+#-----------------------------------------------------------------------------
+# If plugin library tests can be tested
+#-----------------------------------------------------------------------------
+if (BUILD_SHARED_LIBS)
+ set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibcopy")
+ 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_copy.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_PACKAGE_SOVERSION})
+
+ # 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 ()
+
+include (CMakeTests.cmake)