summaryrefslogtreecommitdiffstats
path: root/hl/examples/CMakeTests.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'hl/examples/CMakeTests.cmake')
-rw-r--r--hl/examples/CMakeTests.cmake25
1 files changed, 19 insertions, 6 deletions
diff --git a/hl/examples/CMakeTests.cmake b/hl/examples/CMakeTests.cmake
index 6384aa5..3bbe91f 100644
--- a/hl/examples/CMakeTests.cmake
+++ b/hl/examples/CMakeTests.cmake
@@ -46,9 +46,22 @@ add_custom_target(hl_ex_ex_ds1_files ALL COMMENT "Copying files needed by hl_ex_
set (last_test "HL_ex-clear-objects")
foreach (example ${examples})
- add_test (NAME HL_ex_${example} COMMAND $<TARGET_FILE:hl_ex_${example}>)
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (HL_ex_${example} PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "HL_ex_${example}")
-endforeach (example ${examples})
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME HL_ex_${example} COMMAND $<TARGET_FILE:hl_ex_${example}>)
+ else ()
+ add_test (NAME HL_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:hl_ex_${example}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=hl_ex_${example}.txt"
+ #-D "TEST_REFERENCE=hl_ex_${example}.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ endif ()
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (HL_ex_${example} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "HL_ex_${example}")
+endforeach ()