diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-03-19 19:20:54 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-03-19 19:20:54 (GMT) |
commit | b58732109690975b557dc27c7f76234c9f12fbd5 (patch) | |
tree | 2b98104ff9bd93a9c1b556d6c1f481238a863a6f /test | |
parent | a9de601138282ac3ad1f0ca7a01e2fd56fe7c660 (diff) | |
download | hdf5-b58732109690975b557dc27c7f76234c9f12fbd5.zip hdf5-b58732109690975b557dc27c7f76234c9f12fbd5.tar.gz hdf5-b58732109690975b557dc27c7f76234c9f12fbd5.tar.bz2 |
[svn-r23384] Copy dynamic lib to a plugins folder for testing. This will avoid the segfault with looking for the library with other libraries.
Tested: local linux
Diffstat (limited to 'test')
-rw-r--r-- | test/plugin_lib/CMakeLists.txt | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/test/plugin_lib/CMakeLists.txt b/test/plugin_lib/CMakeLists.txt index 6a6f4a7..8bd7ea1 100644 --- a/test/plugin_lib/CMakeLists.txt +++ b/test/plugin_lib/CMakeLists.txt @@ -54,10 +54,25 @@ H5_SET_LIB_OPTIONS ( ${HDF5_TEST_PLUGIN_LIB_TARGET} ${HDF5_TEST_PLUGIN_LIB_NAME} ${LIB_TYPE} HDF5_TEST_PLUGIN_LIB_NAME_RELEASE - HDF5_TEST_PLUGIN_LIB_NAME_DEBUG + HDF5_TEST_PLUGIN_LIB_NAME_DEBUG ) SET_TARGET_PROPERTIES (${HDF5_TEST_PLUGIN_LIB_TARGET} PROPERTIES FOLDER libraries/TEST_PLUGIN) +# +# Copy plugin library to a plugins folder +# + +# make plugins dir +FILE (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") +ADD_CUSTOM_COMMAND ( + TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET} + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy_if_different + "$<TARGET_FILE:${HDF5_TEST_PLUGIN_LIB_TARGET}>" + "${CMAKE_BINARY_DIR}/plugins/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_LIB_TARGET}>" + ) + ############################################################################## ############################################################################## ### T E S T S ### @@ -71,4 +86,4 @@ TARGET_LINK_LIBRARIES (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET}) SET_TARGET_PROPERTIES (plugin PROPERTIES FOLDER test) ADD_TEST (NAME H5PLUGIN-plugin COMMAND $<TARGET_FILE:plugin>) -SET_TESTS_PROPERTIES (H5PLUGIN-plugin PROPERTIES ENVIRONMENT HDF5_PLUGIN_PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) +SET_TESTS_PROPERTIES (H5PLUGIN-plugin PROPERTIES ENVIRONMENT HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/plugins) |