summaryrefslogtreecommitdiffstats
path: root/tools/test/h5ls/CMakeTests.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/h5ls/CMakeTests.cmake')
-rw-r--r--tools/test/h5ls/CMakeTests.cmake14
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake
index 95af5ab..f4babb6 100644
--- a/tools/test/h5ls/CMakeTests.cmake
+++ b/tools/test/h5ls/CMakeTests.cmake
@@ -134,10 +134,16 @@
##############################################################################
##############################################################################
+ if (NOT BUILD_SHARED_LIBS)
+ set (tgt_ext "")
+ else ()
+ set (tgt_ext "-shared")
+ endif ()
+
macro (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN})
+ add_test (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls${tgt_ext}> ${ARGN})
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (${resultcode} EQUAL 1)
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
@@ -157,7 +163,7 @@
add_test (
NAME H5LS-${resultfile}
COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -192,7 +198,7 @@
add_test (
NAME H5LS-${resultfile}
COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -218,7 +224,7 @@
add_test (
NAME H5LS_UD-${testname}
COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
-D "TEST_ARGS=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"