diff options
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) |