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 | |
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
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 2 | ||||
-rw-r--r-- | config/cmake/H5pubconf.h.in | 6 | ||||
-rw-r--r-- | test/plugin_lib/CMakeLists.txt | 19 |
3 files changed, 25 insertions, 2 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 6db6d78..b2078e2 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -205,6 +205,7 @@ ENDIF (CYGWIN) #----------------------------------------------------------------------------- IF (NOT WINDOWS) CHECK_LIBRARY_EXISTS_CONCAT ("m" ceil H5_HAVE_LIBM) + CHECK_LIBRARY_EXISTS_CONCAT ("dl" dlopen H5_HAVE_LIBDL) CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" WSAStartup H5_HAVE_LIBWS2_32) CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname H5_HAVE_LIBWSOCK32) ENDIF (NOT WINDOWS) @@ -367,6 +368,7 @@ CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" H5_HAVE_SYS_TYPES_H) CHECK_INCLUDE_FILE_CONCAT ("stddef.h" H5_HAVE_STDDEF_H) CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" H5_HAVE_SETJMP_H) CHECK_INCLUDE_FILE_CONCAT ("features.h" H5_HAVE_FEATURES_H) +CHECK_INCLUDE_FILE_CONCAT ("dirent.h" H5_HAVE_DIRENT_H) CHECK_INCLUDE_FILE_CONCAT ("stdint.h" H5_HAVE_STDINT_H) # IF the c compiler found stdint, check the C++ as well. On some systems this diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index d9f0997..2736daf 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -124,6 +124,9 @@ /* Define if the direct I/O virtual file driver should be compiled */ #cmakedefine H5_HAVE_DIRECT @H5_HAVE_DIRECT@ +/* Define to 1 if you have the <dirent.h> header file. */ +#cmakedefine H5_HAVE_DIRENT_H @H5_HAVE_DIRENT_H@ + /* Define to 1 if you have the <dlfcn.h> header file. */ #cmakedefine H5_HAVE_DLFCN_H @H5_HAVE_DLFCN_H@ @@ -230,6 +233,9 @@ /* Define to 1 if you have the <io.h> header file. */ #cmakedefine H5_HAVE_IO_H @H5_HAVE_IO_H@ +/* Define to 1 if you have the `dl' library (-ldl). */ +#cmakedefine H5_HAVE_LIBDL @H5_HAVE_LIBDL@ + /* Define to 1 if you have the `dmalloc' library (-ldmalloc). */ #cmakedefine H5_HAVE_LIBDMALLOC @H5_HAVE_LIBDMALLOC@ 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) |