summaryrefslogtreecommitdiffstats
path: root/tools/test/misc/CMakeTestsMkgrp.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/misc/CMakeTestsMkgrp.cmake')
-rw-r--r--tools/test/misc/CMakeTestsMkgrp.cmake18
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/test/misc/CMakeTestsMkgrp.cmake b/tools/test/misc/CMakeTestsMkgrp.cmake
index e99983b..db1f805 100644
--- a/tools/test/misc/CMakeTestsMkgrp.cmake
+++ b/tools/test/misc/CMakeTestsMkgrp.cmake
@@ -54,6 +54,12 @@
##############################################################################
##############################################################################
+ if (NOT BUILD_SHARED_LIBS)
+ set (tgt_ext "")
+ else ()
+ set (tgt_ext "-shared")
+ endif ()
+
macro (ADD_H5_TEST resultfile resultcode resultoption)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
@@ -69,19 +75,19 @@
add_test (
NAME H5MKGRP-${resultfile}
- COMMAND $<TARGET_FILE:h5mkgrp> ${resultoption} ${resultfile}.h5 ${ARGN}
+ COMMAND $<TARGET_FILE:h5mkgrp${tgt_ext}> ${resultoption} ${resultfile}.h5 ${ARGN}
)
set_tests_properties (H5MKGRP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (HDF5_ENABLE_USING_MEMCHECKER)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5MKGRP-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ else ()
set_tests_properties (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile}-clear-objects)
add_test (
NAME H5MKGRP-${resultfile}-h5ls
COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_ext}>"
-D "TEST_ARGS:STRING=-v;-r;${resultfile}.h5"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -110,7 +116,7 @@
add_test (
NAME H5MKGRP_CMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp${tgt_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
-D "TEST_OUTPUT=${resultfile}.out"
@@ -174,7 +180,7 @@
h5mkgrp_nested_mult_lp.out.err
)
set_tests_properties (H5MKGRP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5MKGRP-clearall-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5MKGRP-clearall-objects")