diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-11-06 21:45:58 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-11-06 21:45:58 (GMT) |
commit | 79903575e64e1e8f46ce27e6212d5d5939a8a900 (patch) | |
tree | 17ec3c8424b8f42ab67328cd2fd029dd3a0a0c3d /test | |
parent | c77d044dd0af2dfcbf6369cf6975f36f0a28cd76 (diff) | |
download | hdf5-79903575e64e1e8f46ce27e6212d5d5939a8a900.zip hdf5-79903575e64e1e8f46ce27e6212d5d5939a8a900.tar.gz hdf5-79903575e64e1e8f46ce27e6212d5d5939a8a900.tar.bz2 |
HDFFV-10605 Only test plugins if SHARED enabled
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | test/CMakeTests.cmake | 36 |
2 files changed, 21 insertions, 17 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 959bac8..ed6bacc 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -62,6 +62,7 @@ endif () ################################################################################# # If filter plugin tests can be tested ################################################################################# +if (BUILD_SHARED_LIBS) # make plugins dir file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/filter_plugin_dir1") file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/filter_plugin_dir2") @@ -159,6 +160,7 @@ endif () "${CMAKE_BINARY_DIR}/vol/$<TARGET_FILE_NAME:${HDF5_VOL_PLUGIN_LIB_TARGET}>" ) endforeach () +endif () ################################################################################# # Test program sources diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index bc759ce..3ad9de7 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -1030,29 +1030,31 @@ endif () ############################################################################## ### F I L T E R P L U G I N T E S T S ############################################################################## -if (WIN32) - set (CMAKE_SEP "\;") - set (BIN_REL_PATH "../../") -else () - set (CMAKE_SEP ":") - set (BIN_REL_PATH "../") -endif () +if (BUILD_SHARED_LIBS) + if (WIN32) + set (CMAKE_SEP "\;") + set (BIN_REL_PATH "../../") + else () + set (CMAKE_SEP ":") + set (BIN_REL_PATH "../") + endif () -add_test (NAME H5PLUGIN-filter_plugin COMMAND $<TARGET_FILE:filter_plugin>) -set_tests_properties (H5PLUGIN-filter_plugin PROPERTIES - ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/filter_plugin_dir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/filter_plugin_dir2;srcdir=${HDF5_TEST_BINARY_DIR}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} -) + add_test (NAME H5PLUGIN-filter_plugin COMMAND $<TARGET_FILE:filter_plugin>) + set_tests_properties (H5PLUGIN-filter_plugin PROPERTIES + ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/filter_plugin_dir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/filter_plugin_dir2;srcdir=${HDF5_TEST_BINARY_DIR}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} + ) ############################################################################## # HDFFV-9655 relative plugin test disabled # -#add_test (NAME H5PLUGIN-pluginRelative COMMAND $<TARGET_FILE:plugin>) -#set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES -# ENVIRONMENT "HDF5_PLUGIN_PATH=@/${BIN_REL_PATH}testdir1${CMAKE_SEP}@/${BIN_REL_PATH}testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" -# WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} -#) +# add_test (NAME H5PLUGIN-pluginRelative COMMAND $<TARGET_FILE:plugin>) +# set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES +# ENVIRONMENT "HDF5_PLUGIN_PATH=@/${BIN_REL_PATH}testdir1${CMAKE_SEP}@/${BIN_REL_PATH}testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" +# WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} +# ) ############################################################################## +endif () if (TEST_SHELL_SCRIPTS) include (ShellTests.cmake) |