diff options
Diffstat (limited to 'tools/test/misc/CMakeTestsMkgrp.cmake')
-rw-r--r-- | tools/test/misc/CMakeTestsMkgrp.cmake | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/test/misc/CMakeTestsMkgrp.cmake b/tools/test/misc/CMakeTestsMkgrp.cmake index 87d3a20..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,7 +75,7 @@ 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) @@ -81,7 +87,7 @@ 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" |