summaryrefslogtreecommitdiffstats
path: root/c++/examples/CMakeTests.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-02-06 21:30:08 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-02-06 21:30:08 (GMT)
commit78ea0a0c081a1cf07795fffa2100057538510f81 (patch)
treede3d8d848badde9bb35d937b0c42912f3a62ae5f /c++/examples/CMakeTests.cmake
parentb7acf7dd3b44c9263476c884f57e6c0edb811c49 (diff)
downloadhdf5-78ea0a0c081a1cf07795fffa2100057538510f81.zip
hdf5-78ea0a0c081a1cf07795fffa2100057538510f81.tar.gz
hdf5-78ea0a0c081a1cf07795fffa2100057538510f81.tar.bz2
HDFFV-9875 Bring changes from develop branch
Diffstat (limited to 'c++/examples/CMakeTests.cmake')
-rw-r--r--c++/examples/CMakeTests.cmake49
1 files changed, 37 insertions, 12 deletions
diff --git a/c++/examples/CMakeTests.cmake b/c++/examples/CMakeTests.cmake
index 4db8c68..8b5c6b9 100644
--- a/c++/examples/CMakeTests.cmake
+++ b/c++/examples/CMakeTests.cmake
@@ -8,7 +8,7 @@
add_test (
NAME CPP_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
Group.h5
SDS.h5
SDScompound.h5
@@ -17,16 +17,29 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (CPP_ex-clear-objects PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "CPP_ex-clear-objects")
foreach (example ${examples})
- add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
+ else ()
+ add_test (NAME CPP_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:cpp_ex_${example}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=cpp_ex_${example}.txt"
+ #-D "TEST_REFERENCE=cpp_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 (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "CPP_ex_${example}")
- endforeach (example ${examples})
+ endforeach ()
#the following dependicies are handled by the order of the files
# SET_TESTS_PROPERTIES(CPP_ex_readdata PROPERTIES DEPENDS CPP_ex_create)
# SET_TESTS_PROPERTIES(CPP_ex_chunks PROPERTIES DEPENDS CPP_ex_extend_ds)
@@ -34,7 +47,7 @@
add_test (
NAME CPP_ex_tutr-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
h5tutr_cmprss.h5
h5tutr_dset.h5
h5tutr_extend.h5
@@ -44,18 +57,30 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (CPP_ex_tutr-clear-objects PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "CPP_ex_tutr-clear-objects")
-
+
foreach (example ${tutr_examples})
- add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME CPP_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
+ else ()
+ add_test (NAME CPP_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:cpp_ex_${example}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -D "TEST_OUTPUT=cpp_ex_${example}.txt"
+ #-D "TEST_REFERENCE=cpp_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 (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "CPP_ex_${example}")
- endforeach (example ${tutr_examples})
+ endforeach ()
#the following dependicies are handled by the order of the files
# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_crtatt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat)
# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_rdwt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat)
# SET_TESTS_PROPERTIES(CPP_ex_h5tutr_crtgrpd PROPERTIES DEPENDS CPP_ex_h5tutr_crtgrpar)
- \ No newline at end of file