diff options
Diffstat (limited to 'hl/tools/h5watch/CMakeTests.cmake')
-rw-r--r-- | hl/tools/h5watch/CMakeTests.cmake | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/hl/tools/h5watch/CMakeTests.cmake b/hl/tools/h5watch/CMakeTests.cmake index a4d3fa2..fba8484 100644 --- a/hl/tools/h5watch/CMakeTests.cmake +++ b/hl/tools/h5watch/CMakeTests.cmake @@ -68,12 +68,18 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes ############################################################################## ############################################################################## + if (NOT BUILD_SHARED_LIBS) + set (tgt_ext "") + else () + set (tgt_ext "-shared") + endif () + macro (ADD_H5_TEST resultfile resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5WATCH_ARGS-h5watch-${resultfile} COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$<TARGET_FILE:h5watch>" + -D "TEST_PROGRAM=$<TARGET_FILE:h5watch${tgt_ext}>" -D "TEST_ARGS:STRING=${ARGN}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_OUTPUT=${resultfile}.out" @@ -91,7 +97,7 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes add_test ( NAME H5WATCH_ARGS-h5watch-${resultfile} COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$<TARGET_FILE:h5watch>" + -D "TEST_PROGRAM=$<TARGET_FILE:h5watch${tgt_ext}>" -D "TEST_ARGS:STRING=${ARGN}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_OUTPUT=${resultfile}.out" @@ -110,14 +116,13 @@ add_custom_target(H5WATCH_files ALL COMMENT "Copying files needed by H5WATCH tes add_test ( NAME H5WATCH-${resultfile}-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove - ${resultfile}.h5 + -E remove ${resultfile}.h5 ) set_tests_properties (H5WATCH-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") add_test ( NAME H5WATCH-${resultfile} COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$<TARGET_FILE:h5watch>" + -D "TEST_PROGRAM=$<TARGET_FILE:h5watch${tgt_ext}>" -D "TEST_ARGS:STRING=${ARGN}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" -D "TEST_OUTPUT=${resultfile}.out" |